Skip to content

Commit

Permalink
Merge pull request #77 from NCAR/develop
Browse files Browse the repository at this point in the history
update Makefile
  • Loading branch information
cenlinhe authored Apr 13, 2023
2 parents fd0f6de + c09481b commit 1a0cd57
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
10 changes: 7 additions & 3 deletions drivers/hrldas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ OBJS = NoahmpGroundwaterInitMod.o \
all: $(OBJS)

.F90.o:
$(COMPILERF90) -c $(F90FLAGS) $(FREESOURCE) -I. -I../../src -I../../utility -I../../../hrldas/Utility_routines \
$(NETCDFMOD) $(*).F90
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(*).F90 > $(*).f90
$(COMPILERF90) -c -I. -I../../src -I../../utility -I../../../hrldas/Utility_routines \
-I../../../hrldas/MPP $(F90FLAGS) $(FREESOURCE) $(NETCDFMOD) $(*).f90
@echo ""

clean:
rm -f *.o *.mod *.exe
rm -f *.o *.mod *.exe *.f90

#
# Dependencies:
Expand Down
17 changes: 10 additions & 7 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,20 @@ all: $(OBJS)
GroundWaterMmfMod.o: GroundWaterMmfMod.F90
@echo ""
$(RM) GroundWaterMmfMod.f90
$(CPP) $(CPPFLAGS) $(CPPHRLDAS) $(*).F90 > $(*).f90
$(COMPILERF90) -o $(@) -c $(F90FLAGS) $(FREESOURCE) -I ../../hrldas/MPP -I. \
-I../../hrldas/Utility_routines -I../utility $(NETCDFMOD) $(*).f90
$(RM) GroundWaterMmfMod.f90
$(CPP) $(CPPFLAGS) $(*).F90 > $(*).f90
$(COMPILERF90) -c -I../../hrldas/MPP -I. -I../../hrldas/Utility_routines \
-I../utility -I../drivers/hrldas $(F90FLAGS) $(FREESOURCE) $(NETCDFMOD) $(*).f90
@echo ""

.F90.o:
$(COMPILERF90) -c $(F90FLAGS) $(FREESOURCE) -I../utility -I../drivers/hrldas $(NETCDFMOD) $(*).F90
@echo ""
$(RM) $(*).f90
$(CPP) $(CPPFLAGS) $(*).F90 > $(*).f90
$(COMPILERF90) -c -I. -I../utility -I../drivers/hrldas $(F90FLAGS) $(FREESOURCE) $(NETCDFMOD) $(*).f90
@echo ""

clean:
rm -f *.o *.mod *.exe
rm -f *.o *.mod *.exe *.f90

#
# Dependencies:
Expand Down Expand Up @@ -310,7 +313,7 @@ BiochemCropMainMod.o: ../utility/Machine.o NoahmpVarType.o Co
IrrigationPrepareMod.o: ../utility/Machine.o NoahmpVarType.o ConstantDefineMod.o IrrigationTriggerMod.o
BalanceErrorCheckMod.o: ../utility/Machine.o NoahmpVarType.o ConstantDefineMod.o
GeneralInitMod.o: ../utility/Machine.o NoahmpVarType.o ConstantDefineMod.o
GroundWaterMmfMod.o: ../utility/Machine.o NoahmpVarType.o ../drivers/hrldas/NoahmpIOVarType.o
GroundWaterMmfMod.o: ../utility/Machine.o NoahmpVarType.o ../drivers/hrldas/NoahmpIOVarType.o
BalanceErrorCheckGlacierMod.o: ../utility/Machine.o NoahmpVarType.o ConstantDefineMod.o
EnergyMainGlacierMod.o: ../utility/Machine.o NoahmpVarType.o ConstantDefineMod.o SnowCoverGlacierMod.o \
GroundRoughnessPropertyGlacierMod.o GroundThermalPropertyGlacierMod.o \
Expand Down
11 changes: 9 additions & 2 deletions utility/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@ OBJS = Machine.o \
all: $(OBJS)

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

#
# This command cleans up object (etc) files:
#

clean:
rm -f *.o *.mod *.exe
rm -f *.o *.mod *.exe *.f90

#
# Dependencies:
#
CheckNanMod.o: Machine.o


0 comments on commit 1a0cd57

Please sign in to comment.