# Makefile template for MOM6 # # Compiler flags are configured by autoconf's configure script. # # Source code dependencies are configured by makedep and saved to Makefile.dep. FC = @FC@ LD = @FC@ PYTHON = @PYTHON@ MAKEDEP = @MAKEDEP@ DEFS = @DEFS@ CPPFLAGS = @CPPFLAGS@ FCFLAGS = @FCFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ SRC_DIRS = @SRC_DIRS@ -include Makefile.dep # Generate Makefile from template Makefile: @srcdir@/ac/Makefile.in config.status ./config.status # Recursive wildcard (finds all files in $1 with suffixes in $2) rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d)) # Generate dependencies .PHONY: depend depend: Makefile.dep Makefile.dep: $(MAKEDEP) $(call rwildcard,$(SRC_DIRS),*.h *.c *.inc *.F90) $(PYTHON) $(MAKEDEP) -o Makefile.dep -e $(SRC_DIRS) # Delete any files associated with configuration (including the Makefile). .PHONY: distclean distclean: clean # configure output rm -f config.log rm -f config.status rm -f Makefile rm -f path_names rm -f Makefile.dep # This deletes all files generated by autoconf, including configure. # It is more aggressive than automake's maintainer-clean. # NOTE: Not a standard GNU target, this is for internal use only. # Don't be surprised if the name changes or if it disappears someday. .PHONY: ac-clean ac-clean: distclean rm -f @srcdir@/ac/aclocal.m4 rm -rf @srcdir@/ac/autom4te.cache rm -f @srcdir@/ac/configure