| 1 |
## /////////////////////////////////////////////////////////////////////////// |
| 2 |
## @file makefile |
| 3 |
## @author Michael Holst |
| 4 |
## @brief Makefile for building the PMG binary. |
| 5 |
## @version $Id: Make.dist,v 1.4 2010/08/12 05:52:58 fetk Exp $ |
| 6 |
## @attention |
| 7 |
## @verbatim |
| 8 |
## |
| 9 |
## PMG -- Parallel algebraic MultiGrid |
| 10 |
## Copyright (C) 1994-- Michael Holst. |
| 11 |
## |
| 12 |
## Michael Holst <[email protected]> |
| 13 |
## University of California, San Diego |
| 14 |
## Department of Mathematics, 5739 AP&M |
| 15 |
## 9500 Gilman Drive, Dept. 0112 |
| 16 |
## La Jolla, CA 92093-0112 USA |
| 17 |
## http://math.ucsd.edu/~mholst |
| 18 |
## |
| 19 |
## This file is part of PMG. |
| 20 |
## |
| 21 |
## PMG is free software; you can redistribute it and/or modify |
| 22 |
## it under the terms of the GNU General Public License as published by |
| 23 |
## the Free Software Foundation; either version 2 of the License, or |
| 24 |
## (at your option) any later version. |
| 25 |
## |
| 26 |
## PMG is distributed in the hope that it will be useful, |
| 27 |
## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 28 |
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 29 |
## GNU General Public License for more details. |
| 30 |
## |
| 31 |
## You should have received a copy of the GNU General Public License |
| 32 |
## along with PMG; if not, write to the Free Software |
| 33 |
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 34 |
## |
| 35 |
## Linking PMG statically or dynamically with other modules is making a |
| 36 |
## combined work based on PMG. Thus, the terms and conditions of the GNU |
| 37 |
## General Public License cover the whole combination. |
| 38 |
## |
| 39 |
## SPECIAL GPL EXCEPTION |
| 40 |
## In addition, as a special exception, the copyright holders of PMG |
| 41 |
## give you permission to combine the PMG program with free software |
| 42 |
## programs and libraries that are released under the GNU LGPL or with |
| 43 |
## code included in releases of ISIM, PMV, PyMOL, SMOL, VMD, and Vision. |
| 44 |
## Such combined software may be linked with PMG and redistributed together |
| 45 |
## in original or modified form as mere aggregation without requirement that |
| 46 |
## the entire work be under the scope of the GNU General Public License. |
| 47 |
## This special exception permission is also extended to any software listed |
| 48 |
## in the SPECIAL GPL EXCEPTION clauses by the FEtk and APBS libraries. |
| 49 |
## |
| 50 |
## Note that people who make modified versions of PMG are not obligated |
| 51 |
## to grant this special exception for their modified versions; it is |
| 52 |
## their choice whether to do so. The GNU General Public License gives |
| 53 |
## permission to release a modified version without this exception; this |
| 54 |
## exception also makes it possible to release a modified version which |
| 55 |
## carries forward this exception. |
| 56 |
## |
| 57 |
## @endverbatim |
| 58 |
## /////////////////////////////////////////////////////////////////////////// |
| 59 |
|
| 60 |
SRC_PREC = double |
| 61 |
DES_PREC = double |
| 62 |
|
| 63 |
############################################################################## |
| 64 |
# Makefile for the XMG package. |
| 65 |
# |
| 66 |
# author: michael holst |
| 67 |
# linux flags |
| 68 |
############################################################################## |
| 69 |
|
| 70 |
MACHINE = linux |
| 71 |
|
| 72 |
FC = f77 |
| 73 |
FCFLAGS = -c |
| 74 |
FLFLAGS = |
| 75 |
FOPT = |
| 76 |
FDEBUG = -g |
| 77 |
|
| 78 |
CC = cc |
| 79 |
CCFLAGS = -c |
| 80 |
CLFLAGS = |
| 81 |
COPT = |
| 82 |
CDEBUG = -g |
| 83 |
|
| 84 |
AR = ar rv |
| 85 |
ARFLAGS = |
| 86 |
ARLIB = true |
| 87 |
|
| 88 |
LK = f77 |
| 89 |
LKFLAGS = |
| 90 |
LKX = -o |
| 91 |
|
| 92 |
FXT = .f |
| 93 |
CXT = .c |
| 94 |
OXT = .o |
| 95 |
EXT = |
| 96 |
LXT = .a |
| 97 |
|
| 98 |
RM = rm -f |
| 99 |
MV = mv |
| 100 |
|
| 101 |
############################################################################## |
| 102 |
# |
| 103 |
#MACHINE = irix |
| 104 |
# |
| 105 |
#FC = f77 -o32 |
| 106 |
#FCFLAGS = -c -Nn20000 |
| 107 |
#FLFLAGS = |
| 108 |
#FOPT = |
| 109 |
#FDEBUG = -g |
| 110 |
# |
| 111 |
#CC = cc -o32 |
| 112 |
#CCFLAGS = -c |
| 113 |
#CLFLAGS = |
| 114 |
#COPT = |
| 115 |
#CDEBUG = -g |
| 116 |
# |
| 117 |
#AR = ar rv |
| 118 |
#ARFLAGS = |
| 119 |
#ARLIB = true |
| 120 |
# |
| 121 |
#LK = f77 -o32 |
| 122 |
#LKFLAGS = -L/usr/lib -lF77 -lU77 -lI77 -lm |
| 123 |
#LKX = -o |
| 124 |
# |
| 125 |
#FXT = .f |
| 126 |
#CXT = .c |
| 127 |
#OXT = .o |
| 128 |
#EXT = |
| 129 |
#LXT = .a |
| 130 |
# |
| 131 |
#RM = rm -f |
| 132 |
#MV = mv |
| 133 |
# |
| 134 |
############################################################################## |
| 135 |
# DO NOT MODIFY MAKEFILE BELOW THIS LINE |
| 136 |
############################################################################## |
| 137 |
# libraries |
| 138 |
|
| 139 |
MGLIB = mgrid$(LXT) |
| 140 |
|
| 141 |
FLIBPATHS = |
| 142 |
FLIBRARIES = |
| 143 |
FINCLUDES = |
| 144 |
FLIBS = $(FLIBPATHS) $(FLIBRARIES) |
| 145 |
FFLAGS = $(FINCLUDES) $(FOPT) $(FDEBUG) |
| 146 |
|
| 147 |
CLIBPATHS = |
| 148 |
CLIBRARIES = |
| 149 |
CINCLUDES = |
| 150 |
CLIBS = $(CLIBPATHS) $(CLIBRARIES) |
| 151 |
CFLAGS = $(CINCLUDES) $(COPT) $(CDEBUG) |
| 152 |
|
| 153 |
LIBS = $(MGLIB) $(CLIBS) $(FLIBS) |
| 154 |
|
| 155 |
############################################################################## |
| 156 |
# directories |
| 157 |
|
| 158 |
BIN = ../bin |
| 159 |
MISC = ../misc |
| 160 |
MYSRC = ../mysrc |
| 161 |
|
| 162 |
############################################################################## |
| 163 |
# modules |
| 164 |
|
| 165 |
DRIV = mainsubd$(OXT) \ |
| 166 |
cgmgdrvd$(OXT) newdrvd$(OXT) mgdrvd$(OXT) powerd$(OXT) \ |
| 167 |
ncgdrvd$(OXT) nsordrvd$(OXT) ngsdrvd$(OXT) nwjdrvd$(OXT) \ |
| 168 |
nrchdrvd$(OXT) |
| 169 |
SUPP = matvecd$(OXT) mikpckd$(OXT) smoothd$(OXT) nsmoothd$(OXT) \ |
| 170 |
buildAd$(OXT) buildBd$(OXT) mblasd$(OXT) secd$(OXT) rand$(OXT) |
| 171 |
LINM = cgd$(OXT) sord$(OXT) gsd$(OXT) wjd$(OXT) rchd$(OXT) |
| 172 |
NONM = ncgd$(OXT) nsord$(OXT) ngsd$(OXT) nwjd$(OXT) nrchd$(OXT) |
| 173 |
PROB = dlphsubd$(OXT) pded$(OXT) |
| 174 |
MGUT = newtond$(OXT) cgmgd$(OXT) mgcsd$(OXT) mgfasd$(OXT) mgsubd$(OXT) \ |
| 175 |
mlinpckd$(OXT) ninterpd$(OXT) buildPd$(OXT) buildGd$(OXT) |
| 176 |
ALLO = $(DRIV) $(SUPP) $(LINM) $(NONM) $(PROB) $(MGUT) |
| 177 |
|
| 178 |
############################################################################## |
| 179 |
# rules |
| 180 |
|
| 181 |
all : go$(EXT) gof$(EXT) |
| 182 |
go$(EXT) : main$(OXT) $(MGLIB) |
| 183 |
$(LK) main$(OXT) $(LKFLAGS) $(LIBS) $(LKX) go$(EXT) |
| 184 |
### $(LK) main$(OXT), go$(EXT), nul.map, llibfor7.lib $(MGLIB) |
| 185 |
gof$(EXT) : maind$(OXT) $(MGLIB) |
| 186 |
$(LK) maind$(OXT) $(LKFLAGS) $(LIBS) $(LKX) gof$(EXT) |
| 187 |
### $(LK) maind$(OXT), gof$(EXT), nul.map, llibfor7.lib $(MGLIB) |
| 188 |
main$(OXT) : main$(CXT) |
| 189 |
$(CC) $(CCFLAGS) $(CFLAGS) $*$(CXT) |
| 190 |
maind$(OXT) : maind$(FXT) |
| 191 |
$(FC) $(FCFLAGS) $(FFLAGS) $*$(FXT) |
| 192 |
$(MGLIB) : $(ALLO) |
| 193 |
$(ARLIB) $(MGLIB) |
| 194 |
$(FXT)$(OXT) : |
| 195 |
$(FC) $(FCFLAGS) $(FFLAGS) $*$(FXT) |
| 196 |
$(AR) $(MGLIB) $(ARFLAGS)$*$(OXT) |
| 197 |
$(CXT)$(OXT) : |
| 198 |
$(CC) $(CCFLAGS) $(CFLAGS) $*$(CXT) |
| 199 |
$(AR) $(MGLIB) $(ARFLAGS)$*$(OXT) |
| 200 |
clean : |
| 201 |
$(RM) *$(OXT) go$(EXT) gof$(EXT) $(MGLIB) |
| 202 |
|
| 203 |
############################################################################## |
| 204 |
# tools |
| 205 |
|
| 206 |
noperf : |
| 207 |
/bin/csh $(MISC)/noperf.drv $(DES_PREC) |
| 208 |
unread : |
| 209 |
/bin/csh $(MISC)/unread.drv $(DES_PREC) |
| 210 |
check : |
| 211 |
/bin/csh $(MISC)/check.drv $(DES_PREC) |
| 212 |
|