Missed a file from previous new test suite commit
[dyninst.git] / newtestsuite / make.module.tmpl
1 #
2 # make.module.tmpl for dyninst test suite
3 # Not intended to be a seperate makefile, but to be used in conjunction with
4 # higher level, platform-specific makefiles in the build directories
5
6 RM = rm -f
7 RMDIR ?= rmdir
8 M_GCC ?= purify $(GCC)
9 M_GXX ?= $(GXX)
10 DEPCC ?= $(GCC)
11 DEPENDFLAGS ?= -MM -MT
12 DEPENDDIR = ./depends
13 VPATH   = ../src $(DEPENDDIR)
14
15 #######################################################################
16 ###  Generate compiler id strings
17 ###
18 ###  COMPILERT_NATIVE_CC, COMPILERT_NATIVE_CXX must be defined prior to
19 ###  inclusion of this file.  gcc/g++ are handled here as platform-indep
20 ###
21 #######################################################################
22
23 EMPTY:=
24 BLANK:=$(EMPTY) $(EMPTY)
25 LPAREN:=(
26 RPAREN:=)
27 COMMA=,
28
29 COMPILERT_GCC = $(shell $(M_GCC) -v 2>&1 | grep version | head -1)
30 COMPILER1_GCC = $(subst $(BLANK),_,$(COMPILERT_GCC))
31 COMPILER2_GCC = $(subst $(LPAREN),_,$(COMPILER1_GCC))
32 COMPILER_GCC = $(subst $(RPAREN),_,$(COMPILER2_GCC))
33 MUTATEE_CFLAGS_GNU += -DCOMPILER='"$(COMPILER_GCC)"'
34
35 COMPILERT_GXX = $(shell $(M_GCC) -v 2>&1 | grep version | head -1)
36 COMPILER1_GXX = $(subst $(BLANK),_,$(COMPILERT_GXX))
37 COMPILER2_GXX = $(subst $(LPAREN),_,$(COMPILER1_GXX))
38 COMPILER_GXX = $(subst $(RPAREN),_,$(COMPILER2_GXX))
39 MUTATEE_CXXFLAGS_GNU += -DCOMPILER='"$(COMPILER_GXX)"'
40
41 COMPILER1_NATIVE_CC = $(subst $(BLANK),_,$(COMPILERT_NATIVE_CC))
42 COMPILER2_NATIVE_CC = $(subst $(LPAREN),_,$(COMPILER1_NATIVE_CC))
43 COMPILER_NATIVE_CC = $(subst $(RPAREN),_,$(COMPILER2_NATIVE_CC))
44 MUTATEE_CFLAGS_NATIVE += -DCOMPILER='"$(COMPILER_NATIVE_CC)"'
45
46 COMPILER1_NATIVE_CXX = $(subst $(BLANK),_,$(COMPILERT_NATIVE_CXX))
47 COMPILER2_NATIVE_CXX = $(subst $(LPAREN),_,$(COMPILER1_NATIVE_CXX))
48 COMPILER_NATIVE_CXX = $(subst $(RPAREN),_,$(COMPILER2_NATIVE_CXX))
49 MUTATEE_CXXFLAGS_NATIVE += -DCOMPILER='"$(COMPILER_NATIVE_CXX)"'
50
51 TEST_DEST = $(TO_CORE)/$(PROGRAM_DEST)/testprogs_new
52 LIB_DEST = $(TO_CORE)/$(LIBRARY_DEST)
53
54 #######################################################################
55 ###  Basic definitions (filename prefixes)
56 #######################################################################
57
58 FORALL_MUTATORS =  
59
60 FORALL_MUTATEES = mutatee_util
61
62 TESTLIB_STEMS   += libtestA libtestB libInstMe libLoadMe
63 TESTLIBS = $(addsuffix .so, $(TESTLIB_STEMS))
64
65 ifdef M_ABI
66 TESTLIBS_ABI = $(addsuffix _$(M_ABI).so, $(TESTLIB_STEMS))
67 TESTLIBS_ABI += libTest12_$(M_ABI).so
68 endif
69
70 SRCS_LIBTESTSUITE = test_lib.C \
71                     test_lib_soExecution.C \
72                     test_lib_mutateeStart.C \
73                     test_lib_test7.C \
74                     test_lib_test9.C \
75                     Process_data.C \
76                     ParameterDict.C \
77                     Callbacks.C \
78                     TestData.C \
79                     TestMutator.C
80 # FIXME Remove the line below once I'm sure everything is working properly
81 #                   test_info_new.gen.C
82
83
84 SRCS_TEMPLATES = test_driver_templates.C 
85
86 OBJS_LIBTESTSUITE = $(SRCS_LIBTESTSUITE:%.C=%.o)
87 OBJS_TEMPLATES = $(SRCS_TEMPLATES:%.C=%.o)
88
89 ifdef USE_LIBTESTSUITE_EXT_A
90 LIBTESTSUITE = libtestSuite.a
91 else
92 LIBTESTSUITE = libtestSuite.so
93 endif
94
95 #######################################################################
96 ###  A list of all the targets we're building, for install purposes
97 #######################################################################
98
99 ALL_TARGETS                     = $(MUTATORS_SO)
100 # ALL_TARGETS                     += $(MUTATEES_GCC) $(MUTATEES_GXX)
101 ALL_TARGETS                     += $(TESTLIBS)
102 #ALL_TARGETS                    += libTest12.so
103 #ALL_TARGETS                    += test11
104 ALL_TARGETS                     += runTests
105 ALL_TARGETS                     += test_driver
106
107 ALL_TARGETS_DEST                = $(addprefix $(TEST_DEST)/,$(ALL_TARGETS))
108 LIBTESTSUITE_DEST               = $(addprefix $(LIB_DEST)/,$(LIBTESTSUITE))
109
110 #######################################################################
111 ###  Some pattern rules
112 #######################################################################
113
114 DYNINST_INCDIR = -I$(TO_CORE)/dyninstAPI/h 
115 CXXFLAGS += $(DYNINST_INCDIR)
116 CXXTFLAGS := $(filter-out -fno-implicit-templates, $(CXXFLAGS))
117 #CXXTFLAGS += -fimplicit-templates
118
119 #%_$(NATIVE_CC).o : %.c
120 #       echo zzrule 1zz
121 #       $(NATIVE_CC) -c $< $(CFLAGS_NATIVE) $(MUTATEE_CFLAGS_NATIVE) -o $@
122 #%_$(NATIVE_CXX).o : %.c
123 #       echo zzrule 2zz
124 #       $(NATIVE_CXX) -c $< $(CXXFLAGS_NATIVE) $(MUTATEE_CXXFLAGS_NATIVE) -o $@
125
126 #%_gcc.o: %.c
127 #       echo zzrule 3zz
128 #       $(M_GCC) -c $< $(CFLAGS) $(MUTATEE_CFLAGS_GNU) -o $@
129 #%_g++.o: %.c 
130 #       echo zzrule 4zz
131 #       $(M_GXX) $(CXXFLAGS) $(MUTATEE_CXXFLAGS_GNU) -c $< -o $@
132 #%_g++.o: %.C 
133 #       echo zzrule 5zz
134 #       $(M_GXX) $(CXXFLAGS) $(MUTATEE_CXXFLAGS_GNU) -c $< -o $@
135
136 #ifdef M_ABI
137 #%_gcc_$(M_ABI).o: %.c
138 #       echo zzrule 6zz
139 #       $(M_GCC) $(M_ABI_FLAG) -c $< $(CFLAGS) $(MUTATEE_CFLAGS_GNU) -o $@
140 #%_g++_$(M_ABI).o: %.c
141 #       echo zzrule 7zz
142 #       $(M_GXX) $(M_ABI_FLAG) $(CXXFLAGS) $(MUTATEE_CXXFLAGS_GNU) -c $< -o $@
143 #%_g++_$(M_ABI).o: %.C
144 #       echo zzrule 8zz
145 #       $(M_GXX) $(M_ABI_FLAG) $(CXXFLAGS) $(MUTATEE_CXXFLAGS_GNU) -c $< -o $@
146 #endif
147
148 #.C.o:
149 #       echo zzrule 9zz
150 #       $(CXX) -c $< $(CXXFLAGS) $(MUTATOR_CXXFLAGS) -o $@
151
152 $(TEST_DEST)/%: %
153         -$(CP) $< $(TEST_DEST)
154         -$(CHMOD) 750 $(TEST_DEST)/$<
155
156 $(LIB_DEST)/%: %
157         -$(CP) $< $(LIB_DEST)
158         -$(CHMOD) 750 $(LIB_DEST)/$<
159
160 $(TEST_DEST_LN)/%: %
161         -$(LN) $< $(TEST_DEST)
162
163 $(LIB_DEST_LN)/%: %
164         -$(LN) $< $(LIB_DEST)
165
166
167 #######################################################################
168 ###  High level targets
169 #######################################################################
170
171 MUTATOR_LDFLAGS := -L. -ltestSuite $(LIBDIR) -lcommon -lsymtabAPI -ldyninstAPI $(MUTATOR_LIBS) $(MUTATOR_LDFLAGS) -lpthread
172 MUTATOR_SO_LDFLAGS = $(filter-out -liberty, $(MUTATOR_LDFLAGS))
173
174
175 # all: testlibs mutators mutatees drivers
176 all: make.mutators.gen make.solo_mutatee.gen testlibs mutators drivers
177 # See also an addition to the 'all' rule at the end of the file
178
179 ### Automatically generated variables; generated by makegen.py
180 # TODO Have makegen.py create this file
181 include make.mutators.gen
182
183 echo:
184         @echo "DEPS TESTLIBS = $(DEPS_TESTLIBS)"; \
185         echo "MUTATEES_NATIVE_CXX = $(MUTATEES_NATIVE_CXX)"; \
186         echo "MUTATEES_NATIVE_CC = $(MUTATEES_NATIVE_CC)"; \
187         echo "MUTATORS = $(MUTATORS)" ; \
188         echo "MUTATEES_GCC_ABI = $(MUTATEES_GCC_ABI)"
189
190 # *DEBUG* install disabled for now
191 #install: $(TEST_DEST) $(ALL_TARGETS_DEST) $(LIB_DEST) $(LIBTESTSUITE_DEST)
192 #       @echo "install completed"
193 install:
194         @echo "install skipped"
195
196 symlink: $(TEST_DEST) $(LIBTESTSUITE_DEST) $(ALL_TARGETS)
197         @for i in $(ALL_TARGETS); do \
198            $(RM) $(TEST_DEST)/$$i; \
199            echo $(LN) $(PWD)/$$i $(TEST_DEST)/$$i; \
200            $(LN) $(PWD)/$$i $(TEST_DEST)/$$i; \
201         done
202
203         @$(RM) $(LIB_DEST)/$(LIBTESTSUITE)
204         $(LN) $(PWD)/$(LIBTESTSUITE) $(LIB_DEST)/$(LIBTESTSUITE)
205
206 clean: clean_solo_mutatees
207         $(RM) *.da *.bb. *.bbg 
208         $(RM) $(TESTLIBS) $(TESTLIBS_ABI) $(LIBTESTSUITE) test_driver runTests libTest12.so
209         $(RM) $(MUTATORS_SO) $(MUTATEES_GCC) $(MUTATEES_GXX) $(MUTATEES_GCC_ABI) $(MUTATEES_GXX_ABI) $(MUTATEES_G77) $(MUTATEES_GXX_ONLY)
210         $(RM) *.o $(MUTATEES_NATIVE_CC) $(MUTATEES_NATIVE_CXX) $(MUTATEES_NATIVE_FC) $(MUTATEES_NATIVE_CXX_OMP) $(MUTATEES_NATIVE_CXX_ONLY)
211         $(RM) test11
212         $(RM) imagefile
213         $(RM) core core.*
214         $(RM) -r _dyninstsaved*
215         $(RM) *.ii *.ti
216         $(RM) .__afs*
217         $(RM) *.gen *.pl tuples
218
219 distclean: clean
220         @if [ -d $(DEPENDDIR) ]; then \
221           $(RM) $(DEPENDDIR)/*.dep; \
222           rmdir $(DEPENDDIR); \
223          fi
224
225 ifdef M_ABI
226 $(CALL35_1_OBJ_ABI): $(CALL35_1_SRC_ABI)
227         $(M_GCC) $(M_ABI_FLAG) -c $< $(CFLAGS) $(MUTATEE_CFLAGS_GNU) -o $@ 
228 endif
229
230
231 #mutators: $(MUTATORS_SO) test11
232 mutatees: gnu_mutatees native_mutatees
233 gnu_mutatees: $(MUTATEES_GCC) $(MUTATEES_GXX) $(MUTATEES_G77) $(MUTATEES_GCC_ABI) $(MUTATEES_GXX_ABI)
234 native_mutatees: $(MUTATEES_NATIVE_CC) $(MUTATEES_NATIVE_CXX) $(MUTATEES_NATIVE_FC) $(MUTATEES_NATIVE_CXX_OMP) $(MUTATEES_NATIVE_CXX_ONLY)
235 testlibs: $(TESTLIBS) $(TESTLIBS_ABI) $(LIBTESTSUITE) libTest12.so
236
237 drivers: test_driver runTests
238
239 .PHONY: clean install distclean mutators mutatees testlibs gnu_mutatees native_mutatees echo all
240
241 # Despite the look, this isn't actually a pattern rule and so is
242 # defined _after_ all:
243 # $(CALL35_1_OBJ): $(CALL35_1_SRC)
244 #       $(M_GCC) -c $< $(CFLAGS) $(MUTATEE_CFLAGS_GNU) -o $@ 
245
246 # $(TEST6_AS_OBJ_GNU): $(TEST6_AS_SRC)
247 #       $(TEST6_AS_GNU) $(TEST6_ASFLAGS_GNU) -o $@ $<
248
249 #######################################################################
250 ###  Build command for test libraries
251 #######################################################################
252
253 $(TESTLIBS): %.so : %.c $(DEPENDDIR)/%.dep
254 ifdef MAKE_SHARED_LIB
255         $(CC) -g -c $(CFLAGS) -I$(TO_CORE)/dyninstAPI_RT/h $(CFLAGS_TESTLIBS) $(filter %.c, $^) -o $*.o
256         $(MAKE_SHARED_LIB) $(TESTLIB_FLAGS) $*.o -o $@
257 else
258         $(CC) $(TESTLIB_FLAGS) -I$(TO_CORE)/dyninstAPI_RT/h -I../src/ $(filter %.c,$^) -o $@
259 endif
260
261 ifdef M_ABI
262 $(TESTLIBS_ABI): %_$(M_ABI).so : %.c $(DEPENDDIR)/%.dep
263 ifdef MAKE_SHARED_LIB
264         $(CC) -g -c $(CFLAGS) $(CFLAGS_TESTLIBS) $(filter %.c, $^) -o $*.o
265         $(MAKE_SHARED_LIB) $(TESTLIB_FLAGS) $*.o -o $@
266 else
267         $(CC) $(M_ABI_FLAG) $(TESTLIB_FLAGS) -I$(TO_CORE)/dyninstAPI_RT/h -I../src/ $(filter %.c,$^) -o $@
268 endif
269 endif
270
271 $(OBJS_TEMPLATES): %.o : ../src/%.C 
272         $(M_GXX) -c -o $@ $(CXXTFLAGS) -I../src/ ../src/$*.C
273
274 test_lib_templates.o : ../src/test_lib_templates.C 
275         $(M_GXX) -c -o $@ -fPIC $(CXXTFLAGS) -I../src/ ../src/$*.C
276
277 $(OBJS_LIBTESTSUITE): %.o : ../src/%.C $(DEPENDDIR)/%.dep
278         $(M_GXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/$*.C
279
280 $(LIBTESTSUITE) : $(OBJS_LIBTESTSUITE) test_lib_templates.o test_lib.h
281         $(CXX) -shared $(TESTSUITE_FLAGS) $(LIBDIR) -ldyninstAPI -lsymtabAPI -lcommon $(LIBS_LIBTESTSUITE) $(OBJS_LIBTESTSUITE) test_lib_templates.o -o $@
282
283 libTest12.so: libTest12.c $(DEPENDDIR)/libTest12.dep
284 ifdef MAKE_SHARED_LIB
285         $(CC) -g -c $(CFLAGS) -I$(TO_CORE)/dyninst_RT/h $(CFLAGS_TESTLIBS) $(filter %.c, $^)  -o libTest12.o
286         $(MAKE_SHARED_LIB) $(TESTLIB_FLAGS) $(LIBTEST12_FLAGS) libTest12.o -o $@
287 else
288         $(CC) $(TESTLIB_FLAGS) -I$(TO_CORE)/dyninstAPI_RT/h $(LIBTEST12_FLAGS) $(filter %.c, $^) -o $@
289 endif
290
291 #######################################################################
292 ###  Special Prerequisites for specific Mutatees:
293 #######################################################################
294
295 # Test 1 mutatee depends on two extra files
296 # test1.mutatee_gcc: $(CALL35_1_OBJ) test1.mutateeCommon_gcc.o
297 # test1.mutatee_g++: $(CALL35_1_OBJ) test1.mutateeCommon_g++.o
298 # test1.mutatee_$(NATIVE_CC): $(CALL35_1_SRC) test1.mutateeCommon.c
299 # test1.mutatee_$(NATIVE_CXX): $(CALL35_1_SRC) test1.mutateeCommon.c
300
301 # ifdef M_ABI
302 # test1.mutatee_gcc_$(M_ABI): $(CALL35_1_OBJ_ABI) test1.mutateeCommon_gcc_m32.o
303 # test1.mutatee_g++_$(M_ABI): $(CALL35_1_OBJ_ABI) test1.mutateeCommon_g++_m32.o
304 # test1.mutatee_$(NATIVE_CC)_$(M_ABI): $(CALL35_1_SRC_ABI) test1.mutateeCommon.c
305 # test1.mutatee_$(NATIVE_CXX)_$(M_ABI): $(CALL35_1_SRC_ABI) test1.mutateeCommon.c
306 # endif
307
308 # Test 6 mutatee depends on a platform-specific asm file
309 # test6.mutatee_$(NATIVE_CC): $(TEST6_AS_OBJ_GNU) 
310 # test6.mutatee_$(NATIVE_CXX): $(TEST6_AS_OBJ_GNU) 
311 # test6.mutatee_gcc: $(TEST6_AS_OBJ_GNU) 
312
313 # libInstMe.so must be built before test9.mutatee
314 # test9.mutatee_gcc: libInstMe.so
315 # test9.mutatee_$(NATIVE_CC): libInstMe.so
316
317 # ifdef M_ABI
318 # test9.mutatee_gcc: libInstMe_$(M_ABI).so
319 # test9.mutatee_$(NATIVE_CC): libInstMe_(M_ABI).so
320 # endif
321
322 # test13.mutatee_$(NATIVE_CXX): mutatee_util_mt_$(NATIVE_CXX).o
323 # test13.mutatee_$(NATIVE_CC): mutatee_util_mt_$(NATIVE_CC).o
324 # test13.mutatee_$(M_GCC): mutatee_util_mt_$(M_GCC).o
325 # test13.mutatee_$(M_GXX): mutatee_util_mt_$(M_GXX).o
326 # test14.mutatee_$(NATIVE_CXX): mutatee_util_mt_$(NATIVE_CXX).o
327 # test14.mutatee_$(NATIVE_CC): mutatee_util_mt_$(NATIVE_CC).o
328 # test14.mutatee_$(M_GCC): mutatee_util_mt_$(M_GCC).o
329 # test14.mutatee_$(M_GXX): mutatee_util_mt_$(M_GXX).o
330 # test15.mutatee_$(NATIVE_CXX): mutatee_util_mt_$(NATIVE_CXX).o
331 # test15.mutatee_$(NATIVE_CC): mutatee_util_mt_$(NATIVE_CC).o
332 # test15.mutatee_$(M_GCC): mutatee_util_mt_$(M_GCC).o
333 # test15.mutatee_$(M_GXX): mutatee_util_mt_$(M_GXX).o
334
335 # test14.mutatee_$(NATIVE_CXX): mutatee_util_mt_$(NATIVE_CXX).o
336 # test14.mutatee_$(NATIVE_CC): mutatee_util_mt_$(NATIVE_CC).o
337 # test14.mutatee_$(M_GCC): mutatee_util_mt_$(M_GCC).o
338 # test14.mutatee_$(M_GXX): mutatee_util_mt_$(M_GXX).o
339
340 # test15.mutatee_$(NATIVE_CXX): mutatee_util_mt_$(NATIVE_CXX).o
341 # test15.mutatee_$(NATIVE_CC): mutatee_util_mt_$(NATIVE_CC).o
342 # test15.mutatee_$(M_GCC): mutatee_util_mt_$(M_GCC).o
343 # test15.mutatee_$(M_GXX): mutatee_util_mt_$(M_GXX).o
344
345 # ifdef M_ABI
346 # test13.mutatee_$(NATIVE_CXX)_$(M_ABI): mutatee_util_mt_$(NATIVE_CXX)_$(M_ABI).o
347 # test13.mutatee_$(NATIVE_CC)_$(M_ABI): mutatee_util_mt_$(NATIVE_CC)_$(M_ABI).o
348 # test13.mutatee_$(M_GCC)_$(M_ABI): mutatee_util_mt_$(M_GCC)_$(M_ABI).o
349 # test13.mutatee_$(M_GXX)_$(M_ABI): mutatee_util_mt_$(M_GXX)_$(M_ABI).o
350 # test14.mutatee_$(NATIVE_CXX)_$(M_ABI): mutatee_util_mt_$(NATIVE_CXX)_$(M_ABI).o
351 # test14.mutatee_$(NATIVE_CC)_$(M_ABI): mutatee_util_mt_$(NATIVE_CC)_$(M_ABI).o
352 # test14.mutatee_$(M_GCC)_$(M_ABI): mutatee_util_mt_$(M_GCC)_$(M_ABI).o
353 # test14.mutatee_$(M_GXX)_$(M_ABI): mutatee_util_mt_$(M_GXX)_$(M_ABI).o
354 # test15.mutatee_$(NATIVE_CXX)_$(M_ABI): mutatee_util_mt_$(NATIVE_CXX)_$(M_ABI).o
355 # test15.mutatee_$(NATIVE_CC)_$(M_ABI): mutatee_util_mt_$(NATIVE_CC)_$(M_ABI).o
356 # test15.mutatee_$(M_GCC)_$(M_ABI): mutatee_util_mt_$(M_GCC)_$(M_ABI).o
357 # test15.mutatee_$(M_GXX)_$(M_ABI): mutatee_util_mt_$(M_GXX)_$(M_ABI).o
358
359 # test14.mutatee_$(NATIVE_CXX)_$(M_ABI): mutatee_util_mt_$(NATIVE_CXX)_$(M_ABI).o
360 # test14.mutatee_$(NATIVE_CC)_$(M_ABI): mutatee_util_mt_$(NATIVE_CC)_$(M_ABI).o
361 # test14.mutatee_$(M_GCC)_$(M_ABI): mutatee_util_mt_$(M_GCC)_$(M_ABI).o
362 # test14.mutatee_$(M_GXX)_$(M_ABI): mutatee_util_mt_$(M_GXX)_$(M_ABI).o
363
364 # test15.mutatee_$(NATIVE_CXX)_$(M_ABI): mutatee_util_mt_$(NATIVE_CXX)_$(M_ABI).o
365 # test15.mutatee_$(NATIVE_CC)_$(M_ABI): mutatee_util_mt_$(NATIVE_CC)_$(M_ABI).o
366 # test15.mutatee_$(M_GCC)_$(M_ABI): mutatee_util_mt_$(M_GCC)_$(M_ABI).o
367 # test15.mutatee_$(M_GXX)_$(M_ABI): mutatee_util_mt_$(M_GXX)_$(M_ABI).o
368
369 # endif
370
371 # MUTATEE_SPECIFIC_LIBS is analyzed by gmake when constructing the link line
372 # If you want to specify that a specific library should be used to link a specific
373 # mutatee, add an entry to this variable in the format <testno>.-libwhatever
374
375 # The <testno>. will be stripped off, leaving -libwhatever on the link line
376
377 # MUTATEE_SPECIFIC_LIBS_GNU     += $(MUTATEE_TEST9_EXTRA_LIB)
378 # MUTATEE_SPECIFIC_LIBS_GNU     += 12.-lpthread
379 # MUTATEE_SPECIFIC_LIBS_NATIVE  += $(MUTATEE_TEST9_EXTRA_LIB)
380 # MUTATEE_SPECIFIC_LIBS_NATIVE  += 12.-lpthread
381 # MUTATEE_SPECIFIC_LIBS_GNU     += 13.-lpthread
382 # MUTATEE_SPECIFIC_LIBS_GNU     += 14.-lpthread
383 # MUTATEE_SPECIFIC_LIBS_GNU     += 15.-lpthread
384 # MUTATEE_SPECIFIC_LIBS_NATIVE  += 13.-lpthread
385 # MUTATEE_SPECIFIC_LIBS_NATIVE  += 14.-lpthread
386 # MUTATEE_SPECIFIC_LIBS_NATIVE  += 15.-lpthread
387
388 # ifdef MUTATEE_USE_LIBDL_SELECTIVELY
389 # MUTATEE_SPECIFIC_LIBS_GNU     += 1.-ldl
390 # MUTATEE_SPECIFIC_LIBS_NATIVE  += 1.-ldl
391 # MUTATEE_SPECIFIC_LIBS_GNU     += 2.-ldl
392 # MUTATEE_SPECIFIC_LIBS_NATIVE  += 2.-ldl
393 # MUTATEE_SPECIFIC_LIBS_GNU     += 12.-ldl
394 # MUTATEE_SPECIFIC_LIBS_NATIVE  += 12.-ldl
395
396 # ifdef M_ABI
397 # MUTATEE_SPECIFIC_LIBS_GNU_ABI         += 1.-ldl
398 # MUTATEE_SPECIFIC_LIBS_GNU_ABI         += 2.-ldl
399 # MUTATEE_SPECIFIC_LIBS_GNU_ABI         += 12.-ldl
400 # endif
401 # endif
402
403 # ifdef M_ABI
404 # MUTATEE_SPECIFIC_LIBS_GNU_ABI         += $(MUTATEE_TEST9_EXTRA_LIB_ABI)
405 # MUTATEE_SPECIFIC_LIBS_GNU_ABI += 12.-lpthread
406 # MUTATEE_SPECIFIC_LIBS_GNU_ABI         += 13.-lpthread
407 # MUTATEE_SPECIFIC_LIBS_GNU_ABI         += 14.-lpthread
408 # MUTATEE_SPECIFIC_LIBS_GNU_ABI         += 15.-lpthread
409 # endif
410
411 #######################################################################
412 ###  Generic mutatee build rules (GNU and NATIVE):
413 #######################################################################
414
415 # GNU Mutatees
416
417 #$(MUTATEES_GCC): test%.mutatee_gcc : test%.mutatee_gcc.o $(DEPENDDIR)/test%.mutatee_gcc.dep mutatee_util_gcc.o
418 #       $(M_GCC) -o $@ $(filter %.o,$^) $(MUTATEE_LDFLAGS_GNU) $(MUTATEE_LIBS) \
419 #            $(subst $*.,,$(filter $*.%, $(MUTATEE_SPECIFIC_LIBS_GNU)))
420
421 #$(MUTATEES_GXX): test%.mutatee_g++ : test%.mutatee_g++.o $(DEPENDDIR)/test%.mutatee_g++.dep mutatee_util_g++.o
422 #       $(M_GXX) -o $@ $(filter %.o,$^) $(MUTATEE_LDFLAGS_GNU) $(MUTATEE_LIBS) \
423 #            $(subst $*.,,$(filter $*.%, $(MUTATEE_SPECIFIC_LIBS_GNU)))
424
425 # GNU Secondary ABI Mutatees
426 # ifdef M_ABI
427 # $(MUTATEES_GCC_ABI): test%.mutatee_gcc_$(M_ABI) : test%.mutatee_gcc_$(M_ABI).o $(DEPENDDIR)/test%.mutatee_gcc.dep mutatee_util_gcc_$(M_ABI).o
428 #       $(M_GCC) $(M_ABI_FLAG) -o $@ $(filter %.o,$^) $(MUTATEE_LDFLAGS_GNU) $(MUTATEE_LIBS) \
429 #             $(subst $*.,,$(filter $*.%, $(MUTATEE_SPECIFIC_LIBS_GNU_ABI)))
430
431 # $(MUTATEES_GXX_ABI): test%.mutatee_g++_$(M_ABI) : test%.mutatee_g++_$(M_ABI).o $(DEPENDDIR)/test%.mutatee_g++.dep mutatee_util_g++_$(M_ABI).o
432 #       $(M_GXX) $(M_ABI_FLAG) -o $@ $(filter %.o,$^) $(MUTATEE_LDFLAGS_GNU) $(MUTATEE_LIBS) \
433 #             $(subst $*.,,$(filter $*.%, $(MUTATEE_SPECIFIC_LIBS_GNU_ABI)))
434 # endif
435
436
437 # GNU Fortran (g77) mutatees
438
439 # There is no real advantage to generality here since there is only one fortran mutatee
440 # (ie for test1), thus all constituent files are built explicitly
441
442 ifdef M_G77
443 test1.mutatee_g77.o: ../src/test1.mutateeFort.F
444         $(M_G77) -g  $(MUTATEE_G77_FFLAGS) -c -o $@ $^ 
445 test1.mutateeFortC_g77.o: $(TEST1_FORTRAN_CSOURCE)
446         $(M_GCC) $(MUTATEE_G77_CFLAGS) $(filter %.c,$^) -o $@
447
448 $(MUTATEES_G77): test%.mutatee_g77 : test%.mutatee_g77.o test1.mutateeFortC_g77.o test1.mutateeCommon_gcc.o mutatee_util_gcc.o $(DEPENDDIR)/test%.mutatee_g77.dep
449         $(M_G77) -o $@ $(filter %.o,$^) $(MUTATEE_G77_LDFLAGS) $(MUTATEE_LIBS) 
450 endif
451
452 # Native Mutatees
453
454 #ifdef NATIVE_CC
455 #$(MUTATEES_NATIVE_CC): test%.mutatee_$(NATIVE_CC) : test%.mutatee.c mutatee_util_$(NATIVE_CC).o
456 #       $(NATIVE_CC) $(MUTATEE_CFLAGS_NATIVE) $(MUTATEE_LDFLAGS_NATIVE) -o $@ $(MUTATEE_LIBS) $(filter %.c  %.s %.S %.o, $^) \
457 #            $(subst $*.,,$(filter $*.%, $(MUTATEE_SPECIFIC_LIBS_NATIVE))) 
458
459 #endif
460
461 #ifdef NATIVE_CXX
462 #$(MUTATEES_NATIVE_CXX): test%.mutatee_$(NATIVE_CXX) : test%.mutatee.c mutatee_util_$(NATIVE_CXX).o
463 #       $(NATIVE_CXX) $(MUTATEE_CXXFLAGS_NATIVE) -o $@ $(filter %.c %.s %.S %.o,$^) $(MUTATEE_LDFLAGS_NATIVE) $(MUTATEE_LIBS) \
464 #            $(subst $*.,,$(filter $*.%, $(MUTATEE_SPECIFIC_LIBS_NATIVE)))
465
466 #$(MUTATEES_NATIVE_CXX_ONLY): test%.mutatee_$(NATIVE_CXX) : test%.mutatee.C mutatee_util_$(NATIVE_CXX).o
467 #       $(NATIVE_CXX) $(MUTATEE_CXXFLAGS_NATIVE) -o $@ $(filter %.C %.s %.S %.o,$^) $(MUTATEE_LDFLAGS_NATIVE) $(MUTATEE_LIBS) \
468 #            $(subst $*.,,$(filter $*.%, $(MUTATEE_SPECIFIC_LIBS_NATIVE)))
469 #endif
470
471
472 # Native Fortran mutatees
473
474 # There is no real advantage to generality here since there is only one fortran mutatee
475 # (ie for test1), thus all constituent files are built explicitly
476
477 ifdef NATIVE_FC 
478 test1.mutatee_$(NATIVE_FC).o: ../src/test1.mutateeFort.F
479         $(NATIVE_FC) -g  $(MUTATEE_NATIVE_FFLAGS) -c -o $@ $^ 
480 test1.mutateeFortC_$(NATIVE_FC).o: ../src/test1.mutateeFortC.c
481         $(NATIVE_FORTRAN_CC) $(MUTATEE_NATIVE_FC_CFLAGS) -c $(filter %.c,$^) -o $@
482
483 $(MUTATEES_NATIVE_FC): test%.mutatee_$(NATIVE_FC) : test%.mutatee_$(NATIVE_FC).o test1.mutateeFortC_$(NATIVE_FC).o test1.mutateeCommon_$(NATIVE_FORTRAN_CC).o mutatee_util_$(NATIVE_FORTRAN_CC).o $(DEPENDDIR)/test%.mutatee_$(NATIVE_FC).dep
484         $(NATIVE_FC) -o $@ $(filter %.o,$^) $(MUTATEE_NATIVE_FC_LDFLAGS) $(MUTATEE_LIBS) 
485 endif
486
487 # Native OpenMP mutatees
488 # There is no real advantage to generality here since there is only one OpenMP mutatee
489 # (ie for test16), thus all constituent files are built explicitly
490 ifdef NATIVE_CXX_OMP 
491 test16.mutatee_$(NATIVE_CXX_OMP).o: ../src/test16.mutatee.c
492         $(NATIVE_CXX_OMP) -g  $(MUTATEE_NATIVE_CXX_CFLAGS) -o $@ $^ 
493
494 $(MUTATEES_NATIVE_CXX_OMP): test%.mutatee_$(NATIVE_CXX_OMP) : test%.mutatee_$(NATIVE_CXX_OMP).o $(DEPENDDIR)/test%.mutatee_$(NATIVE_CXX_OMP).dep
495         $(NATIVE_CXX_OMP) $(MUTATEE_NATIVE_CXX_OMP_LDFLAGS) -o $@ $(filter %.o,$^) $(MUTATEE_LIBS) 
496
497 #$(MUTATEES_NATIVE_CXX_OMP): ../src/test16.mutatee.c
498 #       $(NATIVE_CXX_OMP) -g  $(MUTATEE_NATIVE_CXX_CFLAGS) -o $@ $^ 
499
500 endif
501
502
503 # Install directory
504 $(TEST_DEST): 
505         mkdir $(TEST_DEST)
506
507 #######################################################################
508 ###  Generic Mutator build rule:
509 ###
510 ###  resorts to pattern matching test% (matches test1, test2, ... etc)
511 ###  to generate correct, minimal set of prerequisites for each test.
512 ###  It would be nicer to just match something simpler that wasn't 
513 ###  name-dependant, but gnu make is not making this easy.
514 ###
515 #######################################################################
516
517 $(OBJS_ALL_MUTATORS): %.o : %.C $(DEPENDDIR)/%.dep
518         $(CXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/$*.C
519
520 MUTATEE_DEFS := -Dgnu_cc=_gcc -Dgnu_cxx=_g++
521
522 ifdef M_ABI
523 MUTATEE_DEFS += -Dgnu_abi_cc=_gcc_$(M_ABI) -Dgnu_abi_cxx=_g++_$(M_ABI) -Dm_abi
524 endif
525
526 ifdef M_G77
527 MUTATEE_DEFS += -Dgnu_fc=_g77
528 endif
529
530 ifdef NATIVE_CC
531 MUTATEE_DEFS += -Dnative_cc=_$(NATIVE_CC)
532 endif
533
534 ifdef NATIVE_CXX
535 MUTATEE_DEFS += -Dnative_cxx=_$(NATIVE_CXX)
536 endif
537
538 ifdef NATIVE_FC
539 MUTATEE_DEFS += -Dnative_fc=_$(NATIVE_FC)
540 endif
541
542 runTests.o: ../src/runTests.C $(DEPENDDIR)/runTests.dep
543         $(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) ../src/runTests.C
544 runTests_static.o: ../src/runTests.C $(DEPENDDIR)/runTests.dep
545         $(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) -DSTATIC_TEST_DRIVER ../src/runTests.C
546
547 runTests-utils.o: ../src/runTests-utils.C $(DEPENDDIR)/runTests-utils.dep
548         $(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) ../src/runTests-utils.C
549
550 runTests: runTests.o runTests-utils.o test_driver_templates.o 
551         $(CXX) $(CXXFLAGS) -o $@ runTests.o runTests-utils.o test_driver_templates.o 
552 runTests_static: runTests_static.o runTests-utils.o test_driver_templates.o 
553         $(CXX) $(CXXFLAGS) -o runTests runTests_static.o runTests-utils.o test_driver_templates.o 
554
555 test_driver.o: ../src/test_driver.C $(DEPENDDIR)/test_driver.dep
556         $(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) ../src/test_driver.C
557
558 test_driver_static.o: ../src/test_driver.C $(DEPENDDIR)/test_driver_static.dep
559         $(CXX) -c -o $@ -DSTATIC_TEST_DRIVER $(CXXFLAGS) $(MUTATEE_DEFS) ../src/test_driver.C
560
561 test_driver: test_driver.o test_driver_templates.o test_info_new.gen.o $(LIBTESTSUITE_DEST) $(DEPENDDIR)/test_driver.dep $(LIBTESTSUITE)
562         $(CXX) -o $@ test_driver.o test_driver_templates.o test_info_new.gen.o $(MUTATOR_LDFLAGS) $(LIBS) 
563
564 #$(MUTATORS_SO): test%.so : test%.o $(OBJS_FORALL_MUTATORS) $(DEPENDDIR)/test%.dep $(LIBTESTSUITE)
565 #       echo "*** Building mutator $<"
566 #       $(CXX) -o $@ -shared $(filter %.o,$^) $(MUTATOR_SO_LDFLAGS) $(LIBDIR) $(LIBS) $(LDFLAGS) 
567 #ifndef NO_OPT_FLAG
568 #ifdef STRIP_SO
569 #       $(STRIP_SO) $@
570 #endif
571 #endif
572
573 #######################################################################
574 ###  Depends
575 #######################################################################
576
577 DEPS_MUTATORS           += $(addprefix $(DEPENDDIR)/,$(addsuffix .dep,$(MUTATORS)))
578 DEPS_MUTATORS           += $(addprefix $(DEPENDDIR)/,$(addsuffix .dep,$(FORALL_MUTATORS)))
579 DEPS_MUTATORS           += $(DEPENDDIR)/test_driver.dep
580 DEPS_MUTATORS           += $(DEPENDDIR)/runTests.dep $(DEPENDDIR)/runTests-utils.dep
581
582 DEPS_MUTATEES_GCC       += $(addprefix $(DEPENDDIR)/,$(addsuffix _gcc.dep, $(MUTATEES_C)))
583 DEPS_MUTATEES_GXX       += $(addprefix $(DEPENDDIR)/,$(addsuffix _g++.dep, $(MUTATEES_CXX)))
584 DEPS_MUTATEES_GXX       += $(addprefix $(DEPENDDIR)/,$(addsuffix _g++.dep, $(MUTATEES_CXX_ONLY)))
585 DEPS_TESTLIBS           += $(addprefix $(DEPENDDIR)/,$(addsuffix .dep,$(TESTLIB_STEMS)))
586 DEPS_TESTLIBS           += $(DEPENDDIR)/libTest12.dep
587 DEPS_LIBTESTSUITE        = $(addprefix $(DEPENDDIR)/,$(SRCS_LIBTESTSUITE:%.C=%.dep))
588
589 ifdef M_G77
590 DEPS_MUTATEES_G77       += $(addprefix $(DEPENDDIR)/,$(addsuffix _g77.dep, $(MUTATEES_FORTRAN)))
591 endif
592
593 ifdef NATIVE_FC
594 DEPS_MUTATEES_NATIVE_FC += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_FC).dep, $(MUTATEES_FORTRAN)))
595 endif
596
597 ifdef NATIVE_CXX_OMP
598 DEPS_MUTATEES_NATIVE_CXX_OMP += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CXX_OMP).dep, $(MUTATEES_OPENMP)))
599 endif
600
601 ifdef NATIVE_CC
602 DEPS_MUTATEES_NATIVE_CC += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CC).dep, $(MUTATEES_C)))
603 endif
604
605 ifdef NATIVE_CXX
606 DEPS_MUTATEES_NATIVE_CXX += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CXX).dep, $(MUTATEES_CXX)))
607 DEPS_MUTATEES_NATIVE_CXX += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CXX).dep, $(MUTATEES_CXX_ONLY)))
608 endif
609
610
611 depend: $(DEPS_MUTATORS)
612
613 depend_dir:
614         @echo "mut deps: $(DEPS_MUTATORS)"
615         @if [ -d $(DEPENDDIR) ]; then \
616           echo "Directory \"$(DEPENDDIR)\" already exists..."; \
617          else \
618           mkdir -p $(DEPENDIR); \
619           echo "Made \"$(DEPENDDIR)\" directory..."; \
620          fi
621
622 $(DEPENDDIR)/test_driver_static.dep: test_driver.C
623         @mkdir -p $(DEPENDDIR)
624         $(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) -DSTATIC_TEST_DRIVER $(DEPENDFLAGS) $*.o > $@
625
626 $(DEPS_MUTATORS): $(DEPENDDIR)/%.dep : %.C 
627         @mkdir -p $(DEPENDDIR)
628         $(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
629
630 $(DEPS_MUTATEES_GCC): $(DEPENDDIR)/test%.mutatee_gcc.dep : test%.mutatee.c $(SRCS_FORALL_MUTATEES)
631         @mkdir -p $(DEPENDDIR)
632         $(M_GCC) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutatee_gcc.o > $@
633
634 $(DEPS_MUTATEES_GXX): $(DEPENDDIR)/test%.mutatee_g++.dep : $(wildcard test%.mutatee.*) $(SRCS_FORALL_MUTATEES)
635         @mkdir -p $(DEPENDDIR)
636         $(M_GXX) $(CXXFLAGS) $< $(MUTATEE_CXXFLAGS) $(DEPENDFLAGS) test$*.mutatee_gxx.o > $@
637
638 $(DEPS_MUTATEES_G77): $(DEPENDDIR)/test%.mutatee_g77.dep : test%.mutateeFort.F $(SRCS_FORALL_MUTATEES)
639         @mkdir -p $(DEPENDDIR)
640         $(M_G77) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutateeFort_g77.o > $@
641
642
643 # Use gcc to generate deps for native compilers
644
645 ifdef NATIVE_CC
646 $(DEPS_MUTATEES_NATIVE_CC): $(DEPENDDIR)/test%.mutatee_$(NATIVE_CC).dep : test%.mutatee.c $(SRCS_FORALL_MUTATEES)
647         @mkdir -p $(DEPENDDIR)
648         $(M_GCC) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutatee_$(NATIVE_CC).o > $@
649 endif
650
651 ifdef NATIVE_CXX
652 $(DEPS_MUTATEES_NATIVE_CXX): $(DEPENDDIR)/test%.mutatee_$(NATIVE_CXX).dep : $(wildcard test%.mutatee.*) $(SRCS_FORALL_MUTATEES)
653         @mkdir -p $(DEPENDDIR)
654         $(M_GXX) $(CXXFLAGS) $< $(MUTATEE_CXXFLAGS) $(DEPENDFLAGS) test$*.mutatee_$(NATIVE_CXX).o > $@
655 endif
656
657 ifdef NATIVE_FC
658 $(DEPS_MUTATEES_NATIVE_FC): $(DEPENDDIR)/test%.mutatee_$(NATIVE_FC).dep : test%.mutateeFort.F $(SRCS_FORALL_MUTATEES)
659         @mkdir -p $(DEPENDDIR)
660         $(M_G77) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutateeFort_$(NATIVE_FC).o > $@
661 endif
662
663 ifdef NATIVE_CXX_OMP
664 $(DEPS_MUTATEES_NATIVE_CXX_OMP): $(DEPENDDIR)/test%.mutatee_$(NATIVE_CXX_OMP).dep : test%.mutatee.c $(SRCS_FORALL_MUTATEES)
665         @mkdir -p $(DEPENDDIR)
666         $(M_GXX) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutatee_$(NATIVE_CXX_OMP).o > $@
667 endif
668
669
670 $(DEPS_TESTLIBS): $(DEPENDDIR)/lib%.dep : lib%.c 
671         @mkdir -p $(DEPENDDIR)
672         $(DEPCC) $(CXXFLAGS) -I$(TO_CORE)/dyninstAPI_RT/h $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) lib$*.so > $@
673
674 $(DEPS_LIBTESTSUITE): $(DEPENDDIR)/%.dep : %.C
675         @mkdir -p $(DEPENDDIR)
676         $(DEPCC) $(CXXFLAGS) -I$(TO_CORE)/dyninstAPI_RT/h $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
677
678
679 # do not include dep files for "clean" targets
680 ifneq ($(MAKECMDGOALS),clean)
681 ifneq ($(MAKECMDGOALS),distclean)
682 ifneq ($(MAKECMDGOALS),echo)
683
684 -include $(DEPS_MUTATORS)
685 # -include $(DEPS_MUTATEES_GCC)
686 # -include $(DEPS_MUTATEES_GXX)
687 # -include $(DEPS_TESTLIBS)
688
689 ifdef M_G77
690 # -include $(DEPS_MUTATEES_G77)
691 endif
692
693 ifdef NATIVE_CC
694 # -include $(DEPS_MUTATEES_NATIVE_CC)
695 endif
696
697 ifdef NATIVE_CXX
698 -include $(DEPS_MUTATEES_NATIVE_CXX)
699 endif
700
701 ifdef NATIVE_FC
702 -include $(DEPS_MUTATEES_NATIVE_FC)
703 endif
704
705 ifdef NATIVE_CXX_OMP
706 -include $(DEPS_MUTATEES_NATIVE_CXX_OMP)
707 endif
708
709 endif
710 endif
711 endif
712
713 ######################################################################
714 # Generate and include automatically generated sub-makefiles
715 ######################################################################
716
717 # These rules should build the specification-generated files if necessary
718 TO_SPEC = ../src/specification
719 TO_SRC ?= ../src
720
721 PROLOG_FILES = spec.pl test.pl util.pl
722
723 $(PROLOG_FILES): %: $(TO_SPEC)/%
724         cp -f $(TO_SPEC)/$* .
725
726 PYTHON_FILES = $(TO_SPEC)/makemake.py $(TO_SPEC)/tuples.py
727
728 PYTHONPATH += $(TO_SPEC)
729
730 tuples: $(PROLOG_FILES)
731         gprolog --entry-goal "['spec.pl']" \
732                 --entry-goal "test_init('$(PLATFORM)')" \
733                 --entry-goal "write_tuples('tuples', '$(PLATFORM)')" \
734                 --entry-goal "halt"
735
736 make.mutators.gen: $(PROLOG_FILES) $(PYTHON_FILES) tuples
737         env PYTHONPATH=$(PYTHONPATH) python -c "import makemake; makemake.write_make_mutators_gen('make.mutators.gen', 'tuples')"
738
739 make.solo_mutatee.gen: $(PROLOG_FILES) $(PYTHON_FILES) tuples
740         env PYTHONPATH=$(PYTHONPATH) python -c "import makemake; makemake.write_make_solo_mutatee_gen('make.solo_mutatee.gen', 'tuples')"
741
742 include make.solo_mutatee.gen
743
744 # FIXME The following rule is temporary
745 all: solo_mutatees
746
747 # Generate the lists of tests to run in src/test_info_new.gen.C
748 $(TO_SRC)/test_info_new.gen.C: $(PROLOG_FILES) $(PYTHON_FILES) tuples
749         env PYTHONPATH=$(PYTHONPATH) python -c "import makemake; makemake.write_test_info_new_gen('$(TO_SRC)/test_info_new.gen.C', 'tuples')"
750
751 $(TO_SRC)/solo_mutatee_init.gen.c: $(PROLOG_FILES) $(PYTHON_FILES) tuples
752         env PYTHONPATH=$(PYTHONPATH) python -c "import makemake; makemake.write_solo_mutatee_init_gen('$(TO_SRC)/solo_mutatee_init.gen.c', 'tuples')"