SHELL = /bin/sh inside_nems := $(wildcard ../../../conf/configure.nems) ifneq ($(strip $(inside_nems)),) include ../../../conf/configure.nems else exist_configure_fv3 := $(wildcard ../conf/configure.fv3) ifneq ($(strip $(exist_configure_fv3)),) include ../conf/configure.fv3 else $(error "../conf/configure.fv3 file is missing. Run ./configure") endif $(info ) $(info Build standalone FV3 gfsphysics ...) $(info ) endif LIBRARY = libipd.a FFLAGS += -I$(FMS_DIR) -I../gfsphysics -I../namphysics CPPDEFS += -DNEW_TAUCTMAX -DSMALL_PE -DNEMS_GSM -DINTERNAL_FILE_NML SRCS_F90 = \ ./IPD_driver.F90 \ ./IPD_typedefs.F90 SRCS_c = DEPEND_FILES = $(SRCS_f) $(SRCS_f90) $(SRCS_F) $(SRCS_F90) OBJS_f = $(SRCS_f:.f=.o) OBJS_f90 = $(SRCS_f90:.f90=.o) OBJS_F = $(SRCS_F:.F=.o) OBJS_F90 = $(SRCS_F90:.F90=.o) OBJS_c = $(SRCS_c:.c=.o) OBJS = $(OBJS_f) $(OBJS_f90) $(OBJS_F) $(OBJS_F90) $(OBJS_c) all default: depend $(LIBRARY) $(LIBRARY): $(OBJS) $(AR) $(ARFLAGS) $@ $? .PHONY: clean clean: @echo "Cleaning ipd ... " @echo $(RM) -f $(LIBRARY) *__genmod.f90 *.o */*.o *.mod *.i90 *.lst *.i depend MKDEPENDS = ../mkDepends.pl include ../conf/make.rules include ./depend # do not include 'depend' file if the target contains string 'clean' ifneq (clean,$(findstring clean,$(MAKECMDGOALS))) -include depend endif