SHELL=/bin/sh ############################################################################ # # Makefile for glmp_granalysis_2p5 # Use: # make - build the executable # make clean - start with a clean slate # # Module loaded before building the executable: # modulefiles/glmp/v1.1.0 # # History: # 05/19/2015 Ghirardelli - modified for NCO standards # ############################################################################ # # This makefile is invoked by the command line: # make -f makefile # it will compile the fortran modules indicated by SRCS into the object # modules indicated by OBJS and produce an executable named a.out. # # If it is invoked by the command line # make -f makefile a.out.prof # it will compile the fortran modules indicated by SRCS into the object # modules indicated by OBJS and produce an executable which profiles # named a.out.prof. # # To remove all the objects but leave the executables use the command line # make -f makefile clean # # To remove everything but the source files use the command line # make -f makefile clobber # # To remove the source files created by /usr/bin/fmgen and this makefile # use the command line # make -f makefile void # # The parameters SRCS and OBJS should not need to be changed. If, however, # you need to add a new module add the name of the source module to the # SRCS parameter and add the name of the resulting object file to the OBJS # parameter. The new modules are not limited to fortran, but may be C, YACC, # LEX, or CAL. An explicit rule will need to be added for PASCAL modules. # SRCS= augmt1.f augmt2.f augmt3.f augmto.f avglap.f bcd5.f blend.f blend2.f bogus.f caksno.f cateq.f cconsn.f cigfrq.f cigft.f cightc.f cigmbo.f cigobc.f ckmaxt.f ckmint.f ckpop.f ckqpf.f cktdp.f ckwndg.f clapse.f clip.f clos2.f clos2g.f closlw.f closo.f concpr.f conekd.f conspr.f const.f convpr.f corbc5.f cutit.f cvlmpm.f cvlmpr.f ddrad.f dens.f densrm.f densrq.f difwh.f dirfuv.f dirspd.f enhanc.f enhwnd.f erest.f eslp5.f esp5.f fgskya.f fitwth.f fltag5.f fltagm.f fstgs5.f gfetch.f gfetch4.f gradck.f granalysis.f gthres.f hsmth.f int155.f intrpx.f irlmp.f irlmtw.f irobs.f irobtw.f itrp.f itrpsl.f itrpsx.f keylst.f lapse.f lapsua.f listlw.f lmllij.f lmstr4.f newxy.f orsmth.f orsmtw.f orvwsm.f osmth1.f osmth.f pix1.f pix.f pixsm1.f platyp.f points.f post88.f post.f postpm.f qpf6p6.f rdeqng.f rdnei.f rdprs.f rdstqs.f rdstqt.f rdstr1.f rdstr7.f rdv155.f rdvrhl.f regres.f restrw.f restwh.f rough.f roughg.f rvsnam.f sample.f sclcig.f sclq06.f sclq12.f sclsky.f sclsno.f sclvis.f setcig.f setfg.f setlnd.f setpln.f setpnt.f setvmi.f setvis.f skyamt.f skycig.f skymbo.f skyobc.f smothg.f sortbg.f spotrm.f spotwt.f stsnoz.f szgrdm.f szgrid.f terdif.f trnwnd.f u155ck.f u155.f u405a.f vari.f varig.f varil.f varilg.f variw.f variwg.f visfrq.f vismbo.f vismi.f windg.f wndcor.f wthol1.f wthol2.f wthol3.f xycom1.f setgpt.f rd45cn.f bogusg.f ddrad2.f postcg.f postva.f OBJS=${SRCS:.f=.o} # # Tunable parameters # # FC Name of the fortran compiling system to use # LDFLAGS Flags to the loader # LIBS List of libraries # CMD Name of the executable # PROFLIB Library needed for profiling # BINDIR = ../../exec FC = ${COMP} # Use Intel FORTRAN Compiler, ifort LDFLAGS = -qopenmp #LDFLAGS = -qopenmp -Bstatic LIBS = ${LMP_LIB4} ${MDL_LIB4} ${W3NCO_LIB4} CMD = glmp_granalysis_2p5_ak PROFLIB = # To perform the default compilation, use the first line # To compile with flowtracing turned on, use the second line # To compile giving profile additonal information, use the third line # WARNING: SIMULTANEOUSLY PROFILING AND FLOWTRACING IS NOT RECOMMENDED FFLAGS = -O3 -nofree -i4 -real-size 32 -fpscomp logicals -fp-model strict -assume byterecl -qopenmp -traceback #FFLAGS = -O3 -nofree -i4 -real-size 32 -fpscomp logicals -fp-model strict -assume byterecl -qopenmp -check all -g -traceback #FFLAGS = -O3 -nofree -xHost -i4 -real-size 32 -fpscomp logicals -fp-model strict -assume byterecl -qopenmp -g -traceback -check all #FFLAGS = -O3 -nofree -xHost -i4 -real-size 32 -fpscomp logicals -fp-model strict -assume byterecl -qopenmp -check bounds -g -traceback DEBUG = -DDEBUG -g -traceback -check all #DEBUG = -DDEBUG -g -traceback -check bounds # Lines from here on down should not need to be changed. They are the # actual rules which make uses to build a.out. # all: $(CMD) $(CMD): $(OBJS) $(FC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) #$(OBJS): $(SRCS) # $(FC) $(FFLAGS) -c $< # Make the profiled version of the command and call it a.out.prof # $(CMD).prof: $(OBJS) $(FC) $(LDFLAGS) -o $(@) $(OBJS) $(PROFLIB) $(LIBS) clean: -rm -f $(OBJS) clobber: clean -rm -f $(CMD) $(CMD).prof void: clobber -rm -f $(SRCS) makefile debug: FFLAGS += $(DEBUG) debug: all install: -mv $(CMD) ${BINDIR}/ test: $(CMD) < input.txt > output.txt diff output.txt valid_output.txt