Incorporated Jaguar options into main Makefile.

This commit is contained in:
Paul Romano 2011-11-29 13:53:50 -05:00
parent bf889922cb
commit ef0284ffc0
2 changed files with 10 additions and 76 deletions

View file

@ -118,6 +118,16 @@ ifeq ($(USE_MPI),yes)
F90FLAGS += -DMPI
endif
#===============================================================================
# Special options for ORNL Jaguar supercomputer
#===============================================================================
HOSTNAME = $(shell hostname)
ifneq (,$(findstring jaguar,$(HOSTNAME)))
F90 = ftn
F90FLAGS += -DMPI
endif
#===============================================================================
# Targets
#===============================================================================

View file

@ -1,76 +0,0 @@
program = openmc
templates = $(wildcard xml-fortran/templates/*.o)
xml_fort = xml-fortran/xmlparse.o \
xml-fortran/read_xml_primitives.o \
xml-fortran/write_xml_primitives.o
#===============================================================================
# Object Files
#===============================================================================
include OBJECTS
#===============================================================================
# User Options
#===============================================================================
DEBUG = no
PROFILE = no
OPTIMIZE = no
#===============================================================================
# Compiler Options
#===============================================================================
F90 = ftn
F90FLAGS = -cpp -DMPI
LDFLAGS =
ifeq ($(DEBUG),yes)
F90FLAGS += -g -traceback -ftrapuv -fp-stack-check -check all
LDFLAGS += -g
endif
ifeq ($(PROFILE),yes)
F90FLAGS += -pg
LDFLAGS += -pg
endif
ifeq ($(OPTIMIZE),yes)
F90FLAGS += -O3
endif
#===============================================================================
# Targets
#===============================================================================
all: xml-fortran $(program)
xml-fortran:
cd xml-fortran; make F90=$(F90) F90FLAGS="$(F90FLAGS)"
cd xml-fortran/templates; make F90=$(F90) F90FLAGS="$(F90FLAGS)"
$(program): $(objects)
$(F90) $(objects) $(templates) $(xml_fort) -o $@ $(LDFLAGS)
distclean: clean
cd xml-fortran; make clean
cd xml-fortran/templates; make clean
clean:
@rm -f *.o *.mod $(program)
neat:
@rm -f *.o *.mod
#===============================================================================
# Rules
#===============================================================================
.SUFFIXES: .f90 .o
.PHONY: all xml-fortran clean neat distclean
%.o: %.f90
$(F90) -Ixml-fortran -Ixml-fortran/templates $(F90FLAGS) -c $<
#===============================================================================
# Dependencies
#===============================================================================
include DEPENDENCIES