Updated Makefile for ORNL Jaguar.

This commit is contained in:
Paul Romano 2011-11-21 14:36:24 -05:00
parent 4ffd4bd160
commit bf1bbb9845

View file

@ -1,5 +1,10 @@
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
#===============================================================================
@ -33,16 +38,22 @@ ifeq ($(PROFILE),yes)
endif
ifeq ($(OPTIMIZE),yes)
F90FLAGS += -ipo -O3
F90FLAGS += -O3
endif
#===============================================================================
# Targets
#===============================================================================
all: $(program)
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) -o $@ $(LDFLAGS)
$(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:
@ -53,10 +64,10 @@ neat:
#===============================================================================
.SUFFIXES: .f90 .o
.PHONY: all clean neat
.PHONY: all xml-fortran clean neat distclean
%.o: %.f90
$(F90) $(F90FLAGS) -c $<
$(F90) -Ixml-fortran -Ixml-fortran/templates $(F90FLAGS) -c $<
#===============================================================================
# Dependencies