forked from etmc/tmLQCD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.global
57 lines (41 loc) · 2.27 KB
/
Makefile.global
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
# This Makefile is included from the other Makefiles
# It contains some overall targets...
# refresh Makefile and other stuff
PROGRAMS_WITH_GIT_HASH := hmc_tm invert
.SUFFIXES:
Makefile: ${top_srcdir}/Makefile.global $(srcdir)/Makefile.in $(abs_top_builddir)/config.status
cd $(abs_top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(abs_top_builddir)/config.status: $(top_srcdir)/configure
( cd ${abs_top_builddir} && $(SHELL) ./config.status --recheck )
$(abs_top_builddir)/config.h: $(top_srcdir)/config.h.in $(abs_top_builddir)/config.status $(top_srcdir)/configure
( cd ${abs_top_builddir} && $(SHELL) ./config.status --header=config.h )
#$(top_srcdir)/configure: $(top_srcdir)/configure.in
#$(top_srcdir)/configure:
# ( cd $(top_srcdir) && $(AUTOCONF) )
#extern modules
$(addsuffix .o,$(EXTERNMODULES)): %.o:
( cd $(dir $@) && ${MAKE} $(notdir $@) )
#extern libs
$(LINKLIBS): %.a: Makefile $(abs_top_builddir)/config.status $(top_srcdir)/configure
@( cd $(dir $@) && ${MAKE} $(notdir $@) )
#dep rules
# PROGRAMS_WITH_GIT_HASH require git_hash.h which is dynamically built by a phony make target
# to prevent too frequent building of git_hash (slowing down the build)
# we filter the list of all objects and treat these separately
$(addsuffix .d, $(filter-out ${PROGRAMS_WITH_GIT_HASH},${ALLOBJ})): %.d: ${srcdir}/%.c Makefile
@ $(CCDEP) ${DEPFLAGS} ${CPPFLAGS} ${INCLUDES} ${DEFS} $< > $@
$(addsuffix .d, $(filter ${PROGRAMS_WITH_GIT_HASH},${ALLOBJ})): %.d: ${srcdir}/%.c ${top_srcdir}/git_hash.h Makefile
@ $(CCDEP) ${DEPFLAGS} ${CPPFLAGS} ${INCLUDES} ${DEFS} $< > $@
${top_builddir}/fixed_volume.h: ${top_srcdir}/fixed_volume.h.in ${top_builddir}/config.status
cd ${abs_top_builddir} && CONFIG_FILES=fixed_volume.h CONFIG_HEADERS= $(SHELL) ${top_builddir}/config.status
all-recursive all-debug-recursive all-profile-recursive clean-recursive distclean-recursive compile-clean-recursive: Makefile
@set fnord ${MAKEFLAGS}; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
local_target="$$target"; \
( cd $$subdir && $(MAKE) $$local_target ) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; test -z "$$fail";