/[lmdze]/trunk/GNUmakefile
ViewVC logotype

Annotation of /trunk/GNUmakefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 79 - (hide annotations)
Fri Feb 28 17:52:47 2014 UTC (10 years, 2 months ago) by guez
File size: 1781 byte(s)
Moved procedure iniconst inside module comconst. Removed useless
variables of module comconst: im, jm, lllm, imp1, jmp1, lllmm1,
lllmp1, lcl, cotot, unsim. Move definition of dtvr that was in
dynetat0 and etat0 to iniconst. Moved comparison of dtvr from day_step
and start.nc that was in gcm to dynetat0. Moved call to disvert out of
iniconst. Moved call to iniconst in gcm before call to dynetat0.

Removed unused argument pvteta of physiq (not used either in LMDZ).

1 guez 69 # This is a makefile for GNU make.
2 guez 3
3 guez 61 # This makefile builds LMDZE.
4    
5 guez 3 # Suffixes are:
6     # "f90" for free format, no preprocessing
7     # "f" for fixed format, no preprocessing
8    
9 guez 62 # 1. Source files
10    
11 guez 61 src_root = .
12 guez 3
13 guez 78 VPATH := ${src_root} $(addprefix ${src_root}/, $(shell cat ${src_root}/directories))
14 guez 3
15 guez 70 common_sources := $(shell cat ${src_root}/common_sources)
16 guez 79 src_ce0l_only := $(shell cat ${src_root}/src_ce0l_only)
17     src_gcm_only := $(shell cat ${src_root}/src_gcm_only)
18     sources = ${src_ce0l_only} ${src_gcm_only} ${common_sources}
19 guez 3
20 guez 79 # 2. Objects and executable files
21 guez 71
22 guez 79 obj_ce0l := $(addsuffix .o, $(sort $(basename ${common_sources} ${src_ce0l_only})))
23 guez 71
24 guez 79 obj_gcm := $(addsuffix .o, $(sort $(basename ${common_sources} ${src_gcm_only})))
25 guez 3
26 guez 79 objects := $(addsuffix .o, $(basename ${sources}))
27     execut = ce0l gcm
28 guez 62
29 guez 69 # 3. Compiler-dependent part
30 guez 70
31 guez 69 mode = debug
32 guez 78 include Compilers/${FC}_${mode}.mk
33 guez 3
34 guez 62 # 4. Rules
35    
36 guez 69 SHELL = bash
37 guez 61 COMPILE.f90 = $(FC) $(F90FLAGS) $(TARGET_ARCH) -c
38 guez 73
39 guez 61 %.o: %.f90
40     $(COMPILE.f90) $(OUTPUT_OPTION) $<
41    
42 guez 78 .DELETE_ON_ERROR:
43 guez 69 .PHONY: all clean clobber depend
44 guez 79 all: ${execut} log
45    
46     ${execut}:
47     $(FC) $(LDFLAGS) $^ $(LDLIBS) -o $@
48    
49 guez 70 ce0l: ${obj_ce0l}
50 guez 3 gcm: ${obj_gcm}
51    
52 guez 61 depend ${src_root}/depend.mk:
53 guez 79 makedepf90 -Wmissing -Wconfused $(addprefix -I, ${VPATH}) -nosrc $(addprefix -u , netcdf numer_rec_95 netcdf95 nr_util jumble) ${sources} >${src_root}/depend.mk
54 guez 61
55 guez 79 ${src_root}/TAGS: ${sources}
56 guez 78 ctags -e --language-force=fortran -f $@ $^
57 guez 3
58     clean:
59 guez 79 rm -f ${execut} ${objects} log
60 guez 3
61     clobber: clean
62 guez 62 rm -f *.mod ${src_root}/depend.mk ${src_root}/TAGS
63 guez 3
64 guez 79 log:
65     hostname >$@
66     ${FC} ${version_flag} >>$@ 2>&1
67 guez 69 echo -e "\nFC = ${FC}\n\nFFLAGS = ${FFLAGS}\n\nLDLIBS = ${LDLIBS}\n\nLDFLAGS = ${LDFLAGS}" >>$@
68 guez 62
69 guez 78 ifneq ($(MAKECMDGOALS), clobber)
70 guez 61 include ${src_root}/depend.mk
71 guez 78 endif
72 guez 3
73     -include grep.mk
74 guez 7 -include nag_rules.mk

  ViewVC Help
Powered by ViewVC 1.1.21