forked from nansencenter/enkf-topaz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
81 lines (66 loc) · 1.7 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
MPI = YES
include ./make.inc
SHELL = /bin/bash
VPATH = .:TMP
PROGS = EnKF
all: $(PROGS)
ENKF_SRC_F90 = \
qmpi.F90\
m_parameters.F90\
m_Generate_element_Si.F90\
mod_analysisfields.F90\
m_confmap.F90\
mod_measurement.F90\
m_oldtonew.F90\
m_random.F90\
m_spherdist.F90\
distribute.F90\
m_bilincoeff.F90\
m_get_mod_fld_nc.F90\
m_get_mod_fld.F90\
m_get_mod_cnfg.F90\
m_io_hycom.F90\
m_get_mod_nrens.F90\
m_insitu.F90\
m_local_analysis.F90\
m_obs.F90\
m_parse_blkdat.F90\
m_pivotp.F90\
m_point2nc.F90\
m_prep_4_EnKF.F90\
m_put_mod_fld.F90\
m_set_random_seed2.F90\
m_uobs.F90\
nfw.F90\
EnKF.F90
ENKF_SRC_F77 = mod_raw_io.F
ENKF_SRC_C = order.c
ENKF_OBJ = $(ENKF_SRC_C:.c=.o) $(ENKF_SRC_F77:.F=.o) $(ENKF_SRC_F90:.F90=.o)
# some fine tuning; add more dependancies when/if required
#
m_get_mod_fld.o: mod_raw_io.o nfw.o m_get_mod_fld_nc.o
m_obs.o: m_uobs.o
m_Generate_element_Si.o: m_parse_blkdat.o mod_measurement.o m_get_mod_fld.o m_insitu.o m_obs.o
m_insitu.o: nfw.o mod_measurement.o
m_local_analysis.o: mod_measurement.o m_point2nc.o m_parameters.o
m_get_mod_cnfg.o: qmpi.o mod_raw_io.o m_io_hycom.o
EnKF: $(ENKF_OBJ)
@echo "->EnKF"
@cd ./TMP ; $(LD) $(LINKFLAGS) -o ../EnKF $(ENKF_OBJ) $(LIBS)
$(ENKF_OBJ): makefile make.inc MODEL.CPP
clean:
@rm -f TMP/*.* $(PROGS)
%.o: %.F90
@echo " $*".F90
@rm -f ./TMP/$*.f90
@cat MODEL.CPP $*.F90 | $(CPP) $(CPPFLAGS) > ./TMP/$*.f90
@cd ./TMP ; $(CF90) -c $(FFLAGS) $(F90FLG) -o $*.o $*.f90
%.o: %.F
@echo " $*".F
@rm -f ./TMP/$*.f
@cat MODEL.CPP $*.F | $(CPP) $(CPPFLAGS) > ./TMP/$*.f
@cd ./TMP ; $(CF77) -c $(FFLAGS) $(F77FLG) -o $*.o $*.f
%.o: %.c
@echo " $*".c
@cd ./TMP ; mpiicc -c $(CFLAGS) -o $*.o -I.. ../$*.c
# @cd ./TMP ; $(CC) -c $(CFLAGS) -o $*.o -I.. ../$*.c