Skip to content
Snippets Groups Projects
Makefile.inc.esd.argand 1.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Define our compilers.................................
    #
    # on geodyncomp, the defaults are OpenMPI (1.4.3), 
    # built with the GNU compilers
    F90 = gfortran
    F77 = gfortran
    cc = gcc
    
    # we take the standard ar
    AR=ar
    
    BITS=-gcc
    
    # Define MPI include files for ifort.
    # these should match the build of wsmp; see below.
    # for openmpi, these work
    MPI_INC=-I /usr/lib/openmpi/include
    MPI_LIB=-L /usr/lib/openmpi/lib -lmpi -lmpi_f77 -lmpi_f90
    
    INCLUDE = $(MPI_INC)
    
    # Define compiler flags:
    
    #F90FLAGS = -O3 -Wall -Werror -Warray-bounds -Wunderflow -fbacktrace -fdump-core -ffree-line-length-none -fcheck=all
    F90FLAGS = -O3 -Wall -Warray-bounds -Wunderflow -fbacktrace -fdump-core -ffree-line-length-none -fcheck=all
    F77FLAGS = $(F90FLAGS)
    # CFLAGS = -O3 -Wall -Werror
    CFLAGS = -O3 -Wall
    WSMP = -L ../../wsmp/wsmp-Linux64-GNU/lib/openmpi/ -lpwsmp64
    
    
    
    LIBS = \
     -LOCTREE -lOctree$(BITS) \
     -LNN -lnn_f$(BITS) \
     -LNN -lnn_c$(BITS) \
     -LCASCADE -lcascade$(BITS) \
     -LRESAMPLE -lresample$(BITS) \
     $(WSMP) -lblas \
     $(MPI_LIB) \
     -lpthread
    
    # The Makefiles look at compile output with this
    PAGER=less
    
    # compile rules.......................................
    #
    COMPILE_OUT=$(NAME)$(BITS).compile
    .SUFFIXES:
    .SUFFIXES: .o .c .f .f90
    .f90.o:
    	@echo "--"                                   >>$(COMPILE_OUT) 2>&1
    	@echo "$(F90) $(F90FLAGS) $(INCLUDE) -c $<" >>$(COMPILE_OUT) 2>&1
    	$(F90) $(F90FLAGS) $(INCLUDE) -c $<         >>$(COMPILE_OUT) 2>&1
    
    .f.o:
    	@echo "--"                                   >>$(COMPILE_OUT) 2>&1
    	@echo "$(F77) $(F77FLAGS) $(INCLUDE) -c $<" >>$(COMPILE_OUT) 2>&1
    	$(F77) $(F77FLAGS) $(INCLUDE) -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