--- trunk/GNUmakefile 2014/03/05 14:38:41 81 +++ trunk/GNUmakefile 2014/03/06 15:12:00 83 @@ -2,10 +2,6 @@ # This makefile builds LMDZE. -# Suffixes are: -# "f90" for free format, no preprocessing -# "f" for fixed format, no preprocessing - # 1. Source files src_root = . @@ -19,11 +15,9 @@ # 2. Objects and executable files -obj_ce0l := $(addsuffix .o, $(sort $(basename ${common_sources} ${src_ce0l_only}))) - -obj_gcm := $(addsuffix .o, $(sort $(basename ${common_sources} ${src_gcm_only}))) - -objects := $(addsuffix .o, $(basename ${sources})) +obj_ce0l := $(sort ${common_sources:.f=.o} ${src_ce0l_only:.f=.o}) +obj_gcm := $(sort ${common_sources:.f=.o} ${src_gcm_only:.f=.o}) +objects := $(sources:.f=.o) execut = ce0l gcm # 3. Compiler-dependent part @@ -34,11 +28,6 @@ # 4. Rules SHELL = bash -COMPILE.f90 = $(FC) $(F90FLAGS) $(TARGET_ARCH) -c - -%.o: %.f90 - $(COMPILE.f90) $(OUTPUT_OPTION) $< - .DELETE_ON_ERROR: .PHONY: all clean clobber depend all: ${execut} log @@ -50,7 +39,7 @@ gcm: ${obj_gcm} depend ${src_root}/depend.mk: - makedepf90 -Wmissing -Wconfused $(addprefix -I, ${VPATH}) -nosrc $(addprefix -u , netcdf numer_rec_95 netcdf95 nr_util jumble) ${sources} >${src_root}/depend.mk + makedepf90 -free -Wmissing -Wconfused $(addprefix -I, ${VPATH}) -nosrc $(addprefix -u , netcdf numer_rec_95 netcdf95 nr_util jumble) ${sources} >${src_root}/depend.mk ${src_root}/TAGS: ${sources} ctags -e --language-force=fortran -f $@ $^