Skip to content

Commit

Permalink
Clean up phys/ Makefile calls to SURFEX build
Browse files Browse the repository at this point in the history
  • Loading branch information
rcabell committed Feb 23, 2023
1 parent 30e7ce8 commit 24c7996
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/Land_models/NoahMP/phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,34 @@ include ../user_build_options

SRCS := $(wildcard *.F)
OBJS := $(SRCS:%.F=%.o)
SUR_SRCS := $(wildcard surfex/*.F)
SUR_OBJS := $(SUR_SRCS:%.F=%.o)
CPPHRLDAS = -D_HRLDAS_OFFLINE_

# Check whether or not to build Crocus
ifndef BUILD_CROCUS
BUILD_CROCUS:=1
endif
ifeq ($(BUILD_CROCUS), 1)
SUR_OBJS := $(filter-out ../surfex/module_snowcro_intercept.o, $(SUR_OBJS))
SUR_OBJS := surfex/module_snowcro.o surfex/ini_csts.o
else
SUR_OBJS := $(filter-out ../surfex/module_snowcro.o, $(SUR_OBJS))
SUR_OBJS := surfex/module_snowcro_intercept.o
endif

all: $(OBJS)

%.o:%.F
@echo ""
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c -I../Utility_routines -Isurfex $(F90FLAGS) $(LDFLAGS) $(FREESOURCE) $(*).F
$(COMPILERF90) $(CPPINVOKE) $(CPPFLAGS) $(CPPHRLDAS) -o $(@) -c -I../Utility_routines -Isurfex $(F90FLAGS) $(LDFLAGS) $(FREESOURCE) $<
@echo ""

surfex/%.o:
$(MAKE) --directory=surfex/
$(MAKE) --directory=surfex/ $(@F)

#
# Dependencies:
#
module_sf_noahmpdrv.o: module_sf_noahmplsm.o module_sf_noahmp_glacier.o module_sf_noahmp_groundwater.o $(SUR_OBJS)
module_sf_noahmp_groundwater.o: module_sf_noahmplsm.o

surfex/ini_csts.o: surfex/modd_csts.o
surfex/mode_thermos.o: surfex/modd_snow_par.o
surfex/mode_surf_coefs.o: surfex/mode_thermos.o
surfex/mode_snow3l.o: surfex/modd_snow_par.o
surfex/module_snowcro.o: surfex/mode_surf_coefs.o surfex/tridiag_ground_snowcro.o


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

0 comments on commit 24c7996

Please sign in to comment.