Skip to content

Commit

Permalink
Update Makefiles to use one-step preprocess/compile (#429)
Browse files Browse the repository at this point in the history
* Update Makefiles to use one-step preprocess/compile

Updated the Makefiles and macros.* files to use single-step compilation
in which the compiler drives the preprocessor directly. This simplifies
the Makefiles (removing the need to clean up intermediate CPP files),
and has the added side effect of making the build system no longer case-
sensitive.
  • Loading branch information
rcabell authored Nov 21, 2019
1 parent 15cd3d9 commit e6825a2
Show file tree
Hide file tree
Showing 41 changed files with 91 additions and 171 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
*.o
*.f
*.f90
*.F90
*.mod
*~
Makefile.comm
Expand All @@ -23,3 +20,4 @@ README.md
*pytest_cache*
*.log
compile_options.sh
.DS_Store
6 changes: 2 additions & 4 deletions trunk/NDHMS/CPL/CLM_cpl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(MODFLAG) -I ../../mod $(CLM_MOD) $(*).f
$(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -I$(NETCDFINC) -o $(@) $(F90FLAGS) $(MODFLAG) -I ../../mod $(CLM_MOD) $(*).F
@echo ""
ar -r ../../lib/libHYDRO.a $(@)

Expand All @@ -29,5 +27,5 @@ all: $(OBJS)
#

clean:
rm -f *.o *.mod *.stb *~ *.f
rm -f *.o *.mod *.stb *~
cd ../..; make -f Makefile.comm clean
6 changes: 2 additions & 4 deletions trunk/NDHMS/CPL/LIS_cpl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(MODFLAG) -I../../mod $(LIS_MOD) -I$(MOD_ESMF) $(*).f
$(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -I$(NETCDFINC) -o $(@) $(F90FLAGS) $(MODFLAG) -I../../mod $(LIS_MOD) -I$(MOD_ESMF) $(*).F
@echo ""
ar -r ../../lib/libHYDRO.a $(@)

Expand All @@ -29,4 +27,4 @@ all: $(OBJS)
#

clean:
rm -f *.o *.mod *.stb *~ *.f
rm -f *.o *.mod *.stb *~
7 changes: 2 additions & 5 deletions trunk/NDHMS/CPL/NoahMP_cpl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
# $(COMPILER90) -o $(@) $(F90FLAGS) $(MODFLAG) $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) $(*).f
$(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) $(*).F
@echo ""
ar -r ../../lib/libHYDRO.a $(@)
cp *.mod ../../mod
Expand All @@ -33,4 +30,4 @@ hrldas_drv_HYDRO.o: module_hrldas_HYDRO.o ../../Data_Rec/module_namelist.o ../..


clean:
rm -f *.o *.mod *.stb *~ *.f Noah_hrldas_beta
rm -f *.o *.mod *.stb *~ Noah_hrldas_beta
7 changes: 2 additions & 5 deletions trunk/NDHMS/CPL/Noah_cpl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
# $(COMPILER90) -o $(@) $(F90FLAGS) $(MODFLAG) $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(MODFLAG) -I$(NETCDF_INC) $(*).f
$(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -o $(@) $(F90FLAGS) $(MODFLAG) -I$(NETCDF_INC) $(*).F
@echo ""
ar -r ../../lib/libHYDRO.a $(@)

Expand All @@ -32,4 +29,4 @@ hrldas_drv_HYDRO.o: module_hrldas_HYDRO.o ../../Data_Rec/module_namelist.o ../..


clean:
rm -f *.o *.mod *.stb *~ *.f Noah_hrldas_beta
rm -f *.o *.mod *.stb *~ Noah_hrldas_beta
6 changes: 2 additions & 4 deletions trunk/NDHMS/CPL/WRF_cpl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(MODFLAG) -I$(WRF_ROOT)/frame -I$(WRF_ROOT)/main -I$(WRF_ROOT)/external/esmf_time_f90 $(*).f
$(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -I$(NETCDFINC) -o $(@) $(F90FLAGS) $(MODFLAG) -I$(WRF_ROOT)/frame -I$(WRF_ROOT)/main -I$(WRF_ROOT)/external/esmf_time_f90 $(*).F
@echo ""
ar -r ../../lib/libHYDRO.a $(@)

Expand All @@ -31,4 +29,4 @@ module_wrf_HYDRO.o: ../../Data_Rec/module_RT_data.o ../../Data_Rec/module_nameli
wrf_drv_HYDRO.o: module_wrf_HYDRO.o

clean:
rm -f *.o *.mod *.stb *~ *.f
rm -f *.o *.mod *.stb *~
6 changes: 2 additions & 4 deletions trunk/NDHMS/Data_Rec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I../mod $(*).f
$(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -I$(NETCDFINC) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I../mod $(*).F
@echo ""
ar -r ../lib/libHYDRO.a $(@)
cp *.mod ../mod
Expand All @@ -25,4 +23,4 @@ all: $(OBJS)
#

clean:
rm -f *.o *.mod *.stb *~ *.f
rm -f *.o *.mod *.stb *~
6 changes: 2 additions & 4 deletions trunk/NDHMS/Debug_Utilities/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I../mod $(*).f
#$(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -I$(NETCDFINC) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I../mod $(*).F
@echo ""
ar -r ../lib/libHYDRO.a $(@)
cp *.mod ../mod
Expand All @@ -23,4 +21,4 @@ all: $(OBJS)
#

clean:
rm -f *.o *.mod *.stb *~ *.f
rm -f *.o *.mod *.stb *~
7 changes: 2 additions & 5 deletions trunk/NDHMS/HYDRO_drv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(CPP) $(CPPFLAGS) -I$(NETCDFINC) $(*).F > $(*).f
# $(COMPILER90) -o $(@) $(F90FLAGS) $(MODFLAG) -I../mod $(*).f
$(COMPILER90) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) -I../mod $(*).f
# $(RMD) $(*).f
$(COMPILER90) $(CPPINVOKE) $(CPPFLAGS) -o $(@) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) -I../mod $(*).F
@echo ""
ar -r ../lib/libHYDRO.a $(@)
cp *.mod ../mod
Expand All @@ -26,4 +23,4 @@ module_HYDRO_drv.o: ../Data_Rec/module_namelist.o ../Data_Rec/module_RT_data.o .
../Routing/module_GW_baseflow.o ../Routing/module_HYDRO_utils.o ../Routing/module_HYDRO_io.o ../Routing/module_RT.o

clean:
rm -f *.o *.mod *.stb *~ *.f
rm -f *.o *.mod *.stb *~
5 changes: 1 addition & 4 deletions trunk/NDHMS/Land_models/Noah/GRAPHICS/HORIZ/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ all: $(CMD)

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(*).F > $(*).f
$(F90) -c -I$(NETCDF)/include $(FFLAGS) $(MODDIR) $(*).f
$(RM) $(*).f
$(F90) $(CPPINVOKE) $(CPPFLAGS) -c -I$(NETCDF)/include $(FFLAGS) $(MODDIR) $(*).F

$(CMD): $(OBJS)
$(F90) -o $(@) -I$(NETCDF)/include $(FFLAGS) $(OBJS) \
Expand Down
5 changes: 1 addition & 4 deletions trunk/NDHMS/Land_models/Noah/GRAPHICS/TIME_SERIES/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ all: $(CMD)

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(*).F > $(*).f
$(F90) -c -I$(NETCDF)/include $(FFLAGS) $(MODDIR) $(*).f
$(RM) $(*).f
$(F90) $(CPPINVOKE) $(CPPFLAGS) -c -I$(NETCDF)/include $(FFLAGS) $(MODDIR) $(*).F

$(CMD): $(OBJS)
$(F90) -o $(@) -I$(NETCDF)/include $(FFLAGS) $(OBJS) \
Expand Down
5 changes: 1 addition & 4 deletions trunk/NDHMS/Land_models/Noah/HRLDAS_COLLECT_DATA/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ lib/libsmda.a:

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(*).F > $(*).f
$(COMPILERF90) $(FREESOURCE) $(F90FLAGS) -c $(NETCDFMOD) -I./lib $(MODFLAG)./lib $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(FREESOURCE) $(F90FLAGS) -c $(NETCDFMOD) -I./lib $(MODFLAG)./lib $(*).F

$(CMD): lib/libsmda.a $(OBJS)
(cd lib; make)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ decode_jpeg2000.o: decode_jpeg2000.c

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(GRIBCODE_OPT) $(BZIP_CPP) $(*).F > $(*).f
$(COMPILERF90) -c $(FREESOURCE) $(F90FLAGS) $(NETCDFMOD) $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(GRIBCODE_OPT) $(BZIP_CPP) -c $(FREESOURCE) $(F90FLAGS) $(NETCDFMOD) $(*).F

.c.o:
$(CC) -c $(BZIP_CPP) $(<)
Expand Down
17 changes: 4 additions & 13 deletions trunk/NDHMS/Land_models/Noah/IO_code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,18 @@ all: $(OBJS)

Noah_hrldas_driver.o: Noah_hrldas_driver.F
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F > $(*).f
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(MODFLAG). \
$(MODFLAG)../Noah $(MODFLAG)../Utility_routines $(NETCDFMOD) $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(MODFLAG). \
$(MODFLAG)../Noah $(MODFLAG)../Utility_routines -I../../../MPP $(NETCDFMOD) $(*).F
@echo ""

module_hrldas_netcdf_io.o: module_hrldas_netcdf_io.F
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(NETCDFMOD) $(CPPHRLDAS) $(*).F > $(*).f
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(MODFLAG)../Utility_routines $(NETCDFMOD) $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(MODFLAG)../Utility_routines $(NETCDFMOD) $(*).F
@echo ""

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F > $(*).f
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(*).F
@echo ""


Expand Down
5 changes: 1 addition & 4 deletions trunk/NDHMS/Land_models/Noah/Noah/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F > $(*).f
$(COMPILERF90) -o $(@) -c $(MODFLAG). $(MODFLAG)../Utility_routines $(F90FLAGS) $(FREESOURCE) $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(MODFLAG). $(MODFLAG)../Utility_routines $(F90FLAGS) $(FREESOURCE) $(*).F
@echo ""

#
Expand Down
15 changes: 3 additions & 12 deletions trunk/NDHMS/Land_models/Noah/Utility_programs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,18 @@ all: $(CMD)
#
module_date_utilities.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) ../Utility_routines/$(*).F > $(*).f
$(COMPILERF90) $(FREESOURCE) $(F90FLAGS) -c $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(FREESOURCE) $(F90FLAGS) -c ../Utility_routines/$(*).F

#
# Compile the arguments_module from the HRLDAS_COLLECT_DATA/lib directory
#
arguments_module.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) ../HRLDAS_COLLECT_DATA/lib/$(*).F > $(*).f
$(COMPILERF90) $(FREESOURCE) $(F90FLAGS) -c $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(FREESOURCE) $(F90FLAGS) -c ../HRLDAS_COLLECT_DATA/lib/$(*).F

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(*).F > $(*).f
$(COMPILERF90) $(FREESOURCE) $(F90FLAGS) -c $(NETCDFMOD) $(MODFLAG). $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(FREESOURCE) $(F90FLAGS) -c $(NETCDFMOD) $(MODFLAG). $(*).F


hrldas_extract_point: hrldas_extract_point.o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ module_date_utilities.o: ../../Utility_routines/module_date_utilities.F
$(COMPILERF90) -c $(F90FLAGS) $(FREESOURCE) $(<)

.F.o:
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(*).F > $(*).f
$(COMPILERF90) $(FREESOURCE) $(F90FLAGS) -c $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(FREESOURCE) $(F90FLAGS) -c $(*).F


neat:
Expand Down
5 changes: 1 addition & 4 deletions trunk/NDHMS/Land_models/Noah/Utility_routines/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ all: $(OBJS)

.F.o:
@echo ""
$(RM) $(*).f
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F > $(*).f
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(*).f
$(RM) $(*).f
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(*).F
@echo ""

#
Expand Down
6 changes: 2 additions & 4 deletions trunk/NDHMS/Land_models/NoahMP/HRLDAS_forcing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ lib/libsmda.a:

.F.o:
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(CPP_NETCDF4_COMPRESS) $(*).F > $(*).f90
$(COMPILERF90) $(FREESOURCE) $(F90FLAGS) $(LDFLAGS) -c $(NETCDFMOD) -I./lib -I./lib $(*).f90
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPP_NETCDF4_COMPRESS) $(FREESOURCE) $(F90FLAGS) $(LDFLAGS) -c $(NETCDFMOD) -I./lib -I./lib $(*).F

$(CMD): lib/libsmda.a $(OBJS)
(cd lib; make)
$(COMPILERF90) -o $(@) -I./lib $(F90FLAGS) $(LDFLAGS) -I./lib $(OBJS) \
-L./lib -lsmda $(NETCDFLIB) $(BZIP2_LIB) $(LIBJASPER)

clean:
$(RM) *.o *~ *.exe *.mod *.f90
$(RM) *.o *~ *.exe *.mod
(cd lib; make clean)
#

Expand Down
6 changes: 2 additions & 4 deletions trunk/NDHMS/Land_models/NoahMP/HRLDAS_forcing/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@ decode_jpeg2000.o: decode_jpeg2000.c

.F.o:
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(GRIBCODE_OPT) $(BZIP_CPP) $(*).F > $(*).f90
$(COMPILERF90) -c $(FREESOURCE) $(F90FLAGS) $(LDFLAGS) $(NETCDFMOD) $(*).f90
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(GRIBCODE_OPT) $(BZIP_CPP) -c $(FREESOURCE) $(F90FLAGS) $(LDFLAGS) $(NETCDFMOD) $(*).F

.c.o:
$(CC) -c $(BZIP_CPP) $(<)

clean:
$(RM) $(OBJS) $(CMD) *.mod *.f90 *~
$(RM) $(OBJS) $(CMD) *.mod *~
#
module_grib2.o: module_grib2.F module_grib2_tables.o module_grib1.o module_mapinfo.o kwm_date_utilities.o module_grib_common.o
module_grib1.o: module_grib1.F module_mapinfo.o kwm_date_utilities.o module_grib_common.o
Expand Down
22 changes: 7 additions & 15 deletions trunk/NDHMS/Land_models/NoahMP/IO_code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,26 @@ NoahMP : $(OBJS_NoahMP) $(OBJS)

module_NoahMP_hrldas_driver.o: module_NoahMP_hrldas_driver.F ../../../HYDRO_drv/module_HYDRO_drv.o ../../../Data_Rec/module_namelist.o ../../../Data_Rec/module_RT_data.o ../../../CPL/NoahMP_cpl/module_hrldas_HYDRO.o
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F > $(*).f90
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(MODFLAG) -I. \
-I../phys -I../Utility_routines -I../../../mod $(NETCDFMOD) $(*).f90
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(MODFLAG) -I. \
-I../phys -I../Utility_routines -I../../../mod $(NETCDFMOD) $(*).F
@echo ""

main_hrldas_driver.o: main_hrldas_driver.F
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F > $(*).f90
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(LDFLAGS) $(FREESOURCE) -I ../MPP -I. \
-I../phys -I../Utility_routines -I../../../mod -I../../../MPP $(NETCDFMOD) $(MODFLAG) $(*).f90
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(LDFLAGS) $(FREESOURCE) -I ../MPP -I. \
-I../phys -I../Utility_routines -I../../../mod -I../../../MPP $(NETCDFMOD) $(*).F
# $(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) -I ../MPP -I. \
# -I../phys -I../Utility_routines $(NETCDFMOD) $(*).f90
@echo ""

module_hrldas_netcdf_io.o: module_hrldas_netcdf_io.F
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(NETCDFMOD) $(*).F > $(*).f90
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) -I ../MPP -I../Utility_routines $(NETCDFMOD) $(MODFLAG) $(*).f90
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(FREESOURCE) -I ../MPP -I../Utility_routines $(MODFLAG) $(NETCDFMOD) $(*).F
@echo ""

.F.o:
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F > $(*).f90
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(*).f90
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c $(F90FLAGS) $(FREESOURCE) $(*).F
@echo ""

#
Expand All @@ -60,4 +52,4 @@ $(OBJS_NoahMP): module_hrldas_netcdf_io.o

# This command cleans up object files, etc.
clean:
$(RM) *.o *.mod *.stb *~ *.f90
$(RM) *.o *.mod *.stb *~
Loading

0 comments on commit e6825a2

Please sign in to comment.