1 | ################################################################################ |
---|
2 | ################### Projet xios - xmlioserver ##################### |
---|
3 | # # |
---|
4 | # * © OZDOBA Hervé (herve.ozdoba@lsce.ipsl.fr) * # |
---|
5 | # * © MEURDESOIF Yann (yann.meurdesoif@cea.fr) * # |
---|
6 | # * Avril 2010 - Octobre 2011 * # |
---|
7 | # # |
---|
8 | ################################################################################ |
---|
9 | |
---|
10 | ################################# Configuration ################################ |
---|
11 | |
---|
12 | DEBUG = yes |
---|
13 | MCOLOR = no |
---|
14 | SHOWCMD = yes |
---|
15 | VTK = yes |
---|
16 | GUI = no |
---|
17 | NPROC = 1 |
---|
18 | #VERSION = 4 |
---|
19 | CSUITE = gnu |
---|
20 | PFORME = fedora-wk |
---|
21 | FORTEXT = .f90 |
---|
22 | DEV_PATH = $(PWD) |
---|
23 | |
---|
24 | ifeq ($(HOSTNAME), localhost.localdomain) |
---|
25 | PFORME = fedora-wk |
---|
26 | CSUITE = gnu |
---|
27 | endif |
---|
28 | |
---|
29 | ifeq ($(HOSTNAME), gaia) |
---|
30 | PFORME = fedora-wk |
---|
31 | CSUITE = gnu |
---|
32 | endif |
---|
33 | |
---|
34 | ifeq ($(HOSTNAME), lsce4063.extra.cea.fr) |
---|
35 | PFORME = fedora-wk |
---|
36 | endif |
---|
37 | |
---|
38 | ifeq ($(HOST), mercure01) |
---|
39 | CSUITE = sx |
---|
40 | PFORME = sx8-mercure-wk |
---|
41 | endif |
---|
42 | |
---|
43 | ifeq ($(HOSTNAME), platine1076) |
---|
44 | CSUITE = gnu |
---|
45 | PFORME = platine-wk |
---|
46 | endif |
---|
47 | |
---|
48 | |
---|
49 | ifeq ($(SHOWCMD), no) |
---|
50 | A = @ |
---|
51 | endif |
---|
52 | |
---|
53 | #################################### Chemins ################################### |
---|
54 | |
---|
55 | ifeq ($(PFORME), platine-wk) |
---|
56 | NETCDF_PATH = /applications/netcdf-4.1.1 |
---|
57 | INTEL_PATH = |
---|
58 | BOOST_PATH = $(DEV_PATH)/extra/boost-1.44 |
---|
59 | RXML_PATH = $(DEV_PATH)/extra/rapidxml-1.13 |
---|
60 | HDF5_PATH = /applications/hdf5-1.8.5 |
---|
61 | MPI_PATH = /opt/mpi/mpibull2-1.3.9-18.s |
---|
62 | |
---|
63 | DEFINE += -D MPIBULL_SKIP_MPICXX |
---|
64 | endif |
---|
65 | |
---|
66 | ifeq ($(PFORME), sx8-mercure-wk) |
---|
67 | NETCDF_PATH = $(DEV_PATH)/netcdf4 |
---|
68 | INTEL_PATH = |
---|
69 | BOOST_PATH = $(DEV_PATH)/extra/boost-1.44 |
---|
70 | RXML_PATH = $(DEV_PATH)/extra/rapidxml-1.13 |
---|
71 | HDF5_PATH = $(DEV_PATH)/hdf5 |
---|
72 | MPI_PATH = /applications/mpisx-8.0.10 |
---|
73 | endif |
---|
74 | |
---|
75 | ifeq ($(PFORME), fedora-wk) |
---|
76 | NETCDF_PATH = $(DEV_PATH)/extra/netcdf4 |
---|
77 | INTEL_PATH = /work/intel/composerxe |
---|
78 | BOOST_PATH = $(DEV_PATH)/extra/boost-1.44 |
---|
79 | RXML_PATH = $(DEV_PATH)/extra/rapidxml-1.13 |
---|
80 | HDF5_PATH = $(DEV_PATH)/extra/hdf5 |
---|
81 | MPI_PATH = /usr/lib/openmpi |
---|
82 | endif |
---|
83 | |
---|
84 | ifeq ($(HOSTNAME), gaia) |
---|
85 | BOOST_PATH = /usr/include |
---|
86 | endif |
---|
87 | |
---|
88 | ######################## Outils de compilations standard ####################### |
---|
89 | |
---|
90 | COMPTOOL = $(CSUITE)-$(PFORME) |
---|
91 | VERSTR = version $(CSUITE) |
---|
92 | |
---|
93 | |
---|
94 | RMDIR = $(A)rm -rf |
---|
95 | REMOVE = $(A)rm -f |
---|
96 | COPY = $(A)cp -f |
---|
97 | MKDIR = $(A)mkdir -p |
---|
98 | |
---|
99 | ifeq ($(COMPTOOL), sx-sx8-mercure-wk) |
---|
100 | CDEP = $(A)g++ |
---|
101 | CCPP = $(A)sxc++ |
---|
102 | CFORT = $(A)sxf90 |
---|
103 | LINK = $(A)sxmpif90 -nofor-main |
---|
104 | AR = $(A)sxar |
---|
105 | T2F = # indisponible |
---|
106 | DOX = # indisponible |
---|
107 | TAR = # indisponible |
---|
108 | GZIP = # indisponible |
---|
109 | EXNET = # indisponible |
---|
110 | MPIRUN = $(A)$(MPI_PATH)/bin/mpirun |
---|
111 | endif |
---|
112 | |
---|
113 | |
---|
114 | ifeq ($(COMPTOOL), intel-platine-wk) |
---|
115 | CDEP = $(A)icc |
---|
116 | CCPP = $(A)icc |
---|
117 | CFORT = $(A)ifort |
---|
118 | LINK = $(A)$(MPI_PATH)/bin/mpif90 -nofor-main |
---|
119 | AR = $(A)ar |
---|
120 | T2F = # indisponible |
---|
121 | DOX = # indisponible |
---|
122 | TAR = # indisponible |
---|
123 | GZIP = # indisponible |
---|
124 | EXNET = # indisponible |
---|
125 | MPIRUN = $(A)$(MPI_PATH)/bin/mpirun |
---|
126 | endif |
---|
127 | |
---|
128 | ifeq ($(COMPTOOL), gnu-fedora-wk) |
---|
129 | CDEP = $(A)g++ |
---|
130 | CCPP = $(A)g++ |
---|
131 | CFORT = $(A)gfortran |
---|
132 | LINK = $(A)$(MPI_PATH)/bin/mpif90 |
---|
133 | AR = $(A)ar |
---|
134 | T2F = $(A)txt2tags |
---|
135 | DOX = $(A)doxygen -s |
---|
136 | TAR = $(A)tar -cf |
---|
137 | GZIP = $(A)gzip -9 -q |
---|
138 | EXNET = $(A)firefox |
---|
139 | MPIRUN = $(A)$(MPI_PATH)/bin/mpirun |
---|
140 | endif |
---|
141 | |
---|
142 | ifeq ($(COMPTOOL), intel-fedora-wk) |
---|
143 | CDEP = $(A)icc |
---|
144 | CCPP = $(A)icc |
---|
145 | CFORT = $(A)ifort |
---|
146 | LINK = $(A)$(MPI_PATH)/bin/mpif90 |
---|
147 | AR = $(A)ar |
---|
148 | T2F = $(A)txt2tags |
---|
149 | DOX = $(A)doxygen -s |
---|
150 | TAR = $(A)tar -cvf |
---|
151 | GZIP = $(A)gzip -9 -q |
---|
152 | EXNET = $(A)firefox |
---|
153 | MPIRUN = $(A)$(MPI_PATH)/bin/mpirun |
---|
154 | endif |
---|
155 | |
---|
156 | ################################ Sortie couleur ################################ |
---|
157 | |
---|
158 | C_Black = "\033[0;30m" |
---|
159 | C_Blue = "\033[0;34m" |
---|
160 | C_Green = "\033[0;32m" |
---|
161 | C_Cyan = "\033[0;36m" |
---|
162 | C_Red = "\033[0;31m" |
---|
163 | C_Purple = "\033[0;35m" |
---|
164 | C_Brown = "\033[0;33m" |
---|
165 | C_Light_Gray = "\033[0;37m" |
---|
166 | C_Dark_Gray = "\033[1;30m" |
---|
167 | C_Light_Blue = "\033[1;34m" |
---|
168 | C_Light_Green = "\033[1;32m" |
---|
169 | C_Light_Cyan = "\033[1;36m" |
---|
170 | C_Light_Red = "\033[1;31m" |
---|
171 | C_Light_Purple = "\033[1;35m" |
---|
172 | C_Yellow = "\033[1;33m" |
---|
173 | C_White = "\033[1;37m" |
---|
174 | NO_COLOUR = "\033[0m" |
---|
175 | |
---|
176 | ifeq ($(MCOLOR), yes) |
---|
177 | COLORMSG = @echo -e "\033[1m" $1 $2 $(NO_COLOUR) |
---|
178 | else |
---|
179 | COLORMSG = @echo $2 |
---|
180 | endif |
---|
181 | |
---|
182 | ############################# Répertoire du projet ############################# |
---|
183 | |
---|
184 | WK_PATH = $(DEV_PATH)/wk |
---|
185 | |
---|
186 | OBJ_PATH = $(WK_PATH)/obj |
---|
187 | BIN_PATH = $(WK_PATH)/bin |
---|
188 | LIB_PATH = $(WK_PATH)/lib |
---|
189 | DOC_PATH = $(WK_PATH)/doc |
---|
190 | DEP_PATH = $(WK_PATH)/dep |
---|
191 | INC_PATH = $(WK_PATH)/inc |
---|
192 | DATA_PATH = $(WK_PATH)/data |
---|
193 | CONF_PATH = $(WK_PATH)/conf |
---|
194 | DEF_PATH = $(WK_PATH)/def |
---|
195 | |
---|
196 | SRC_PATH = $(DEV_PATH)/src$(VERSION)/xmlio |
---|
197 | |
---|
198 | # Sous-répertoires des sources : |
---|
199 | |
---|
200 | FSRC_PATH = $(SRC_PATH)/fortran |
---|
201 | CSRC_PATH = $(SRC_PATH)/iface |
---|
202 | |
---|
203 | CONF_PATH = $(SRC_PATH)/config |
---|
204 | NODE_PATH = $(SRC_PATH)/node |
---|
205 | FUNC_PATH = $(SRC_PATH)/functor |
---|
206 | DATE_PATH = $(SRC_PATH)/date |
---|
207 | INPT_PATH = $(SRC_PATH)/input |
---|
208 | OUPT_PATH = $(SRC_PATH)/output |
---|
209 | MNGR_PATH = $(SRC_PATH)/manager |
---|
210 | MPII_PATH = $(SRC_PATH)/mpi |
---|
211 | NCDF_PATH = $(SRC_PATH)/netcdf |
---|
212 | GUI_PATH = $(SRC_PATH)/qt |
---|
213 | VTK_PATH = $(SRC_PATH)/vtk |
---|
214 | XML_PATH = $(SRC_PATH)/xml |
---|
215 | |
---|
216 | |
---|
217 | FAKE_PATH = $(SRC_PATH)/fake_client |
---|
218 | |
---|
219 | ################################################################################ |
---|
220 | |
---|
221 | VPATH = $(DEP_PATH):$(SRC_PATH):$(CSRC_PATH):$(NODE_PATH):$(XML_PATH)\ |
---|
222 | :$(FUNC_PATH):$(DATE_PATH):$(GUI_PATH):$(VTK_PATH):$(INPT_PATH):$(NCDF_PATH)\ |
---|
223 | :$(OUPT_PATH):$(MNGR_PATH):$(FAKE_PATH):$(FSRC_PATH):$(CONF_PATH):$(MPII_PATH) |
---|
224 | |
---|
225 | ######################## Outils de traitements internes ######################## |
---|
226 | |
---|
227 | CPPROC = $(CSRC_PATH)/preprocess_cpp.sh |
---|
228 | F90ROC = $(FSRC_PATH)/preprocess_f03.sh |
---|
229 | |
---|
230 | ####################### Chemins vers la bibliothÚque BOOST ##################### |
---|
231 | |
---|
232 | INCLUDE = -I $(BOOST_PATH) |
---|
233 | |
---|
234 | ####################### Chemins vers la bibliothÚque RAPIDXML ################## |
---|
235 | |
---|
236 | INCLUDE += -I $(RXML_PATH) |
---|
237 | |
---|
238 | ####################### Chemins vers la bibliothÚque VTK ####################### |
---|
239 | |
---|
240 | ifeq ($(VTK), yes) |
---|
241 | INCLUDE += -I /usr/include/vtk |
---|
242 | LIBS += -lvtkCommon -lvtkIO -lvtkFiltering -lvtkRendering -lvtkHybrid |
---|
243 | DEFINE += -D XIOS_VTK |
---|
244 | endif |
---|
245 | |
---|
246 | ####################### Chemins vers la bibliothÚque NETCDF #################### |
---|
247 | |
---|
248 | NETCDF_BIN = $(NETCDF_PATH)/bin |
---|
249 | NETCDF_LIB = $(NETCDF_PATH)/lib |
---|
250 | NETCDF_INCL = $(NETCDF_PATH)/include |
---|
251 | |
---|
252 | HDF5_INCL = $(HDF5_PATH)/include |
---|
253 | HDF5_LIB = $(HDF5_PATH)/lib |
---|
254 | |
---|
255 | LIBS_PATH += -L $(NETCDF_LIB) -L $(HDF5_LIB) |
---|
256 | LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz |
---|
257 | INCLUDE += -I $(NETCDF_INCL) |
---|
258 | |
---|
259 | ####################### Chemins vers la bibliothÚque MPI ####################### |
---|
260 | |
---|
261 | MPI_LIB = $(MPI_PATH)/bin |
---|
262 | MPI_LIB = $(MPI_PATH)/lib |
---|
263 | MPI_INCL = $(MPI_PATH)/include |
---|
264 | |
---|
265 | ifeq ($(PFORME), fedora-wk) |
---|
266 | MPI_INCL = /usr/include/openmpi-i386 |
---|
267 | endif |
---|
268 | |
---|
269 | LIBS_PATH += -L $(MPI_LIB) |
---|
270 | LIBS += -lmpi |
---|
271 | INCLUDE += -I $(MPI_INCL) |
---|
272 | FFLAGS += -I $(MPI_INCL) |
---|
273 | |
---|
274 | ifeq ($(PFORME), fedora-wk) |
---|
275 | LIBS += -lmpi_cxx |
---|
276 | endif |
---|
277 | |
---|
278 | ################################ VARIABLES ##################################### |
---|
279 | |
---|
280 | INCLUDE += -I $(INC_PATH) |
---|
281 | DEFINE += -D __XIOS_LIBRARY |
---|
282 | |
---|
283 | LIBS += -lstdc++ |
---|
284 | |
---|
285 | ifeq ($(COMPTOOL), intel-fedora-wk) |
---|
286 | LIBS_PATH += -L $(INTEL_PATH)/lib |
---|
287 | LIBS += -lifcore -lintlc |
---|
288 | endif |
---|
289 | |
---|
290 | NODEPS = clean clean-all dir-tree |
---|
291 | |
---|
292 | FFLAGS += -D __XIOS_LIBRARY |
---|
293 | CFLAGS += $(DEFINE) $(INCLUDE) |
---|
294 | LDFLAGS += $(LIBS_PATH) $(LIBS) |
---|
295 | |
---|
296 | ifeq ($(CSUITE), intel) |
---|
297 | FFLAGS += -module $(LIB_PATH) |
---|
298 | CFLAGS += -ansi -diag-disable 1125 -diag-disable 279 |
---|
299 | endif |
---|
300 | |
---|
301 | ifeq ($(CSUITE), gnu) |
---|
302 | FFLAGS += -J $(LIB_PATH) |
---|
303 | CFLAGS += -ansi -W -Wall -Wno-unused-parameter -Wno-long-long -Wno-deprecated |
---|
304 | endif |
---|
305 | |
---|
306 | ifeq ($(CSUITE), sx) |
---|
307 | DEF_SX = -D BOOST_NO_IS_ABSTRACT -D BOOST_NO_RVALUE_REFERENCES -D BOOST_NO_STATIC_ASSERT |
---|
308 | DEFLAGS = $(DEFINE) $(INCLUDE) $(DEF_SX) |
---|
309 | CFLAGS += -K exceptions -K rtti -Xp -size_t64 $(DEF_SX) |
---|
310 | FFLAGS += -f2003 cbind -size_t64 |
---|
311 | else |
---|
312 | DEFLAGS = $(CFLAGS) |
---|
313 | endif |
---|
314 | |
---|
315 | ifeq ($(DEBUG), yes) |
---|
316 | CFLAGS += -D __XIOS_DEBUG -g |
---|
317 | endif |
---|
318 | |
---|
319 | EXENAME = $(BIN_PATH)/xmlioserver.exe |
---|
320 | LIBSTATIC = $(LIB_PATH)/libxmlioserver.a |
---|
321 | |
---|
322 | ################################### SOURCES #################################### |
---|
323 | |
---|
324 | # Source de l'interface C (contenue dans dans le dossier src/iface) |
---|
325 | ICSOURCE = interface |
---|
326 | |
---|
327 | # Sources de l'interface fortran (contenues dans le dossier src/fortran) |
---|
328 | IFSOURCE = ixmlioserver |
---|
329 | |
---|
330 | # Sources de la bibliothÚque (contenues dans le dossier src) |
---|
331 | LSOURCE = object exception \ |
---|
332 | date calendar duration calendar_util \ |
---|
333 | attribute attribute_map attribute_template \ |
---|
334 | object_factory group_factory \ |
---|
335 | indent xml_node xml_parser \ |
---|
336 | buffer linear_buffer circular_buffer \ |
---|
337 | buffer_list buffer_pair \ |
---|
338 | data_treatment data_output \ |
---|
339 | rebuild functor client server configure |
---|
340 | |
---|
341 | # Sources des gestionnaires (contenues dans le dossier manager) |
---|
342 | MSOURCE = tree_manager mpi_manager xios_manager |
---|
343 | |
---|
344 | # Sources pour le traitement des noeuds xml (contenues dans le dossier node) |
---|
345 | NSOURCE = axis domain field file grid context |
---|
346 | |
---|
347 | # Sources pour les opérations à  effectuer sur les champs (contenues dans le dossier functor) |
---|
348 | FSOURCE = once instant average |
---|
349 | |
---|
350 | # Sources contenant les différents type de calendriers (contenues dans le dossier date) |
---|
351 | DSOURCE = julian gregorian noleap allleap d360 |
---|
352 | |
---|
353 | # Sources pour l'interface graphique (contenues dans le dossier qt) |
---|
354 | ifeq ($(GUI), yes) |
---|
355 | QSOURCE = # vidé # |
---|
356 | endif |
---|
357 | |
---|
358 | # Sources pour le lecteur vtk (contenues dans le dossier vtk) |
---|
359 | ifeq ($(VTK), yes) |
---|
360 | VSOURCE = lscereader |
---|
361 | endif |
---|
362 | |
---|
363 | # Sources pour les entrées (contenues dans le dossier input) |
---|
364 | ISOURCE = inetcdf4 nc4_data_input |
---|
365 | |
---|
366 | # Sources pour les sorties (contenues dans le dossier output) |
---|
367 | OSOURCE = onetcdf4 nc4_data_output |
---|
368 | |
---|
369 | # Source des faux clients |
---|
370 | TSOURCE = fake_nemo fake_lmdz fake_orchidee |
---|
371 | |
---|
372 | # Nom du fichier contenant les points d'entrée des programmes |
---|
373 | MAINNAME = main |
---|
374 | |
---|
375 | DOC_T2T = $(wildcard *.t2t) |
---|
376 | COM_T2T = $(patsubst %.t2t,%.html,$(DOC_T2T)) |
---|
377 | |
---|
378 | PREPROC = $(FSRC_PATH)/$(IFSOURCE)$(FORTEXT) $(CSRC_PATH)/$(ICSOURCE).cpp |
---|
379 | |
---|
380 | ifeq ($(VERSION), 4) |
---|
381 | PREPROC = #vide |
---|
382 | endif |
---|
383 | |
---|
384 | ############################## Modifications ################################## |
---|
385 | |
---|
386 | AHEADERS = \ |
---|
387 | $(notdir $(wildcard $(SRC_PATH)/*/*.conf))\ |
---|
388 | $(notdir $(wildcard $(SRC_PATH)/*/*.hpp))\ |
---|
389 | $(notdir $(wildcard $(SRC_PATH)/*.hpp)) |
---|
390 | |
---|
391 | HEADERS = $(addprefix $(INC_PATH)/, $(AHEADERS)) |
---|
392 | |
---|
393 | ELEMS_FOR = $(TSOURCE) $(IFSOURCE) |
---|
394 | |
---|
395 | ifeq ($(VERSION), 4) |
---|
396 | ELEMS_FOR = #vide |
---|
397 | endif |
---|
398 | |
---|
399 | ELEMS_CPP = $(ICSOURCE) $(OSOURCE) $(ISOURCE) $(LSOURCE) \ |
---|
400 | $(VSOURCE) $(QSOURCE) $(DSOURCE) $(FSOURCE) \ |
---|
401 | $(NSOURCE) $(MSOURCE) |
---|
402 | |
---|
403 | ifeq ($(VERSION), 4) |
---|
404 | ELEMS_CPP = object exception xml_node xml_parser inetcdf4 inetcdf4_adv lscereader mpi_interface |
---|
405 | endif |
---|
406 | |
---|
407 | ELEMS_ALL = $(ELEMS_CPP) $(ELEMS_FOR) |
---|
408 | |
---|
409 | OBJECTS = $(addprefix $(OBJ_PATH)/, $(addsuffix .o, $(ELEMS_ALL))) $(OBJ_PATH)/impi_interface.o |
---|
410 | ifeq ($(VERSION), 4) |
---|
411 | OBJECTS = $(addprefix $(OBJ_PATH)/, $(addsuffix .o, $(ELEMS_ALL))) |
---|
412 | endif |
---|
413 | |
---|
414 | DEPENDS = $(addprefix $(DEP_PATH)/, $(addsuffix .d, $(ELEMS_CPP))) |
---|
415 | |
---|
416 | ################################### RÚgles ##################################### |
---|
417 | all: depend build |
---|
418 | |
---|
419 | build: preproc $(EXENAME) |
---|
420 | |
---|
421 | .PHONY: t2t |
---|
422 | t2t: $(COM_T2T) |
---|
423 | |
---|
424 | .PHONY: dir-tree |
---|
425 | dir-tree : |
---|
426 | $(MKDIR) $(OBJ_PATH) |
---|
427 | $(MKDIR) $(BIN_PATH) |
---|
428 | $(MKDIR) $(LIB_PATH) |
---|
429 | $(MKDIR) $(DOC_PATH) |
---|
430 | $(MKDIR) $(DEP_PATH) |
---|
431 | $(MKDIR) $(INC_PATH) |
---|
432 | $(MKDIR) $(DATA_PATH) |
---|
433 | $(MKDIR) $(CONF_PATH) |
---|
434 | $(MKDIR) $(DEF_PATH) |
---|
435 | |
---|
436 | .PHONY: run |
---|
437 | run: all clean-dat |
---|
438 | $(call COLORMSG, $(C_White),"Exécution du serveur d'E/S de l'IPSL ($(VERSTR) C++) ...") |
---|
439 | $(MPIRUN) -np $(NPROC) $(EXENAME) |
---|
440 | |
---|
441 | .PHONY: depend |
---|
442 | depend: preproc $(DEPENDS) cheaders |
---|
443 | |
---|
444 | .PHONY: cheaders |
---|
445 | cheaders: $(HEADERS) |
---|
446 | |
---|
447 | .PHONY: preproc |
---|
448 | preproc : $(PREPROC) |
---|
449 | |
---|
450 | .PHONY: clean-depend |
---|
451 | clean-depend: |
---|
452 | $(REMOVE) $(DEP_PATH)/*.d |
---|
453 | $(REMOVE) $(DEP_PATH)/mark |
---|
454 | |
---|
455 | clean-t2t: |
---|
456 | #$(REMOVE) $(COM_T2T) |
---|
457 | |
---|
458 | .PHONY: clean-dir |
---|
459 | clean-dir: |
---|
460 | $(RMDIR) $(WK_PATH) |
---|
461 | |
---|
462 | clean-h: |
---|
463 | $(REMOVE) $(INC_PATH)/*.hpp |
---|
464 | $(REMOVE) $(INC_PATH)/*.conf |
---|
465 | |
---|
466 | clean-doc: clean-t2t |
---|
467 | $(RMDIR) $(DOC_PATH)/html |
---|
468 | $(REMOVE) $(DEV_PATH)/doxygen.log |
---|
469 | |
---|
470 | clean-exe: |
---|
471 | $(REMOVE) $(BIN_PATH)/*.exe |
---|
472 | |
---|
473 | clean-lib: |
---|
474 | $(REMOVE) $(LIB_PATH)/*.a |
---|
475 | |
---|
476 | clean-mod: |
---|
477 | $(REMOVE) $(LIB_PATH)/*.mod |
---|
478 | |
---|
479 | clean-dll: |
---|
480 | $(REMOVE) $(BIN_PATH)/*.dll |
---|
481 | |
---|
482 | clean-gen: |
---|
483 | $(REMOVE) $(SRC_PATH)/iface/interface.cpp |
---|
484 | $(REMOVE) $(SRC_PATH)/fortran/ixmlioserver$(FORTEXT) |
---|
485 | |
---|
486 | clean-obj: |
---|
487 | $(REMOVE) $(OBJ_PATH)/*.o |
---|
488 | |
---|
489 | clean-dat: |
---|
490 | $(REMOVE) $(DATA_PATH)/*.dat |
---|
491 | #$(REMOVE) $(DATA_PATH)/*.bin |
---|
492 | $(REMOVE) $(DATA_PATH)/*.nc |
---|
493 | $(REMOVE) $(DATA_PATH)/def/* |
---|
494 | |
---|
495 | .PHONY: clean |
---|
496 | clean : clean-obj \ |
---|
497 | clean-mod \ |
---|
498 | clean-gen \ |
---|
499 | clean-h \ |
---|
500 | clean-depend |
---|
501 | |
---|
502 | .PHONY: clean-all |
---|
503 | clean-all : clean \ |
---|
504 | clean-exe \ |
---|
505 | clean-dll \ |
---|
506 | clean-dat \ |
---|
507 | clean-lib \ |
---|
508 | clean-doc |
---|
509 | .PHONY: doc |
---|
510 | doc: t2t |
---|
511 | $(DOX) |
---|
512 | $(REMOVE) $(DEV_PATH)/doc.tar.gz |
---|
513 | $(TAR) $(DEV_PATH)/doc.tar $(DOC_PATH)/html > $(DEV_PATH)/tar_output |
---|
514 | $(REMOVE) $(DEV_PATH)/tar_output |
---|
515 | $(GZIP) $(DEV_PATH)/doc.tar |
---|
516 | |
---|
517 | .PHONY: show-doc |
---|
518 | show-doc: doc |
---|
519 | $(EXNET) $(DOC_PATH)/doc/html/index.html |
---|
520 | |
---|
521 | ################################ Compilation ################################### |
---|
522 | |
---|
523 | $(OBJ_PATH)/$(MAINNAME)_server.o: $(DEP_PATH)/$(MAINNAME)_server.d |
---|
524 | |
---|
525 | $(EXENAME): $(OBJ_PATH)/$(MAINNAME)_server.o $(LIBSTATIC) |
---|
526 | $(call COLORMSG, $(C_Purple),"Génération du serveur d'E/S de l'IPSL ($(VERSTR) C++) ...") |
---|
527 | $(LINK) -o $@ $^ $(LDFLAGS) |
---|
528 | |
---|
529 | $(LIBSTATIC) : $(OBJECTS) |
---|
530 | $(call COLORMSG, $(C_Green),"Génération de l'archive de la bibliothÚque d'E/S de l'IPSL...") |
---|
531 | $(AR) crs $@ $^ |
---|
532 | |
---|
533 | ################################ Dépendances ################################### |
---|
534 | |
---|
535 | |
---|
536 | ifeq (0, $(words $(findstring $(MAKECMDGOALS), $(NODEPS)))) |
---|
537 | -include $(DEPENDS) |
---|
538 | endif |
---|
539 | |
---|
540 | |
---|
541 | ################################################################################ |
---|
542 | |
---|
543 | %.html: %.t2t |
---|
544 | $(T2F) -t html $< |
---|
545 | |
---|
546 | # Preproc |
---|
547 | $(FSRC_PATH)/%$(FORTEXT): %.f03.in $(FSRC_PATH)/macro.inc |
---|
548 | $(F90ROC) $@ $< |
---|
549 | |
---|
550 | $(CSRC_PATH)/%.cpp: %.cpp.in $(CSRC_PATH)/macro.inc |
---|
551 | $(CPPROC) $@ $< |
---|
552 | |
---|
553 | # Dépendances |
---|
554 | $(DEP_PATH)/mark: $(HEADERS) |
---|
555 | @touch $@ |
---|
556 | |
---|
557 | $(DEP_PATH)/%.d: %.cpp $(DEP_PATH)/mark |
---|
558 | $(CDEP) $(DEFLAGS) -D __XIOS_NO_EXTERN -MT $(OBJ_PATH)/$(patsubst %.d,%.o,$(@F)) -MM -MF $@ $< |
---|
559 | |
---|
560 | # Entêtes cpp |
---|
561 | $(INC_PATH)/%.hpp: %.hpp |
---|
562 | $(COPY) $< $@ |
---|
563 | |
---|
564 | $(INC_PATH)/%.conf: %.conf |
---|
565 | $(COPY) $< $@ |
---|
566 | |
---|
567 | # Objets cpp |
---|
568 | $(OBJ_PATH)/%.o: %.cpp %.d |
---|
569 | $(CCPP) $(CFLAGS) -o $@ -c $< |
---|
570 | |
---|
571 | # Objets fortran |
---|
572 | $(FSRC_PATH)/%.f03: %.f90 |
---|
573 | $(COPY) $< $@ |
---|
574 | |
---|
575 | $(FAKE_PATH)/%.f03: %.f90 |
---|
576 | $(COPY) $< $@ |
---|
577 | |
---|
578 | $(LIB_PATH)/%.mod: $(OBJ_PATH)/%.o |
---|
579 | |
---|
580 | $(OBJ_PATH)/%.o: $(FSRC_PATH)/%$(FORTEXT) |
---|
581 | $(CFORT) $(FFLAGS) -o $@ -c $< |
---|
582 | |
---|
583 | $(OBJ_PATH)/%.o: $(FAKE_PATH)/%$(FORTEXT) $(OBJ_PATH)/ixmlioserver.o |
---|
584 | $(CFORT) $(FFLAGS) -o $@ -c $< |
---|
585 | |
---|
586 | #################################### FIN ####################################### |
---|