|
对makefile不太熟悉,现在有个软件包要编译,下面是其内容,请教大家帮我理解一下整个makefile的具体思路,编译过程,谢谢。
# Master makefile for DL_POLY_2.0
# Author: W. Smith November 1999
# With DPP tool by J. Geronowicz
# Original by T. Forester 1995
#
# $Author: qiliao $
# $Date: 2003/11/29 06:31:29 $
# $Revision: 1.1.1.1 $
# $State: Exp $
# Define default settings
#=======================================================================
FFTW_LIBRARY = "/usr/local/lib"
BINROOT = ../execute
CC = cc
DPP = ./dpp
EX = DLPOLY.X
EXE = $(BINROOT)/$(EX)
FC=undefined
PVM_EX=\'$(EX)\'
SHELL=/bin/sh
STRESS=STRESS
TYPE=3pt
# Define object files
#=====================================================================
OBJ_ALL = angfrc.o bndfrc.o cfgscan.o corshl.o coul0.o coul4.o \
coul2.o coul3.o conscan.o dblstr.o dcell.o diffsn0.o \
diffsn1.o dlpoly.o duni.o error.o ewald1.o ewald3.o \
exclude.o exclude_atom.o fldscan.o exclude_link.o \
exitcomms.o extnfld.o fbpfrc.o fcap.o forces.o freeze.o gauss.o \
gdsum.o getrec.o gimax.o gisum.o gstate.o images.o initcomms.o \
intlist.o intstr.o invert.o invfrc.o jacobi.o lowcase.o lrcmetal.o \
lrcorrect.o machine.o merge.o merge1.o merge4.o multiple.o \
multiple_nsq.o npt_b1.o npt_b3.o parset.o npt_h1.o npt_h3.o nve_1.o \
nvt_b1.o nvt_e1.o nvt_h1.o parlst_nsq.o parlink.o parlst.o passcon.o \
passpmf.o pmf_1.o pmf_shake.o primlst.o quench.o rdf0.o rdf1.o \
rdshake_1.o result.o revive.o scdens.o shellsort.o shlfrc.o \
shlmerge.o shlqnch.o shmove.o simdef.o splice.o static.o strip.o \
strucopt.o sysdef.o sysgen.o systemp.o sysbook.o sysinit.o \
tethfrc.o thbfrc.o timchk.o traject.o vertest.o vscaleg.o \
warning.o xscale.o zden0.o zden1.o nvt_BD0.o ran2.o randomforce.o\
OBJ_SPME = bspcoe.o bspgen.o cpy_rtc.o ele_prd.o ewald_spme.o \
scl_csum.o set_block.o spl_cexp.o spme_for.o
OBJ_NEU = coul0neu.o coul2neu.o coul3neu.o excludeneu.o forcesneu.o \
multipleneu.o neutlst.o parneulst.o prneulst.o \
parlinkneu.o rdf0neu.o
OBJ_RIG = nptq_b1.o nptq_b2.o nptq_b3.o nptq_b4.o nptq_h1.o nptq_h2.o \
nptq_h3.o nptq_h4.o nveq_1.o nveq_2.o nvtq_b1.o nvtq_b2.o \
nvtq_h1.o nvtq_h2.o passquat.o qshake.o quatbook.o quatqnch.o
OBJ_RRR = denloc.o dihfrc.o erfcgen.o ewald2.o ewald4.o forgen.o \
fortab.o metgen.o srfrce.o srfrceneu.o suttchen.o
OBJ_4PT = denloc_4pt.o dihfrc_4pt.o erfcgen.o ewald2_4pt.o ewald4_4pt.o \
forgen.o fortab.o metgen.o srfrce_4pt.o srfrceneu_4pt.o \
suttchen_4pt.o
OBJ_RSQ = denloc_rsq.o dihfrc_rsq.o erfcgen_rsq.o ewald2_rsq.o ewald4_rsq.o \
forgen_rsq.o fortab_rsq.o metgen_rsq.o srfrce_rsq.o srfrceneu_rsq.o\
suttchen_rsq.o
OBJ_EXT = crecv.o csend.o gsync.o mynode.o nodedim.o numnodes.o
TIMER = etime.o
# Define targets
#=====================================================================
all:
@echo "Error - please specify a target machine!"
@echo "Permissible targets for this Makefile are:"
@echo " "
@echo "alpha-linux"
@echo "alpha-linux-fftw"
@echo "beowulf-absoft"
@echo "cray-t3e"
@echo "cray-t3e-serial"
@echo "cray-t3e-totalview"
@echo "dec-alpha"
@echo "dec-alpha-ev6"
@echo "exemplar"
@echo "hitachi-sr2201"
@echo "hp"
@echo "hp-c240"
@echo "intel"
@echo "linux"
@echo "pentium-absoft"
@echo "pentium-portland"
@echo "rs6k"
@echo "rs6k-pwr3"
@echo "sg10k"
@echo "sg10k-fftw"
@echo "sg2-r5k"
@echo "sg2k"
@echo "sg2k-i6.5"
@echo "sg2k-shmem"
@echo "sg8k-mpi"
@echo "sg8k-mpi-f"
@echo "sp2-mpi"
@echo "sp2-mpi-debug"
@echo "sp2-mpi-fftw"
@echo "sun"
@echo "sun-ultra"
@echo " "
@echo "Please examine Makefile for details"
# system specific targets follow :
#========= Linux @ M (no SPME) ==============================================
mlinux: dpp
$(MAKE) FC=f90 LD="f90 -O3 -march=pentium3 -mfpmath=sse -mmmx -msse -o" FFLAGS="-c -O3 -march=pentium3 -mfpmath=sse -mmmx -msse" \
CPFLAGS="-D$(STRESS) -DSERIAL -DINTEL -D'pointer=integer*8'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
mlinux-parallel: dpp
cp /opt/lam-7.0/include/mpif.h mpif.h
$(MAKE) FC=f90 LD="f90 -O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -L/opt/lam-7.0/lib -llamf77mpi -lmpi -llammpi++ -llam -llammpio -lpthread -o" FFLAGS="-c -O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Linux @ M (plus SPME via FFTW) ==============================
mlinux-fftw: dpp
$(MAKE) FC=f90 LD="f90 -O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -o" FFLAGS="-c -O3 -march=pentium4 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2" \
CPFLAGS="-D$(STRESS) -DSERIAL -DINTEL -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-lfftw -L$(FFTW_LIBRARY)" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
mlinux-parallel-fftw: dpp
cp /opt/lam-7.0/include/mpif.h mpif.h
$(MAKE) FC=f90 LD="f90 -O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -L/opt/lam-7.0/lib -llamf77mpi -lmpi -llammpi++ -llammpio -llam -lpthread -o" FFLAGS="-c -O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-lfftw -L$(FFTW_LIBRARY)" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Linux @ ding (no SPME) ==============================================
dlinux: dpp
$(MAKE) FC=f90 LD="f90 -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow -o" FFLAGS="-c -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow" \
CPFLAGS="-D$(STRESS) -DSERIAL -DINTEL -D'pointer=integer*8'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
dlinux-parallel: dpp
# cp /usr/include/mpif.h mpif.h
cp /opt/lam-7.0/include/mpif.h mpif.h
$(MAKE) FC=f90 LD="f90 -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow -L/opt/lam-7.0/lib -llamf77mpi -lmpi -llammpi++ -llammpio -llam -lpthread -o" FFLAGS="-c -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Linux @ ding (plus SPME via FFTW) ==============================
dlinux-fftw: dpp
$(MAKE) FC=f90 LD="f90 -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow -o" FFLAGS="-c -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow" \
CPFLAGS="-D$(STRESS) -DSERIAL -DINTEL -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-lfftw -L$(FFTW_LIBRARY)" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
dlinux-parallel-fftw: dpp
# cp /usr/include/mpif.h mpif.h
cp /opt/lam-7.0/include/mpif.h mpif.h
$(MAKE) FC=f90 LD="f90 -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow -L/opt/lam-7.0/lib -llamf77mpi -lmpi -llammpi++ -llammpio -llam -lpthread -o" FFLAGS="-c -O3 -march=athlon-mp -mfpmath=sse -mmmx -msse -m3dnow" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-lfftw -L$(FFTW_LIBRARY)" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#================== Intel fortran 7.1 =======================================
mintel: dpp
cp /opt/lam-7.0.2/include/mpif.h mpif.h
$(MAKE) FC=ifc LD="ifc -O3 -xW -L/opt/lam-7.0.2/lib -llamf77mpi -lmpi -llammpi++ -llammpio -llam -lpthread -o" FFLAGS="-c -O3"\
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-lfftw -L$(FFTW_LIBRARY)" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#================== IBM SP2 version serial =======================================
sp2: dpp
$(MAKE) LD="xlf -o" LDFLAGS="-lessl" FC=xlf \
FFLAGS="-c -O2 -NS204 -qarch=pwr3 -qtune=pwr3 -qcache=auto" \
CPFLAGS="-D$(STRESS) -DSERIAL -DESSL -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#================== IBM SP2 version =======================================
sp2-mpi: dpp
cp /usr/lpp/ppe.poe/include/mpif.h mpif.h
$(MAKE) FC=mpxlf FFLAGS="-c -NS2048 -qarch=pwr3 -qtune=pwr3 -qcache=auto -qmaxmem=-1" \
CPFLAGS="-D$(STRESS) -DMPI -DESSL -D'POINTER=integer'" intlist.o
$(MAKE) LD="mpxlf -o" LDFLAGS="-lessl" FC=mpxlf \
FFLAGS="-c -O2 -NS2048 -qarch=pwr3 -qtune=pwr3 -qcache=auto -qmaxmem=-1" \
CPFLAGS="-D$(STRESS) -DMPI -DESSL -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#================== IBM SP2 debug version ==============================
sp2-mpi-debug: dpp
cp /usr/lpp/ppe.poe/include/mpif.h mpif.h
$(MAKE) LD="mpxlf -o" LDFLAGS="-lesslp2" FC=mpxlf \
FFLAGS="-g -c -C -NS2048 -qarch=pwr2 -qnosave" \
CPFLAGS="-D$(STRESS) -DMPI -DESSL -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#================== IBM SP2 FFTW version ===============================
sp2-mpi-fftw: dpp
cp /usr/lpp/ppe.poe/include/mpif.h mpif.h
# $(MAKE) FC=mpxlf FFLAGS="-c -NS2048 -qarch=pwr2 -qnosave" \
# CPFLAGS="-D$(STRESS) -DMPI -D'POINTER=integer' -DFFTW"
$(MAKE) LD="mpxlf -o" LDFLAGS="-lesslp2" \
FC=mpxlf FFLAGS="-c -O3 -NS2048 -qarch=pwr2 -qnosave" \
CPFLAGS="-D$(STRESS) -DMPI -D'POINTER=integer' -DFFTW -DESSL" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#===== Cray t3e (Manchester) ===========================================
cray-t3e: dpp
cp /opt/ctl/mpt/mpt/include/mpif.h mpif.h
$(MAKE) FC="f90" FFLAGS="-c -dp -lmpi" \
CPFLAGS="-DCRAY -DCRAY_T3D -D'POINTER=integer' -DSHMEM -D$(STRESS)'" \
lowcase.o
$(MAKE) LD="f90 -o" FC="f90" FFLAGS="-c -dp -lmpi" LDFLAGS="-lmpi" \
CPFLAGS="-DCRAY -DCRAY_T3D -D'POINTER=integer' \
-DSHMEM -D$(STRESS)" TIMER="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#===== Cray t3e (Manchester) with totalview flags ======================
cray-t3e-totalview: dpp
cp /opt/ctl/mpt/mpt/include/mpif.h mpif.h
$(MAKE) FC="f90" FFLAGS="-c -dp -lmpi -g -X8" \
CPFLAGS="-DCRAY -DCRAY_T3D -D'POINTER=integer' -DSHMEM -D$(STRESS)" \
lowcase.o
$(MAKE) LD="f90 -o" FC="f90" FFLAGS="-c -dp -lmpi -g -X8" \
LDFLAGS="-lmpi -g -X8" \
CPFLAGS="-DCRAY -DCRAY_T3D -D'POINTER=integer' \
-DSHMEM -D$(STRESS)" TIMER="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== Cray t3e (serial) ===========================================
cray-t3e-serial: dpp
$(MAKE) LD="f90 -o" LDFLAGS="" FC=f90 \
FFLAGS="-c -dp -O3,aggress,unroll2,nojump" TIMER="" \
CPFLAGS="-D$(STRESS) -DSERIAL -P -D'POINTER=intger'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== DEC Alpha (no SPME) =========================================
dec-alpha: dpp
$(MAKE) LD="f90 -o" FC=f90 FFLAGS="-c -fast" \
LDFLAGS="-math_library fast -assume noaccuracy_sensitive" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer*8'" \
TIMER="" OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== DEC Alpha ev6 (no SPME) =====================================
dec-alpha-ev6: dpp
$(MAKE) LD="f90 -o" FC=f90 FFLAGS="-c -arch ev6 -fast" \
LDFLAGS="-arch ev6 -math_library fast -assume noaccuracy_sensitive" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer*8'" \
TIMER="" OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======== Alpha Linux (no SPME) =========================================
alpha-linux: dpp
$(MAKE) FC=fort FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -dSERIAL -D'POINTER=integer*8'" qshake.o
$(MAKE) FC=fort LD="fort -o" FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer*8'" \
LDFLAGS="" OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
alpha-linux-parallel: dpp
$(MAKE) FC=fort FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8'" qshake.o
$(MAKE) FC=fort LD="fort -I/usr/local/lam/include -L/usr/local/lam/lib -lmpi++ -lmpi -ltstdio -ltrillium -largs -lt -o" FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8'" \
LDFLAGS="" OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======== Alpha Linux (plus SPME via FFTW) ==============================
alpha-linux-fftw: dpp
$(MAKE) FC=fort FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8' -DFFTW" qshake.o
$(MAKE) FC=fort LD="fort -o" FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-lcxml -lfftw -lrfftw -L$(FFTW_LIBRARY)" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
alpha-linux-parallel-fftw: dpp
$(MAKE) FC=fort FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8' -DFFTW" qshake.o
$(MAKE) FC=fort LD="fort -I/usr/local/lam/include -L/usr/local/lam/lib -lmpi++ -lmpi -ltstdio -ltrillium -largs -lt -o" FFLAGS="-c -O -fast" \
CPFLAGS="-D$(STRESS) -DMPI -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-lcxml -lfftw -lrfftw -L$(FFTW_LIBRARY)" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#================== HP Workstation version (no SPME) ===================
hp: dpp
$(MAKE) FC=f77 FFLAGS="-c" CPFLAGS="-D$(STRESS) -DSERIAL
-D'POINTER=integer'" qshake.o
$(MAKE) LD="f77 -o" LDFLAGS="" FC=f77 FFLAGS="-c -O" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Convex/HP exemplar (serial) (no SPME) =======================
exemplar: dpp
$(MAKE) LD="f90 -o" LDFLAGS="" FC=f90 FFLAGS=" -c +ppu +O2 +DA2.0" \
CPFLAGS="-D$(STRESS) -DSERIAL" -D'POINTER-integer' \
OBJ_SPME="" TIMER="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= HP PA 9000 / C240 (serial) (no SPME) ========================
hp-c240: dpp
$(MAKE) LD="f90 -o" LDFLAGS= FC=f90 FFLAGS=" -c +ppu +O2 +DA2.0" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
OBJ_SPME="" TIMER="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#============= IBM (AIX) Workstation version (no SPME) ===================
aix: dpp
$(MAKE) FC=mpxlf FFLAGS="-c -NS2048 -qarch=pwr2 -qnosave" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" intlist.o
$(MAKE) LD="xlf -o" LDFLAGS="" FC=xlf FFLAGS="-c -O3 -NS2048 -qarch=pwr2 -qnosave"\
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= RS/6000 P2SC (serial) (no SPME) ===============================
rs6k: dpp
$(MAKE) LD="xlf -o" LDFLAGS= FC=xlf \
FFLAGS="-c -O -qarch=pwr2 -qtune=pwr2" TIMER="" OBJ_SPME=""\
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= RS/6000 Power3 (serial) =======================================
rs6k-pwr3: dpp
$(MAKE) LD="xlf -o" LDFLAGS="-L/usr/local/lib -lmass -lessl" \
FC=xlf FFLAGS="-c -O -qnosave -qarch=pwr3" TIMER="" \
CPFLAGS="-D$(STRESS) -DSERIAL" -DESSL -D'POINTER=integer' \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== PentiumII (absoft) (serial) (no SPME) ========================
pentium-absoft: dpp
$(MAKE) LD="/usr/bin/f90 -o" LDFLAGS="-lfio" TIMER="" OBJ_SPME="" \
FC=/usr/bin/f90 FFLAGS="-c -YEXT_NAMES=LCS -B108 -B100 -O" \
CPFLAGS="-D$(STRESS) -DSERIAL -P -D'POINTER=integer' " \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== PentiumII (portland) (serial) (no SPME) ======================
pentium-portland: dpp
$(MAKE) LD="/usr/local/pgi/linux86/bin/pgf90 -o" LDFLAGS="" \
FC=/usr/local/pgi/linux86/bin/pgf90 FFLAGS="-c -O -Mdalign" \
CPFLAGS="-D$(STRESS) -DSERIAL -P -D'POINTER=integer'" \
TIMER="" OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======== Hitachi SR2201 Multiprocessor (no SPME) ========================
hitachi-sr2201: dpp
cp /usr/include/mpif.h mpif.h
$(MAKE) FC=xf90 \
FFLAGS="-c -W0,'form(fixed),opt(o(3)),langlvl(save(0))' -s,TRACE" \
CPFLAGS="-D$(STRESS) -DMPI -D'POINTER=integer'" intlist.o
$(MAKE) LDFLAGS="" LDLIBS="-lfmpi -lmpi" LD="xf90 -o" FC=xf90 \
FFLAGS="-c -W0, 'form(fixed),opt(o(3)),langlvl(save(0))' -s,TRACE" \
CC=xcc TIMER="" CPFLAGS="-D$(STRESS) -DMPI
-D'POINTER=integer'" OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======== Intel (no SPME) ================================================
intel: dpp
$(MAKE) FC=if77 LD="if77 -o" LDFLAGS="-node -glob -Knoieee" \
FFLAGS="-c -O2" CPFLAGS="-D$(STRESS) -DINTEL \
-D'POINTER=integer'" OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======== Silicon Graphics 10000 Worskstation ============================
sg10k: dpp
$(MAKE) LD="f90 -o" LDFLAGS="-lscs" \
FC=f90 FFLAGS="-c -O2 -OPT:Olimit=0 -lscs" TIMER="" \
CPFLAGS="-DCRAY -D$(STRESS) -DSERIAL -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======== Silicon Graphics 10000 Worskstation (SPME via FFTW) ============
sg10k-fftw: dpp
$(MAKE) LD="f90 -o" LDFLAGS="-lscs -lfftw -lrfftw -L$(FFTW_LIBRARY)" \
FC=f90 FFLAGS="-c -O2 -OPT:Olimit=0 -lscs" TIMER="" \
CPFLAGS="-DCRAY -D$(STRESS) -DSERIAL -D'POINTER=integer' -DFFTW" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Silicon Graphics 8000 (parallel) ==========================
sg8k-mpi: dpp
cp /usr/include/mpif.h mpif.h
$(MAKE) LD="f90 -O3 -64 -o" FC=f90 LDFLAGS="-lmpi" TIMER="" \
FFLAGS="-c -O3 -64 " CPFLAGS="-D$(STRESS) -DMPI \
-DCRAY -D'POINTER=integer'" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Silicon Graphics 8000 (parallel) ==========================
sg8k-mpi-f: dpp
cp /usr/include/mpif.h mpif.h
$(MAKE) LD="f90 -Ofast -64 -o" FC=f90 LDFLAGS="-lmpi" TIMER=""\
FFLAGS="-c -Ofast -64" CPFLAGS="-D$(STRESS) -DMPI \
-DCRAY -D'POINTER=integer'" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======= Silicon Graphics Origin 2000 (parallel/SHMEM) ===============
sg2k-shmem: dpp
cp /usr/include/mpif.h mpif.h
$(MAKE) LD="f90 -o" FC=f90 \
FFLAGS="-c -64 -mips4 -Ofast=ip27 -IPA -OPT:Olimit=0 " \
LDFLAGS="-64 -mips4 -Ofast=ip27 -IPA -OPT:Olimit=0 -lsma -lmpi -lblas" \
OBJ_EXT="gsync.o mynode.o nodedim.o numnodes.o" TIMER="" \
CPFLAGS="-DMPI -D$(STRESS) -DSHMEM_O2K -DCRAY -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Silicon Graphics Origin 2000 (serial) (no SPME) ===========
sg2k: dpp
$(MAKE) LD="f90 -o" LDFLAGS="-n32 -mips4" FC=f90 \
FFLAGS="-c -O3 -G 0 -mips4 -r10000 -c -r8 -n32" \
TIMER="" OBJ_SPME="" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
CFLAGS="-c -O3 -n32 -mips4 -r10000" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#=== Silicon Graphics Origin 2000 (serial, Irix 6.5) (no SPME) =======
sg2k-i6.5: dpp
$(MAKE) LD="f90 -o" LDFLAGS="-n32 -mips4 -IPA" \
FC=f90 FFLAGS="-c -n32 -mips4 -Ofast=ip27 -LNO:fusion=2" \
TIMER="" OBJ_SPME="" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
CFLAGS="-c -O3 -n32 -mips4 -r10000" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#=== Silicon Graphics O2 R5k (serial) (no SPME) ======================
sg2-r5k: dpp
$(MAKE) LD="f90 -o" LDFLAGS="-n32 -mips4" \
FC=f90 FFLAGS="-c -O3 -G 0 -mips4 -r5000 -c -r8 -n32" \
TIMER="" OBJ_SPME="" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
CFLAGS="-c -O3 -n32 -mips4 -r5000" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= SUN Workstation version (no SPME) =========================
sun: dpp
$(MAKE) LD="f77 -o" LDFLAGS="" FC=f77 FFLAGS="-c -O2" \
TIMER="" OBJ_SPME="" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#======== Sun Ultra-2 (serial) (no SPME) =============================
sun-ultra: dpp
$(MAKE) LD="/opt/SUNWspro/bin/f90 -o" LDFLAGS= \
FC=/opt/SUNWspro/bin/f90 \
FFLAGS="-c -fnonstd -xarch=v8plusa -xchip=ultra -O2 -libmil -dalign" \
TIMER="" OBJ_SPME="" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'POINTER=integer'" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Daresbury Beowulf (Absoft compiler) (no SPME)==============
beowulf-absoft: dpp
cp /usr/local/lam-6.2/h/mpif.h mpif.h
$(MAKE) LD="/usr/bin/f90 -o" \
LDFLAGS="-L/home/kcm/mpich-absoft/mpich/lib/LINUX/ch_p4/ -lmpich" \
FC=/usr/bin/f90 FFLAGS="-c -O -B100" TIMER="" OBJ_SPME="" \
CPFLAGS="-D$(STRESS) -DMPI -P -D'POINTER=integer' \
-I/home/kcm/mpich-absoft/mpich/include"
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Absoft () ==============================
absoft: dpp
$(MAKE) FC=f90 FFLAGS="-c -cpu:p7 -O2 -YEXT_NAMES=LCS" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8'" qshake.o
$(MAKE) FC=f90 LD="f90 -o" FFLAGS="-c -cpu:p7 -O2 -YEXT_NAMES=LCS" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========= Absoft () ==============================
absoft-fftw: dpp
$(MAKE) FC=f90 FFLAGS="-c -cpu:p7 -O2 -B108 -YEXT_NAMES=LCS" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8' -DFFTW" qshake.o
$(MAKE) FC=f90 LD="f90 -o" FFLAGS="-c -cpu:p7 -O2 -B108 -YEXT_NAMES=LCS" \
CPFLAGS="-D$(STRESS) -DSERIAL -DINTEL -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-L$(FFTW_LIBRARY) -lfftw -lrfftw -lm" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== PentiumII (portland) (serial) (no SPME) ======================
portland: dpp
$(MAKE) LD="/usr/local/pgi/linux86/bin/pgf90 -o" LDFLAGS="" \
FC=/usr/local/pgi/linux86/bin/pgf90 FFLAGS="-c -fast -tp p6" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== PentiumII (portland) (serial) (SPME) ======================
portland-fftw: dpp
$(MAKE) LD="/usr/local/pgi/linux86/bin/pgf90 -o" LDFLAGS="" \
FC=/usr/local/pgi/linux86/bin/pgf90 FFLAGS="-c -fast -tp p6 -Msecond_underscore" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8' -DFFTW" \
LDFLAGS="-L$(FFTW_LIBRARY) -lfftw -lrfftw -lm" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#========== PentiumII (portland) (serial) (no SPME) ======================
hpf: dpp
$(MAKE) LD="/usr/local/pgi/linux86/bin/pghpf -o" LDFLAGS="" \
FC=/usr/local/pgi/linux86/bin/pghpf FFLAGS="-c -O2 -fast -tp p6" \
CPFLAGS="-D$(STRESS) -DSERIAL -D'pointer=integer*8'" \
OBJ_SPME="" EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
#=====================================================================
# Interpolation tables options
# Default code. Force tables interpolation in r-space 3pt interpolation
3pt: check $(OBJ_ALL) $(OBJ_RRR) $(OBJ_NEU) $(OBJ_RIG) $(OBJ_EXT) $(TIMER) $(OBJ_SPME)
$(LD) $(EXE) $(OBJ_ALL) $(OBJ_RRR) $(OBJ_NEU) $(OBJ_RIG) $(OBJ_EXT) $(TIMER) \
$(LDFLAGS) $(LDLIBS) $(OBJ_SPME)
# Force tables interpolation in r-space, 4pt interpolation
4pt: check $(OBJ_ALL) $(OBJ_4PT) $(OBJ_NEU) $(OBJ_RIG) $(OBJ_EXT) $(TIMER) $(OBJ_SPME)
$(LD) $(EXE) $(OBJ_ALL) $(OBJ_4PT) $(OBJ_NEU) $(OBJ_RIG) $(OBJ_EXT) $(TIMER) \
$(LDFLAGS) $(LDLIBS) $(OBJ_SPME)
# Force tables interpolation in r-squared
rsq: check $(OBJ_ALL) $(OBJ_RSQ) $(OBJ_NEU) $(OBJ_RIG) $(OBJ_EXT) $(TIMER) $(OBJ_SPME)
$(LD) $(EXE) $(OBJ_ALL) $(OBJ_RSQ) $(OBJ_NEU) $(OBJ_RIG) $(OBJ_EXT) $(TIMER) \
$(LDFLAGS) $(LDLIBS) $(OBJ_SPME)
#=====================================================================
# Check that a machine has been specified
check:
@if test $(FC) = "undefined";\
then echo "You must specify a target machine!"; \
exit 99;\
fi
#=====================================================================
# Clean up the source directory
clean:
rm -f $(OBJ_ALL) $(OBJ_RRR) $(OBJ_EXT) $(OBJ_NEU) \
$(OBJ_RIG) $(TIMER) $(OBJ_SPME) $(OBJ_4PT) $(OBJ_RSQ) \
*.tmp.f mpif.h
#=====================================================================
# Compile preprocessor code
dpp: dpp.c
$(CC) dpp.c -o dpp
#=====================================================================
# Declare dependencies : c preprocess all .f files
.f.o:
$(DPP) $(CPFLAGS) $*.f > $*.tmp.f
$(FC) $(FFLAGS) $*.tmp.f
mv $*.tmp.o $*.o
.c.o:
$(CC) -c $*.c
#=====================================================================
# Declare dependency on parameters file
$(OBJ_ALL): dl_params.inc
$(OBJ_RRR): dl_params.inc
$(OBJ_4PT): dl_params.inc
$(OBJ_RSQ): dl_params.inc
$(OBJ_NEU): dl_params.inc
$(OBJ_RIG): dl_params.inc
$(OBJ_EXT): dl_params.inc
$(OBJ_SPME): dl_params.inc |
|