-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.den
executable file
·155 lines (135 loc) · 3.25 KB
/
Makefile.den
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
HEADERS= \
XMLDocument2.h \
calpop.h \
Map.h \
Matrices.h \
Numfunc.h \
ReadWrite.h \
Param.h \
Date.h \
SaveTimeArea.h \
SeapodymCoupled.h \
SimtunaFunc.h \
mytypes.h \
SeapodymDocConsole.h \
ctrace.h \
Utilities.h \
VarMatrices.h \
VarParamCoupled.h \
VarSimtunaFunc.h
SRCS= \
main_densities.cpp \
ad_buffers.cpp \
XMLDocument2.cpp \
VarParamCoupled.cpp \
seapodym_density.cpp \
Map.cpp \
Matrices.cpp \
Numfunc.cpp \
ReadWrite_TXT.cpp \
ReadWrite_DYM.cpp \
ReadWrite_fisheries.cpp \
Param.cpp \
Date.cpp \
SaveTimeArea.cpp \
SimtunaFunc.cpp \
VarParamCoupled_xinit.cpp \
VarParamCoupled_reset.cpp \
SeapodymCoupled_EditRunCoupled.cpp \
SeapodymCoupled_Funcs.cpp \
SeapodymCoupled_Forage.cpp \
Seapodym_OnRunDensity.cpp \
SeapodymCoupled_OnRunFirstStep.cpp \
SeapodymCoupled_OnReadForcing.cpp \
SeapodymCoupled_OnWriteOutput.cpp \
SeapodymCoupled_ReadTags.cpp \
SeapodymDocConsole_UpdateDisplay.cpp \
spawning_habitat.cpp \
juvenile_habitat.cpp \
mortality_sp.cpp \
caldia.cpp \
tridag_bet.cpp \
calrec_adre.cpp \
precalrec_juv.cpp \
calrec_precalrec.cpp \
total_exploited_biomass.cpp \
total_obs_catch_age.cpp \
spawning.cpp \
accessibility.cpp \
feeding_habitat.cpp \
seasonal_switch.cpp \
total_mortality_comp.cpp \
food_requirement_index.cpp \
dv_spawning_habitat.cpp \
dv_juvenile_habitat.cpp \
dv_mortality_sp.cpp \
dv_caldia.cpp \
dv_tridag_bet.cpp \
dv_calrec_adre.cpp \
dv_survival.cpp \
dv_precalrec_juv.cpp \
dv_calrec_precalrec.cpp \
dv_selectivity.cpp \
dv_spawning.cpp \
dv_accessibility.cpp \
dv_feeding_habitat.cpp \
dv_seasonal_switch.cpp \
dv_total_mortality_comp.cpp \
dv_total_pop.cpp \
dv_total_mortality_comp.cpp \
dv_food_requirement_index.cpp \
Calpop_caldia.cpp \
Calpop_calrec.cpp \
Calpop_InitCalPop.cpp \
Calpop_precaldia.cpp \
Calpop_precalrec.cpp \
Calpop_tridag.cpp \
Calpop_recompute.cpp \
hessian.cpp \
like.cpp
SRCPATH=DOM/src:src
INCPATH=-IDOM/src -Isrc
BINPATH=bin
##############################################################
OBJPATH=objs
ADMODEL_HOME=$(ADMB_HOME)
#DEBUG=-pg -g
DEBUG= -g
#production code
CFLAGS=-DTRUE=true -DFALSE=false -D __GNUDOS__ -Dlinux -O3 -DOPT_LIB -Wall -Wno-deprecated -I$(ADMODEL_HOME)/include -I/usr/include/libxml2 $(INCPATH)
###### with safe library ################################
#LFLAGS=-lm -L$(ADMODEL_HOME)/lib -ladmb -lstdc++ -lxml2
###### with optimized library ###########################
LFLAGS= -L$(ADMODEL_HOME)/lib -ladmbo -lstdc++ -lxml2 -lm
CC=gcc
LL=$(CC)
vpath %.cpp $(SRCPATH)
vpath %.h $(SRCPATH)
OBJECTS=$(SRCS:%.cpp=$(OBJPATH)/%.o)
##############################################################
export OBJECTS
export OBJPATH
export CFLAGS
export LFLAGS
export CC
export LL
##############################################################
all: init $(BINPATH)/seapodym_densities
init:
@test -d $(OBJPATH) || mkdir -v $(OBJPATH)
test: init $(OBJECTS)
make -f Makefile.test
docs: $(SRCS) $(HEADERS)
@doxygen
$(BINPATH)/seapodym_densities : $(OBJECTS)
$(LL) -o$@ $(DEBUG) $^ $(LFLAGS)
$(OBJPATH)/%.o : %.cpp
$(CC) -o$@ $(DEBUG) -c $(CFLAGS) $(filter %.cpp, $^)
$(OBJECTS) : $(HEADERS)
clean:
@rm -vf $(OBJECTS) $(BINPATH)/seapodym_densities
@rm -vf $(OBJECTS) $(BINPATH)/seapodym_densities.exe
@rm -vf $(OBJECTS) $(BINPATH)/TestSeapodymCoupled
@rm -vrf $(OBJPATH)
#@rm -vrf docs/code-dox
#@rm -vf gmon.out