Added distclean option and passed COMPILER in recursive make.

This commit is contained in:
Paul Romano 2011-10-05 09:26:06 -04:00
parent 0fd3fcdcf7
commit 9717c887ca
3 changed files with 9 additions and 8 deletions

View file

@ -15,7 +15,7 @@ include OBJECTS
# User Options
#===============================================================================
COMPILER = intel
COMPILER = gfortran
DEBUG = no
PROFILE = no
OPTIMIZE = no
@ -32,14 +32,14 @@ USE_COARRAY = no
ifeq ($(COMPILER),intel)
F90 = ifort
F90FLAGS = -Ixml-fortran -Ixml-fortran/templates -fpp -warn
LDFLAGS =
LDFLAGS =
endif
# GNU Fortran compiler options
ifeq ($(COMPILER),gfortran)
F90 = gfortran
F90FLAGS = -cpp -Wall
F90FLAGS = -Ixml-fortran -Ixml-fortran/templates -cpp -Wall
LDFLAGS =
endif
@ -100,10 +100,13 @@ endif
all: xml-fortran $(program)
xml-fortran:
cd xml-fortran; make
cd xml-fortran/templates; make
cd xml-fortran; make COMPILER=$(COMPILER)
cd xml-fortran/templates; make COMPILER=$(COMPILER)
$(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:
@ -114,7 +117,7 @@ neat:
#===============================================================================
.SUFFIXES: .f90 .o
.PHONY: all clean neat xml-fortran
.PHONY: all xml-fortran clean neat distclean
%.o: %.f90
$(F90) $(F90FLAGS) -c $<

View file

@ -6,7 +6,6 @@ xml_fortran_objects = $(xml_fortran_source:.f90=.o)
# User Options
#===============================================================================
COMPILER = intel
DEBUG = no
#===============================================================================

View file

@ -5,7 +5,6 @@ objects = $(templates:.xml=.o)
# User Options
#===============================================================================
COMPILER = intel
DEBUG = no
#===============================================================================