Skip to content
Snippets Groups Projects
Commit 84d2b584 authored by Juan Escobar's avatar Juan Escobar
Browse files

Juan 24/02/2023:spll*+Makefile.MESONH.mk, add dependence on include file for make compilation

parent f33d1c6f
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ ec_meminfo.F90|\ ...@@ -32,7 +32,7 @@ ec_meminfo.F90|\
turb.f90|shallow_mf.f90|rain_ice.f90|lima.f90|\ turb.f90|shallow_mf.f90|rain_ice.f90|lima.f90|\
lima_adjust_split.f90|lima_precip_scavenging.f90|ini_tiwmx.f90|\ lima_adjust_split.f90|lima_precip_scavenging.f90|ini_tiwmx.f90|\
ini_snow.f90|ini_rain_ice.f90|ini_neb.f90|ini_cst.f90|\ ini_snow.f90|ini_rain_ice.f90|ini_neb.f90|ini_cst.f90|\
ice_adjust.f90|gradient_u.f90|gradient_v.f90|gradient_w|\ ice_adjust.f90|gradient_u.f90|gradient_v.f90|gradient_w.f90|\
gamma.f90|gamma_inc.f90|general_gamma.f90|condensation.f90" gamma.f90|gamma_inc.f90|general_gamma.f90|condensation.f90"
# #
...@@ -142,11 +142,12 @@ then ...@@ -142,11 +142,12 @@ then
cp $spllfile $DIRNAME/$spllfile cp $spllfile $DIRNAME/$spllfile
touch $DIRNAME/$BASENAME2.D touch $DIRNAME/$BASENAME2.D
fi fi
dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u ` dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u `
mod=`egrep -i "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure ` mod=`egrep -i "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure `
inc=`egrep -i "^[[:space:]]*include " $spllfile | sed -e 's/"//g' | awk '{ print '${TOCASE}'($2)}' | sort -u | egrep -v 'mpif.h|netcdf.inc' `
echo $mod : $spllbase.o >> $DIRNAME/$BASENAME2.D echo $mod : $spllbase.o >> $DIRNAME/$BASENAME2.D
echo $spllbase.o : $spllfile $dep >> $DIRNAME/$BASENAME2.D echo $spllbase.o : $spllfile $dep $inc >> $DIRNAME/$BASENAME2.D
if [ "$SUF" = "f90" ] if [ "$SUF" = "f90" ]
then then
...@@ -162,7 +163,7 @@ do ...@@ -162,7 +163,7 @@ do
echo " -mv $filemod "' $(OBJDIR)/MOD/. || '"echo OK $filemod " >> $DIRNAME/$BASENAME2.D echo " -mv $filemod "' $(OBJDIR)/MOD/. || '"echo OK $filemod " >> $DIRNAME/$BASENAME2.D
done done
unset dep mod unset dep inc mod
done done
touch $DIRNAME/$BASENAME2.D touch $DIRNAME/$BASENAME2.D
......
...@@ -32,7 +32,7 @@ ec_meminfo.F90|\ ...@@ -32,7 +32,7 @@ ec_meminfo.F90|\
turb.f90|shallow_mf.f90|rain_ice.f90|lima.f90|\ turb.f90|shallow_mf.f90|rain_ice.f90|lima.f90|\
lima_adjust_split.f90|lima_precip_scavenging.f90|ini_tiwmx.f90|\ lima_adjust_split.f90|lima_precip_scavenging.f90|ini_tiwmx.f90|\
ini_snow.f90|ini_rain_ice.f90|ini_neb.f90|ini_cst.f90|\ ini_snow.f90|ini_rain_ice.f90|ini_neb.f90|ini_cst.f90|\
ice_adjust.f90|gradient_u.f90|gradient_v.f90|gradient_w|\ ice_adjust.f90|gradient_u.f90|gradient_v.f90|gradient_w.f90|\
gamma.f90|gamma_inc.f90|general_gamma.f90|condensation.f90" gamma.f90|gamma_inc.f90|general_gamma.f90|condensation.f90"
# #
...@@ -149,15 +149,16 @@ then ...@@ -149,15 +149,16 @@ then
cp $spllfile $DIRNAME/$spllfile cp $spllfile $DIRNAME/$spllfile
touch $DIRNAME/$BASENAME2.D touch $DIRNAME/$BASENAME2.D
fi fi
dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u ` dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u `
mod=`egrep -i "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure ` mod=`egrep -i "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure `
inc=`egrep -i "^[[:space:]]*include " $spllfile | sed -e 's/"//g' | awk '{ print '${TOCASE}'($2)}' | sort -u | egrep -v 'mpif.h|netcdf.inc' `
if [ "x$mod" != "x" ] if [ "x$mod" != "x" ]
then then
echo $spllbase.o : >> $DIRNAME/$BASENAME2.D echo $spllbase.o : >> $DIRNAME/$BASENAME2.D
echo $mod : $spllfile $dep >> $DIRNAME/$BASENAME2.D echo $mod : $spllfile $dep $inc >> $DIRNAME/$BASENAME2.D
else else
echo $spllbase.o : $spllfile $dep >> $DIRNAME/$BASENAME2.D echo $spllbase.o : $spllfile $dep $inc >> $DIRNAME/$BASENAME2.D
fi fi
if [ "$SUF" = "f90" ] if [ "$SUF" = "f90" ]
...@@ -175,7 +176,7 @@ do ...@@ -175,7 +176,7 @@ do
echo " -mv $filemod "' $(OBJDIR)/MOD/. || '"echo OK $filemod " >> $DIRNAME/$BASENAME2.D echo " -mv $filemod "' $(OBJDIR)/MOD/. || '"echo OK $filemod " >> $DIRNAME/$BASENAME2.D
done done
unset dep mod unset dep inc mod
done done
touch $DIRNAME/$BASENAME2.D touch $DIRNAME/$BASENAME2.D
......
...@@ -32,16 +32,22 @@ ec_meminfo.F90|\ ...@@ -32,16 +32,22 @@ ec_meminfo.F90|\
turb.f90|shallow_mf.f90|rain_ice.f90|lima.f90|\ turb.f90|shallow_mf.f90|rain_ice.f90|lima.f90|\
lima_adjust_split.f90|lima_precip_scavenging.f90|ini_tiwmx.f90|\ lima_adjust_split.f90|lima_precip_scavenging.f90|ini_tiwmx.f90|\
ini_snow.f90|ini_rain_ice.f90|ini_neb.f90|ini_cst.f90|\ ini_snow.f90|ini_rain_ice.f90|ini_neb.f90|ini_cst.f90|\
ice_adjust.f90|gradient_u.f90|gradient_v.f90|gradient_w|\ ice_adjust.f90|gradient_u.f90|gradient_v.f90|gradient_w.f90|\
gamma.f90|gamma_inc.f90|general_gamma.f90|condensation.f90" gamma.f90|gamma_inc.f90|general_gamma.f90|condensation.f90"
# #
if [ "$SUF" = "f" ] if [ "$SUF" = "f" ]
then then
echo "!depfile:$BASENAME2.D" > $DIRNAME/spll_$BASENAME spllbase="spll_$BASENAME2"
cat $file >> $DIRNAME/spll_$BASENAME spllfile="$spllbase.$SUF"
echo "#" $file > $DIRNAME/$BASENAME2.D
echo "!depfile:$BASENAME2.D" > $DIRNAME/$spllfile
cat $file >> $DIRNAME/$spllfile
echo "#=========== $BASENAME2.$SUF dependence ==========================" > $DIRNAME/$BASENAME2.D
echo $spllbase.o : $spllfile >> $DIRNAME/$BASENAME2.D
echo " "' $(F77) -I$(OBJDIR)/MOD $(INC) -c $(F77FLAGS) $<' >> $DIRNAME/$BASENAME2.D
echo " -mv $spllbase.o "' $(OBJDIR)/. || '"echo OK $spllbase.o " >> $DIRNAME/$BASENAME2.D
else else
...@@ -142,15 +148,16 @@ then ...@@ -142,15 +148,16 @@ then
cp $spllfile $DIRNAME/$spllfile cp $spllfile $DIRNAME/$spllfile
touch $DIRNAME/$BASENAME2.D touch $DIRNAME/$BASENAME2.D
fi fi
dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u ` dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u `
mod=`egrep -i "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure ` mod=`egrep -i "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure `
inc=`egrep -i "^[[:space:]]*include " $spllfile | sed -e 's/"//g' | awk '{ print '${TOCASE}'($2)}' | sort -u | egrep -v 'mpif.h|netcdf.inc' `
if [ "x$mod" != "x" ] if [ "x$mod" != "x" ]
then then
echo $spllbase.o : >> $DIRNAME/$BASENAME2.D echo $spllbase.o : >> $DIRNAME/$BASENAME2.D
echo $mod : $spllfile $dep >> $DIRNAME/$BASENAME2.D echo $mod : $spllfile $dep $inc >> $DIRNAME/$BASENAME2.D
else else
echo $spllbase.o : $spllfile $dep >> $DIRNAME/$BASENAME2.D echo $spllbase.o : $spllfile $dep $inc >> $DIRNAME/$BASENAME2.D
fi fi
if [ "$SUF" = "f90" ] if [ "$SUF" = "f90" ]
...@@ -167,7 +174,7 @@ do ...@@ -167,7 +174,7 @@ do
echo " -mv $filemod "' $(OBJDIR)/MOD/. || '"echo OK $filemod " >> $DIRNAME/$BASENAME2.D echo " -mv $filemod "' $(OBJDIR)/MOD/. || '"echo OK $filemod " >> $DIRNAME/$BASENAME2.D
done done
unset dep mod unset dep inc mod
done done
touch $DIRNAME/$BASENAME2.D touch $DIRNAME/$BASENAME2.D
......
...@@ -67,11 +67,11 @@ OBJS_NOCB += spll_dxf.o spll_dxm.o spll_dyf.o spll_dym.o \ ...@@ -67,11 +67,11 @@ OBJS_NOCB += spll_dxf.o spll_dxm.o spll_dyf.o spll_dym.o \
spll_gx_m_m.o spll_gx_m_u.o spll_gy_m_m.o \ spll_gx_m_m.o spll_gx_m_u.o spll_gy_m_m.o \
spll_gy_m_v.o spll_gz_m_m.o spll_gz_m_w.o \ spll_gy_m_v.o spll_gz_m_m.o spll_gz_m_w.o \
spll_dzf_mf.o spll_dzm_mf.o spll_mzf_mf.o spll_mzm_mf.o \ spll_dzf_mf.o spll_dzm_mf.o spll_mzf_mf.o spll_mzm_mf.o \
spll_modi_gradient_m_d.o spll_mode_shuman_phy.o spll_mode_shuman_phy.o mode_shuman_phy.mod
$(OBJS_NOCB) : OPT = $(OPT_NOCB) $(OBJS_NOCB) : OPT = $(OPT_NOCB)
OBJS0 += spll_switch_sbg_lesn.o spll_mode_mppdb.o OBJS0 += spll_switch_sbg_lesn.o spll_mode_mppdb.o mode_mppdb.mod
$(OBJS0) : OPT = $(OPT0) $(OBJS0) : OPT = $(OPT0)
...@@ -82,8 +82,8 @@ endif ...@@ -82,8 +82,8 @@ endif
########################################################## ##########################################################
DIR_PHYEX += PHYEX/aux PHYEX/turb PHYEX/micro PHYEX/conv DIR_PHYEX += PHYEX/aux PHYEX/turb PHYEX/micro PHYEX/conv
INC_PHYEX += -I$(B)PHYEX/micro -I$(B)PHYEX/turb -I$(B)PHYEX/aux INC_PHYEX += -I$(B)PHYEX/micro -I$(B)PHYEX/turb -I$(B)PHYEX/aux
#CPPFLAGS_PHYEX += #CPPFLAGS_PHYEX +=
VPATH += PHYEX/aux PHYEX/turb PHYEX/micro PHYEX/conv
# #
DIR_MASTER += $(DIR_PHYEX) DIR_MASTER += $(DIR_PHYEX)
CPPFLAGS += $(CPPFLAGS_PHYEX) CPPFLAGS += $(CPPFLAGS_PHYEX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment