Makefile 3.82 KB
Newer Older
hb's avatar
hb committed
1
#$Id: Makefile,v 1.19 2010-03-02 19:39:32 hb Exp $
gotm's avatar
gotm committed
2 3 4 5 6 7
#
# Makefile to build the 3D specific library - libm3d.a
#

include ../Rules.make

gotm's avatar
gotm committed
8
INCS	= static_3d.h dynamic_declarations_3d.h dynamic_allocations_3d.h
gotm's avatar
gotm committed
9 10 11 12 13
LIB	= $(LIBDIR)/lib3d${buildtype}.a

MODSRC	= m3d.F90 variables_3d.F90 advection_3d.F90 eqstate.F90 \
          temperature.F90 salinity.F90 spm.F90 bdy_3d.F90 rivers.F90

hb's avatar
hb committed
14
LIBSRC	= start_macro.F90 hcc_check.F90 bdy_3d.F90 coordinates.F90 sigma_coordinates.F90 general_coordinates.F90 hybrid_coordinates.F90 check_h.F90 bottom_friction_3d.F90 internal_pressure.F90 uu_momentum_3d.F90 vv_momentum_3d.F90 ww_momentum_3d.F90 structure_friction_3d.F90 uv_advect_3d.F90 uv_diffusion_3d.F90 tke_eps_advect_3d.F90 stresses_3d.F90 ss_nn.F90 gotm.F90 slow_bottom_friction.F90 slow_advection.F90 slow_diffusion.F90 slow_terms.F90 stop_macro.F90
gotm's avatar
gotm committed
15

hb's avatar
hb committed
16
TEXSRC	= m3d.F90 variables_3d.F90  coordinates.F90 sigma_coordinates.F90 general_coordinates.F90 hybrid_coordinates.F90 adaptive_coordinates.F90 check_h.F90 hcc_check.F90 uu_momentum_3d.F90 vv_momentum_3d.F90 ww_momentum_3d.F90 structure_friction_3d.F90 uv_advect_3d.F90 uv_diffusion_3d.F90 tke_eps_advect_3d.F90 bottom_friction_3d.F90 internal_pressure.F90 ip_blumberg_mellor.F90 ip_blumberg_mellor_lin.F90 ip_z_interpol.F90  ip_song_wright.F90 ip_chu_fan.F90 ip_shchepetkin_mcwilliams.F90 advection_3d.F90 upstream_adv.F90 upstream_2dh_adv.F90 u_split_adv.F90 v_split_adv.F90 w_split_adv.F90 w_split_it_adv.F90 fct_2dh_adv.F90 temperature.F90 salinity.F90 spm.F90 eqstate.F90 ss_nn.F90 stresses_3d.F90 gotm.F90 rivers.F90 bdy_3d.F90 slow_bottom_friction.F90 slow_advection.F90 slow_diffusion.F90 slow_terms.F90 start_macro.F90 stop_macro.F90
hb's avatar
hb committed
17

gotm's avatar
gotm committed
18 19
SRC	= $(MODSRC) $(LIBSRC)

kbk's avatar
kbk committed
20
MOD = \
gotm's avatar
gotm committed
21
$(LIB)(variables_3d.o)		\
kbk's avatar
kbk committed
22 23 24
$(LIB)(advection_3d.o)
ifneq ($(GETM_NO_BAROCLINIC),true)
MOD += \
kbk's avatar
kbk committed
25 26 27 28
$(LIB)(temperature.o)			\
$(LIB)(salinity.o)			\
$(LIB)(eqstate.o)			\
$(LIB)(internal_pressure.o)	
kbk's avatar
kbk committed
29
endif
kbk's avatar
kbk committed
30
ifeq ($(GETM_SPM),true)
kbk's avatar
kbk committed
31 32 33
MOD += \
$(LIB)(spm.o)
endif
kbk's avatar
kbk committed
34 35 36
ifeq ($(GETM_BIO),true)
MOD += $(LIB)(getm_bio.o)
endif
kbk's avatar
kbk committed
37
MOD += \
kbk's avatar
kbk committed
38 39
$(LIB)(bdy_3d.o)			\
$(LIB)(m3d.o)				\
gotm's avatar
gotm committed
40 41
$(LIB)(rivers.o)

