2 |
|
|
3 |
# This makefile builds LMDZE. |
# This makefile builds LMDZE. |
4 |
|
|
|
# Suffixes are: |
|
|
# "f90" for free format, no preprocessing |
|
|
# "f" for fixed format, no preprocessing |
|
|
|
|
5 |
# 1. Source files |
# 1. Source files |
6 |
|
|
7 |
src_root = . |
src_root = . |
15 |
|
|
16 |
# 2. Objects and executable files |
# 2. Objects and executable files |
17 |
|
|
18 |
obj_ce0l := $(addsuffix .o, $(sort $(basename ${common_sources} ${src_ce0l_only}))) |
obj_ce0l := $(sort ${common_sources:.f=.o} ${src_ce0l_only:.f=.o}) |
19 |
|
obj_gcm := $(sort ${common_sources:.f=.o} ${src_gcm_only:.f=.o}) |
20 |
obj_gcm := $(addsuffix .o, $(sort $(basename ${common_sources} ${src_gcm_only}))) |
objects := $(sources:.f=.o) |
|
|
|
|
objects := $(addsuffix .o, $(basename ${sources})) |
|
21 |
execut = ce0l gcm |
execut = ce0l gcm |
22 |
|
|
23 |
# 3. Compiler-dependent part |
# 3. Compiler-dependent part |
28 |
# 4. Rules |
# 4. Rules |
29 |
|
|
30 |
SHELL = bash |
SHELL = bash |
|
COMPILE.f90 = $(FC) $(F90FLAGS) $(TARGET_ARCH) -c |
|
|
|
|
|
%.o: %.f90 |
|
|
$(COMPILE.f90) $(OUTPUT_OPTION) $< |
|
|
|
|
31 |
.DELETE_ON_ERROR: |
.DELETE_ON_ERROR: |
32 |
.PHONY: all clean clobber depend |
.PHONY: all clean clobber depend |
33 |
all: ${execut} log |
all: ${execut} log |
39 |
gcm: ${obj_gcm} |
gcm: ${obj_gcm} |
40 |
|
|
41 |
depend ${src_root}/depend.mk: |
depend ${src_root}/depend.mk: |
42 |
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 |
43 |
|
|
44 |
${src_root}/TAGS: ${sources} |
${src_root}/TAGS: ${sources} |
45 |
ctags -e --language-force=fortran -f $@ $^ |
ctags -e --language-force=fortran -f $@ $^ |