Skip to content
Snippets Groups Projects
Makefile.p690 2.75 KiB
Newer Older
  • Learn to ignore specific revisions
  • Douglas Guptill's avatar
    Douglas Guptill committed
    # Define our compilers.................................
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    F90    = mpxlf90_r
    F77    = mpxlf_r
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    CC     = mpcc_r
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # wsmp lives here.
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    WSMP_DIR   = /home/beaumnt1/software/wsmp/lib/Power4
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # for 32 bit compile..................................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    AR=ar
    BITS=-q32
    OPTIONS = -bmaxdata:0x80000000 -bhalt:0 -bnoquiet
    PGPLOT = /home/beaumnt1/software/pgplot-5.2.2
    WSMP_LIB = -L$(WSMP_DIR) -lpwsmp
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # for 64 bit compile..................................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    AR=ar -X 64
    BITS=-q64
    OPTIONS = -b 64 -bmaxdata:0x80000000 -bhalt:0 -bnoquiet
    PGPLOT = /home/beaumnt1/software/pgplot-5.2.2-q64
    WSMP_LIB = -L$(WSMP_DIR) -lpwsmp64
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # Define FORTRAN compiler flags.......................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # I would like to add -u here, but Wow!  Just try it.
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # FLAGS  = -O3 -qstrict -Q -qarch=auto -qtune=auto -qfloat=nomaf:nofold
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # Trouble on the p690; time to get serious.
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # douar bombs quickly; removing qflttrap=inexact
    # -qport options might be worth looking at later
    # -qwarn64 casues interesting messages in NN
    #
    # for xlf 8.1
    # -qflttrap=overflow:underflow:zerodivide:invalid:enable 
    # for xlf 10.1
    # -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable 
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # take -qextchk out for the final compile
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    FFLAGS  = -g -O2 -qstrict -Q $(BITS)  -qarch=auto -qtune=auto -qmaxmem=-1 \
    -qcheck -qwarn64 \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qfloat=nomaf:nofold:norsqrt:strictnmaf \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qsigtrap \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qhalt=s -qextchk
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # Define C compiler flags.............................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # take -qextchk out for the final compile
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    CFLAGS  = -g -O2 -qstrict -Q $(BITS)  -qarch=auto -qtune=auto \
    -qcheck -qwarn64 \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qfloat=nomaf:nofold:norsqrt \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qhalt=e -qextchk
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # compile rules.......................................
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    COMPILE_OUT=$(NAME)$(BITS).compile
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    .SUFFIXES:
    .SUFFIXES: .o .c .f .f90
    .f90.o:
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "--"                                    >>$(COMPILE_OUT) 2>&1
    	@echo "xlf is `which xlf`"                    >>$(COMPILE_OUT) 2>&1
    	@echo "$(F90) -qsuffix=f=f90 $(FFLAGS) -c $<" >>$(COMPILE_OUT) 2>&1
    	$(F90) -qsuffix=f=f90 $(FFLAGS) -c $<         >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    .f.o:
    	@echo "--"                                   >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "xlf is `which xlf`"                   >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "$(F77) -qsuffix=f=f $(FFLAGS) -c $<"  >>$(COMPILE_OUT) 2>&1
    	$(F77) -qsuffix=f=f $(FFLAGS) -c $<          >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    .c.o:
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "--"                     >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "$(CC) $(CFLAGS) -c $<"  >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	$(CC) $(CFLAGS) -c $<          >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # Libraries................
    #
    # libs removed on p690...
    # -lacml
    # -lpthread 
    
    LIBS = \
    -LOCTREE -lOctree$(BITS) \
    -LCASCADE -lcascade$(BITS) \
    -LRESAMPLE -lresample$(BITS) \
    -LNN -lnn$(BITS) \
    $(WSMP_LIB) \
    -L$(PGPLOT) -lpgplot \
    -L/usr/lpp/X11 -lX11