executable = ../bin/runoff-mapper.exe FC = [[[PLT:ACTIVE:FC]]] FFLAGS = [[[PLT:ACTIVE:FFLAGS]]] LD = [[[PLT:ACTIVE:LD]]] LDFLAGS = [[[PLT:ACTIVE:LDFLAGS]]] OASIS_BASE_DIR = [[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]/oasis3-mct/ecconf OASIS_MOD_DIR = $(OASIS_BASE_DIR)/build/lib/psmile.MPI1 OASIS_INC_DIR = $(OASIS_BASE_DIR)/lib/psmile/include OASIS_LIB_DIR = $(OASIS_BASE_DIR)/lib OASIS_LIBS = -lpsmile.MPI1 -lmct -lmpeu -lscrip MPI_LIB_DIR = $(addsuffix /,[[[PLT:ACTIVE:MPI_BASE_DIR]]])[[[PLT:ACTIVE:MPI_LIB_SUBDIR]]] MPI_LIBS = $(addprefix -l,[[[PLT:ACTIVE:MPI_LIBS_WITHOUT_L]]]) NETCDF_INC_DIR = $(addprefix -I,$(addsuffix /,[[[PLT:ACTIVE:NETCDF_BASE_DIR]]])[[[PLT:ACTIVE:NETCDF_INC_SUBDIR]]]) NETCDF_LIB_DIR = $(addprefix -L,$(addsuffix /,[[[PLT:ACTIVE:NETCDF_BASE_DIR]]])[[[PLT:ACTIVE:NETCDF_LIB_SUBDIR]]]) NETCDF_LIBS = $(addprefix -l,[[[PLT:ACTIVE:NETCDF_LIBS_WITHOUT_L]]]) VPATH = cplng cplng_srcs = \ cplng_data_mod.F90 \ cplng_init_mod.F90 \ cplng_config_mod.F90 \ cplng_exchange_mod.F90 \ cplng_finalize_mod.F90 \ cplng_mod.F90 rnfmap_srcs = runoff_mapper_mod.F90 runoff_mapper.F90 $(executable): config_mod.o $(cplng_srcs:.F90=.o) $(rnfmap_srcs:.F90=.o) $(LD) $(LDFLAGS) -o $@ $^ -L$(OASIS_LIB_DIR) $(OASIS_LIBS) $(NETCDF_LIB_DIR) $(NETCDF_LIBS) -L$(MPI_LIB_DIR) $(MPI_LIBS) %.o: %.F90 $(FC) $(FFLAGS) -c -I$(OASIS_MOD_DIR) -I$(NETCDF_INC_DIR) $< .PHONY: clean clean: @rm -f *.o *.mod