forked from etmc/tmLQCD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
174 lines (142 loc) · 5.36 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
srcdir = @srcdir@
top_srcdir = @top_srcdir@
abs_top_srcdir = @abs_top_srcdir@
top_builddir = .
abs_top_builddir = @abs_top_builddir@
builddir = @builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
program_transform_name = @program_transform_name@
subdir = .
AR = @AR@
RANLIB = @RANLIB@
CC = @CC@
CCDEP = @CCDEP@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEPFLAGS = @DEPFLAGS@
CPPFLAGS = @CPPFLAGS@
CCLD = @CCLD@
LEX = @LEX@
AUTOCONF = @AUTOCONF@
LIBS = @LIBS@
SHELL = @SHELL@
OPTARGS = @OPTARGS@
SOPTARGS = @SOPTARGS@
DEFS = @DEFS@
GPUDIR = @GPUDIR@
USESUBDIRS = @USESUBDIRS@
NVCC = @NVCC@
GPUMPICOMPILER = @GPUMPICOMPILER@
INCLUDES = @INCLUDES@
LINK = $(CCLD) -o $@ ${LDFLAGS}
COMPILE = ${CC} ${DEFS} ${INCLUDES} -o $@ ${CFLAGS}
SMODULES =
MODULES = read_input gamma measure_gauge_action start \
expo matrix_utils get_staples update_backward_gauge \
measure_rectangles get_rectangle_staples \
test/check_geometry test/check_xchange \
test/overlaptests \
invert_eo invert_doublet_eo update_gauge \
getopt sighandler reweighting_factor \
source_generation boundary update_tm ranlxd \
mpi_init deriv_Sb deriv_Sb_D_psi ranlxs \
geometry_eo invert_overlap aligned_malloc \
prepare_source chebyshev_polynomial_nd Ptilde_nd \
reweighting_factor_nd rnd_gauge_trafo \
update_momenta integrator phmc \
little_D block operator \
temporalgauge spinor_fft X_psi P_M_eta \
jacobi fatal_error invert_clover_eo gettime @SPI_FILES@ \
@QUDA_INTERFACE@
## the GPU modules (all .cu files in $GPUDIR)
GPUSOURCES := $(wildcard $(srcdir)/$(GPUDIR)/*.cu)
GPUOBJECTS := $(patsubst $(srcdir)/$(GPUDIR)/%.cu, $(GPUDIR)/%.o, $(GPUSOURCES))
#GPUSOURCES_C := $(wildcard $(srcdir)/$(GPUDIR)/*.c)
#GPUOBJECTS_C := $(patsubst $(srcdir)/$(GPUDIR)/%.c, $(GPUDIR)/%.o, $(GPUSOURCES_C))
NOOPTMOD = test/check_xchange test/check_geometry
<<<<<<< HEAD
PROGRAMS = hmc_tm benchmark invert gen_sources \
check_locallity test_lemon hopping_test LapH_ev \
offline_measurement
=======
PROGRAMS = hmc_tm benchmark invert gen_sources test_DslashBSM \
check_locallity test_lemon hopping_test LapH_ev
>>>>>>> 514dd765d69bf52768b537a8dc1a161e8c00ca80
ALLOBJ = ${MODULES} ${PROGRAMS} ${SMODULES}
SUBDIRS = ${USESUBDIRS}
# delete the default suffix rules
.SUFFIXES:
<<<<<<< HEAD
# need to build modules before subdirs!
all: Makefile dep $(SUBDIRS) hmc_tm invert benchmark offline_measurement
=======
all: Makefile dep $(SUBDIRS) hmc_tm invert benchmark test_DslashBSM
>>>>>>> 514dd765d69bf52768b537a8dc1a161e8c00ca80
$(SUBDIRS):
$(MAKE) --directory=$@
# run the GIT-VERSION-GEN script to generate version information in git_hash.h
# making sure that we run in the correct directory
${top_srcdir}/git_hash.h:
@ ( cd @srcdir@ && sh GIT-VERSION-GEN )
-include $(addsuffix .d,$(ALLOBJ))
include ${top_srcdir}/Makefile.global
${top_srcdir}/read_input.c: ${top_srcdir}/read_input.l
ifneq (,$(findstring lex,${LEX}))
${LEX} -Ptmlqcd -i -t ${top_srcdir}/read_input.l > ${top_srcdir}/read_input.c
else
$(error Unable to find (f)lex, read_input.c not built. Please install (f)lex!)
endif
libhmc.a: ${addsuffix .o, ${MODULES} ${SMODULES}} Makefile
@rm -f libhmc.a
@${AR} cru libhmc.a ${addsuffix .o, ${MODULES} ${SMODULES}}
@$(RANLIB) libhmc.a
@cp libhmc.a ${top_builddir}/lib/libhmc.a
$(addsuffix .o,$(filter-out ${NOOPTMOD},${MODULES})): %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
${COMPILE} ${OPTARGS} -c $<
#here we don't need optimisation
$(addsuffix .o,$(filter ${NOOPTMOD},${MODULES})): %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
${COMPILE} -c $<
${addsuffix .o, ${SMODULES}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
${COMPILE} ${SOPTARGS} -c $<
${addsuffix .o, ${PROGRAMS}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h ${top_srcdir}/git_hash.h
${COMPILE} ${OPTARGS} -c $<
${PROGRAMS}: %: %.o libhmc.a $(SUBDIRS)
${LINK} [email protected] $(GPUOBJECTS) $(GPUOBJECTS_C) $(LIBS)
# The rules for unit tests are kept in a separate file for tidyness
include ${top_srcdir}/Makefile.tests
dep: $(addsuffix .d,$(ALLOBJ))
@ echo "...dependency files built"
install: Makefile
@mkdir -p $(bindir); \
for p in hmc_tm invert; do \
progname=`echo $$p | sed '$(program_transform_name)'`; \
echo "Installing $$p as $$progname in $(bindir)..."; \
cp $$p $(bindir)/$$progname; \
done; \
echo "done";
uninstall: Makefile
for p in hmc_tm invert; do \
progname=`echo $$p | sed '$(program_transform_name)'`; \
echo "Un-Installing $$progname in $(bindir)..."; \
rm $(bindir)/$$progname; \
done; \
echo "done";
compile-clean: compile-clean-recursive Makefile
rm -f *.o *.d test/*.o test/*.d tests/*.o tests/*.d
clean: clean-recursive Makefile
<<<<<<< HEAD
rm -f benchmark hmc_tm invert *.o *.d test/*.o test/*.d tests/*.o tests/*.d
distclean: distclean-recursive Makefile
rm -f benchmark hmc_tm invert *.o *.d *~ Makefile config.log config.status fixed_volume.h
=======
rm -f benchmark hmc_tm invert test_DslashBSM *.o *.d test/*.o test/*.d tests/*.o tests/*.d
distclean: distclean-recursive Makefile
rm -f benchmark hmc_tm invert test_DslashBSM *.o *.d *~ Makefile config.log config.status fixed_volume.h
>>>>>>> 514dd765d69bf52768b537a8dc1a161e8c00ca80
rm -f config.h
.PHONY: all ${SUBDIRS} ${top_srcdir}/git_hash.h clean compile-clean distclean dep install \
all-recursive all-debug-recursive all-profile-recursive \
clean-recursive distclean-recursive \
compile-clean-recursive