Skip to content
Snippets Groups Projects
Makefile.mahone 1.6 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
    # The default - OpenMPI 1.2.7
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    F90    = mpif90
    F77    = mpif77
    CC     = mpicc
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # wsmp wants mpich, so we try this
    F90    = /usr/local/mpich.pgi.64/bin/mpif90
    F77    = /usr/local/mpich.pgi.64/bin/mpif77
    CC     = /usr/local/mpich.pgi.64/bin/mpicc
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    # wsmp lives here.
    #
    WSMP_DIR   = /home/dguptill/software/wsmp/wsmp-Linux/lib/X86_64/PGI
    
    # for 64 bit compile..................................
    #
    AR=ar
    OPTIONS=
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    PGPLOT=/home/dguptill/software/pgplot-5.2.2
    WSMP_LIB=-L$(WSMP_DIR) -lpwsmp64
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    # Define FORTRAN compiler flags.......................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    FFLAGS=-fastsse -pc 64 -Kieee -tp amd64
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    # Define C compiler flags.............................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    CFLAGS=-fastsse -pc 64 -Kieee -tp amd64
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    # compile rules.......................................
    #
    COMPILE_OUT=$(NAME).compile
    .SUFFIXES:
    .SUFFIXES: .o .c .f .f90
    .f90.o:
    	@echo "--"                      >>$(COMPILE_OUT) 2>&1
    	@echo "$(F90) $(FFLAGS) -c $<"  >>$(COMPILE_OUT) 2>&1
    	$(F90) $(FFLAGS) -c $<          >>$(COMPILE_OUT) 2>&1
    
    .f.o:
    	@echo "--"                      >>$(COMPILE_OUT) 2>&1
    	@echo "$(F90) $(FFLAGS) -c $<"  >>$(COMPILE_OUT) 2>&1
    	$(F90) $(FFLAGS) -c $<          >>$(COMPILE_OUT) 2>&1
    
    .c.o:
    	@echo "--"                     >>$(COMPILE_OUT) 2>&1
    	@echo "$(CC) $(CFLAGS) -c $<"  >>$(COMPILE_OUT) 2>&1
    	$(CC) $(CFLAGS) -c $<          >>$(COMPILE_OUT) 2>&1
    
    
    # Libraries................
    #
    
    LIBS = \
     -LOCTREE -lOctree$(BITS) \
     -LNN -lnn_f$(BITS) \
     -LNN -lnn_c$(BITS) \
     -LCASCADE -lcascade$(BITS) \
     -LRESAMPLE -lresample$(BITS) \
     -L$(PGPLOT) -lpgplot \
     -L/usr/X11R6/lib64 -lX11 \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
     $(WSMP_LIB) \
     -lacml -lpthread