kbk's avatar
kbk committed
42
OBJ = \
kbk's avatar
kbk committed
43
$(LIB)(start_macro.o)			\
44
$(LIB)(hcc_check.o)			\
kbk's avatar
kbk committed
45
$(LIB)(coordinates.o)			\
46 47 48
$(LIB)(sigma_coordinates.o)		\
$(LIB)(general_coordinates.o)		\
$(LIB)(hybrid_coordinates.o)		\
kbk's avatar
kbk committed
49 50 51
$(LIB)(bottom_friction_3d.o)		\
$(LIB)(uu_momentum_3d.o)		\
$(LIB)(vv_momentum_3d.o)		\
52 53 54 55 56 57
$(LIB)(ww_momentum_3d.o)		
ifeq ($(GETM_STRUCTURE_FRICTION),true)
OBJ += \
$(LIB)(structure_friction_3d.o)
endif
OBJ += \
kbk's avatar
kbk committed
58
$(LIB)(uv_advect_3d.o)			\
kbk's avatar
kbk committed
59 60 61
$(LIB)(uv_diffusion_3d.o)
ifneq ($(GETM_NO_BAROCLINIC),true)
OBJ += \
62
$(LIB)(adaptive_coordinates.o)          \
kbk's avatar
kbk committed
63 64 65 66
$(LIB)(ip_blumberg_mellor.o)		\
$(LIB)(ip_blumberg_mellor_lin.o)	\
$(LIB)(ip_z_interpol.o)			\
$(LIB)(ip_song_wright.o)		\
67
$(LIB)(ip_shchepetkin_mcwilliams.o)     \
68
$(LIB)(ip_stelling_vankester.o)         \
kbk's avatar
kbk committed
69
$(LIB)(ip_chu_fan.o)            
kbk's avatar
kbk committed
70 71
endif
OBJ += \
kbk's avatar
kbk committed
72 73 74 75 76 77 78 79 80 81 82 83
$(LIB)(eddyviscosity.o)			\
$(LIB)(slow_bottom_friction.o)		\
$(LIB)(slow_advection.o)		\
$(LIB)(slow_diffusion.o)		\
$(LIB)(slow_terms.o)			\
$(LIB)(upstream_adv.o)			\
$(LIB)(u_split_adv.o)			\
$(LIB)(v_split_adv.o)			\
$(LIB)(w_split_adv.o)			\
$(LIB)(w_split_it_adv.o)		\
$(LIB)(upstream_2dh_adv.o)		\
$(LIB)(fct_2dh_adv.o)			\
hb's avatar
hb committed
84
$(LIB)(check_h.o)                    \
gotm's avatar
gotm committed
85 86 87
$(LIB)(stop_macro.o)

ifeq ($(turbulence),gotm)
kbk's avatar
kbk committed
88 89 90
OBJ += 	\
$(LIB)(stresses_3d.o)			\
$(LIB)(ss_nn.o)				\
hb's avatar
hb committed
91 92 93
$(LIB)(gotm.o)                          \
$(LIB)(tke_eps_advect_3d.o)

gotm's avatar
gotm committed
94 95
endif

kbk's avatar
kbk committed
96

gotm's avatar
gotm committed
97 98 99 100 101 102 103 104
all: modules objects

modules: $(MOD)

objects: $(OBJ)

$(MOD): $(INCS)

kbk's avatar
kbk committed
105
$(OBJ): $(MOD)
gotm's avatar
gotm committed
106

hb's avatar
hb committed
107 108
doc: $(TEXSRC)
	$(PROTEX) $(TEXSRC) > $(DOCDIR)/3d.tex
kbk's avatar
kbk committed
109
	touch doc
gotm's avatar
gotm committed
110 111 112 113 114

clean:
	$(RM) $(LIB) $(MODDIR)/m3d.{m.mod}

realclean: clean
hb's avatar
hb committed
115
	$(RM) *.o doc
gotm's avatar
gotm committed
116 117 118 119 120 121

distclean: realclean

#-----------------------------------------------------------------------
# Copyright (C) 2001 - Hans Burchard and Karsten Bolding (BBH)         !
#-----------------------------------------------------------------------