forked from NOAA-EMC/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
58 lines (44 loc) · 1.42 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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