Fix Windows compiler warnings
[dyninst.git] / testsuite / make.module.tmpl
1 #
2 # make.module.tmpl for 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) ../src/dyninst
14
15 IFLAGS = -I../../dyninstAPI/h -I../../symtabAPI/h -I../../dynutil/h -I../../instructionAPI/h -I../../proccontrol/h -I../../external
16 LFLAGS = -L../../common/$(PLATFORM) -L../../symtabAPI/$(PLATFORM) -L../../instructionAPI/$(PLATFORM) -L../../proccontrol/$(PLATFORM) -L../../dyninstAPI/$(PLATFORM)
17
18 #######################################################################
19 ### We don't want all of the CFLAGS stuff that came from make.config.
20 ### Strip away most of it.
21 #######################################################################
22
23 CFLAGS = $(UNIFIED_TEST_DEF:%=%_test) $(ARCH_FLAGS) $(AC_DEF) $(FIRST_INCLUDE) $(IFLAGS) -I../src -g $(BOOST_INCDIR)
24 CXXFLAGS = $(CFLAGS)
25 CXXFLAGS += $(PLATFORM_CXXFLAGS)
26 CFLAGS_NATIVE = $(CFLAGS)
27 CXXFLAGS_NATIVE = $(CXXFLAGS)
28 MUTATEE_CFLAGS_NATIVE ?= $(CFLAGS)
29 MUTATEE_CXXFLAGS_NATIVE ?= $(CXXFLAGS)
30
31
32 #######################################################################
33 ###  Generate compiler id strings
34 ###
35 ###  COMPILERT_NATIVE_CC, COMPILERT_NATIVE_CXX must be defined prior to
36 ###  inclusion of this file.  gcc/g++ are handled here as platform-indep
37 ###
38 #######################################################################
39
40 EMPTY:=
41 BLANK:=$(EMPTY) $(EMPTY)
42 LPAREN:=(
43 RPAREN:=)
44 COMMA=,
45 RSQBRACK:=[
46 LSQBRACK:=]
47
48 COMPILERT_GCC = $(shell $(M_GCC) -v 2>&1 | grep version | head -1)
49 COMPILER1_GCC = $(subst $(BLANK),_,$(COMPILERT_GCC))
50 COMPILER2_GCC = $(subst $(LPAREN),_,$(COMPILER1_GCC))
51 COMPILER3_GCC = $(subst $(RSQBRACK),_,$(COMPILER2_GCC))
52 COMPILER4_GCC = $(subst $(LSQBRACK),_,$(COMPILER3_GCC))
53 COMPILER_GCC = $(subst $(RPAREN),_,$(COMPILER4_GCC))
54 MUTATEE_CFLAGS_GNU += -DCOMPILER='"$(COMPILER_GCC)"'
55 MUTATEE_LDFLAGS_GNU += $(LDFLAGS) -L.
56
57 COMPILERT_GXX = $(shell $(M_GCC) -v 2>&1 | grep version | head -1)
58 COMPILER1_GXX = $(subst $(BLANK),_,$(COMPILERT_GXX))
59 COMPILER2_GXX = $(subst $(LPAREN),_,$(COMPILER1_GXX))
60 COMPILER3_GXX = $(subst $(RSQBRACK),_,$(COMPILER2_GXX))
61 COMPILER4_GXX = $(subst $(LSQBRACK),_,$(COMPILER3_GXX))
62 COMPILER_GXX = $(subst $(RPAREN),_,$(COMPILER4_GXX))
63 MUTATEE_CXXFLAGS_GNU += -DCOMPILER='"$(COMPILER_GXX)"'
64
65 COMPILER1_NATIVE_CC = $(subst $(BLANK),_,$(COMPILERT_NATIVE_CC))
66 COMPILER2_NATIVE_CC = $(subst $(LPAREN),_,$(COMPILER1_NATIVE_CC))
67 COMPILER_NATIVE_CC = $(subst $(RPAREN),_,$(COMPILER2_NATIVE_CC))
68 MUTATEE_CFLAGS_NATIVE += -DCOMPILER='"$(COMPILER_NATIVE_CC)"'
69 MUTATEE_LDFLAGS_NATIVE += $(LDFLAGS) -L.
70
71 COMPILER1_NATIVE_CXX = $(subst $(BLANK),_,$(COMPILERT_NATIVE_CXX))
72 COMPILER2_NATIVE_CXX = $(subst $(LPAREN),_,$(COMPILER1_NATIVE_CXX))
73 COMPILER_NATIVE_CXX = $(subst $(RPAREN),_,$(COMPILER2_NATIVE_CXX))
74 MUTATEE_CXXFLAGS_NATIVE += -DCOMPILER='"$(COMPILER_NATIVE_CXX)"'
75
76 LIBDIR += $(LFLAGS)
77
78 #######################################################################
79 ###  Basic definitions (filename prefixes)
80 #######################################################################
81
82 FORALL_MUTATORS =  
83
84 FORALL_MUTATEES = mutatee_util
85
86 SRCS_LIBTESTSUITE = test_lib.C \
87                     test_lib_soExecution.C \
88                     TestData.C \
89                     TestMutator.C \
90                     TestOutputDriver.C \
91                     StdOutputDriver.C \
92                                                   remotetest.C \
93                                                   connection.C \
94                                                   module.C
95
96 SRCS_LIBTESTLAUNCH = CmdLine.C \
97                                                         ParameterDict.C \
98                                                         ResumeLog.C \
99                                                         MutateeStart.C \
100                                                         test_info_new.C
101 # test_info_new.gen.C is also part of LIBTESTLAUNCH, but has special build rules
102
103 OBJS_LIBTESTLAUNCH = $(SRCS_LIBTESTLAUNCH:%.C=%.o)
104
105 SRCS_TEMPLATES = test_driver_templates.C 
106
107 OBJS_LIBTESTSUITE = $(SRCS_LIBTESTSUITE:%.C=%.o)
108 OBJS_TEMPLATES = $(SRCS_TEMPLATES:%.C=%.o)
109
110 ifdef USE_LIBTESTSUITE_EXT_A
111 LIBTESTSUITE = libtestSuite.a
112 LIBTESTLAUNCH = libtestlaunch.a
113 else
114 LIBTESTSUITE = libtestSuite.so
115 LIBTESTLAUNCH = libtestlaunch.so
116 endif
117
118 TESTDRIVER_LDFLAGS += $(DEMANGLER_EXEC_LINK)
119
120 ALL_COMP_DIRS = $(TO_CORE)/common/$(PLATFORM)
121 ALL_COMP_DIRS += $(TO_CORE)/testsuite/$(PLATFORM)
122 ALL_COMP_DIRS += $(TO_CORE)/parseAPI/$(PLATFORM)
123 ALL_COMP_DIRS += $(TO_CORE)/stackwalk/$(PLATFORM)
124 ALL_COMP_DIRS += $(TO_CORE)/proccontrol/$(PLATFORM)
125 ALL_COMP_DIRS += $(TO_CORE)/dyninstAPI/$(PLATFORM)
126 ALL_COMP_DIRS += $(TO_CORE)/symtabAPI/$(PLATFORM)
127 ALL_COMP_DIRS += $(TO_CORE)/instructionAPI/$(PLATFORM)
128
129 #######################################################
130 # Dyninst infrastructure components
131 #######################################################
132 SRCS_DYNINSTCOMP_LIB = dyninst/dyninst_comp.C \
133                        dyninst/test_lib_mutateeStart.C \
134                        dyninst/Callbacks.C \
135                        dyninst/Process_data.C \
136                        dyninst/ParseThat.C \
137                        dyninst/test_lib_test7.C \
138                        dyninst/test_lib_test9.C
139 OBJS_DYNINSTCOMP_LIB = $(notdir $(SRCS_DYNINSTCOMP_LIB:%.C=%.o))
140 SRCS_DYNINSTTESTLIB = libtestA.c \
141                       libtestB.c \
142                       dyninst/libTest12.c
143
144 #                      dyninst/libInstMe.c \
145 #                      dyninst/libLoadMe.c \
146
147 dyninst_MUTATOR_FLAGS = -L. -ltestdyninst -ldyninstAPI 
148
149 DYNINST_TESTLIBS = $(notdir $(SRCS_DYNINSTTESTLIB:%.c=%.so))
150 DYNINST_STATIC_TESTLIBS = $(notdir $(SRCS_DYNINSTTESTLIB:%.c=%.a))
151 ifdef M_ABI
152 DYNINST_TESTLIBS_ABI = $(addsuffix _$(M_ABI).so, $(notdir $(SRCS_DYNINSTTESTLIB:%.c=%)))
153 DYNINST_STATIC_TESTLIBS_ABI = $(addsuffix _$(M_ABI).a, $(notdir $(SRCS_DYNINSTTESTLIB:%.c=%)))
154 else
155 DYNINST_TESTLIBS_ABI =
156 DYNINST_STATIC_TESTLIBS_ABI = 
157 endif
158
159 ifdef USE_LIBTESTSUITE_EXT_A
160 LIBDYNINSTCOMP = libtestdyninst.a
161 else
162 LIBDYNINSTCOMP = libtestdyninst.so
163 endif
164
165 dyninst_MUTATOR_LIB = $(LIBDYNINSTCOMP)
166 dyninst_COMPONENT_LIB = $(LIBDYNINSTCOMP)
167
168 #######################################################
169 # Symtab infrastructure components
170 #######################################################
171 SRCS_SYMTABCOMP_LIB = symtab/symtab_comp.C
172 OBJS_SYMTABCOMP_LIB = $(notdir $(SRCS_SYMTABCOMP_LIB:%.C=%.o))
173 symtab_MUTATOR_FLAGS = -L. -ltestsymtab -lcommon
174
175 ifdef USE_LIBTESTSUITE_EXT_A
176 LIBSYMTABCOMP = libtestsymtab.a
177 else
178 LIBSYMTABCOMP = libtestsymtab.so
179 endif
180
181 symtab_MUTATOR_LIB = $(LIBSYMTABCOMP)
182 symtab_COMPONENT_LIB = $(LIBSYMTABCOMP)
183
184 #######################################################
185 # Instruction infrastructure components
186 #######################################################
187 SRCS_INSTRUCTIONCOMP_LIB = instruction/instruction_comp.C
188 OBJS_INSTRUCTIONCOMP_LIB = $(notdir $(SRCS_INSTRUCTIONCOMP_LIB:%.C=%.o))
189 instruction_MUTATOR_FLAGS = -L. -ltestinstruction -linstructionAPI -lcommon
190
191 ifdef USE_LIBTESTSUITE_EXT_A
192 LIBINSTRUCTIONCOMP = libtestinstruction.a
193 else
194 LIBINSTRUCTIONCOMP = libtestinstruction.so
195 endif
196
197 instruction_MUTATOR_LIB = $(LIBINSTRUCTIONCOMP)
198 instruction_COMPONENT_LIB = $(LIBINSTRUCTIONCOMP)
199
200 #######################################################
201 # ProcControlAPI infrastructure components
202 #######################################################
203 SRCS_PROCCONTROLCOMP_LIB = proccontrol/proccontrol_comp.C
204 OBJS_PROCCONTROLCOMP_LIB = $(notdir $(SRCS_PROCCONTROLCOMP_LIB:%.C=%.o))
205 proccontrol_MUTATOR_FLAGS += -L. -ltestproccontrol 
206
207 ifdef USE_LIBTESTSUITE_EXT_A
208 LIBPROCCONTROLCOMP = libtestproccontrol.a
209 else
210 LIBPROCCONTROLCOMP = libtestproccontrol.so
211 endif
212
213 proccontrol_MUTATOR_LIB = $(LIBPROCCONTROLCOMP)
214 proccontrol_COMPONENT_LIB = $(LIBPROCCONTROLCOMP)
215
216 ######################################################################
217 ### Main target
218 ######################################################################
219
220 SPACE :=
221 SPACE +=
222 #COMPONENT_LDFLAGS += $(subst $(SPACE),,-Wl,--enable-new-dtags$(ALL_COMP_DIRS:%=,-rpath,%))
223 COMPONENT_LDFLAGS += $(subst $(SPACE),,-Wl$(ALL_COMP_DIRS:%=,-rpath,%))
224
225 default: testlibs mutators mutatees_minimum drivers output_drivers components
226         @echo "**********************************************************"
227         @echo "* Build complete."
228         @echo "*"
229         @echo "* High optimization mutatees were not built, use 'make all'"
230         @echo "* to build them."
231         @echo "**********************************************************"
232
233 all: testlibs mutators mutatees drivers output_drivers components
234
235 #######################################################################
236 ###  A list of all the targets we're building, for install purposes
237 #######################################################################
238
239 ALL_TARGETS_DEST                = $(addprefix $(TEST_DEST)/,$(ALL_TARGETS))
240 LIBTESTSUITE_DEST               = $(addprefix $(TEST_DEST)/,$(LIBTESTSUITE))
241
242 #######################################################################
243 ###  Some pattern rules
244 #######################################################################
245
246 CXXTFLAGS := $(filter-out -fno-implicit-templates, $(CXXFLAGS))
247
248 #######################################################################
249 ###  High level targets
250 #######################################################################
251
252 MUTATOR_LDFLAGS := $(LDFLAGS) $(LIBDIR) $(MUTATOR_LIBS) $(MUTATOR_LDFLAGS) -lpthread
253 MUTATOR_SO_LDFLAGS = $(filter-out -liberty, $(MUTATOR_LDFLAGS))
254 MUTATEE_NATIVE_FC_LDFLAGS += $(LDFLAGS)
255 MUTATEE_NATIVE_CXX_OMP_LDFLAGS += $(LDFLAGS)
256 TESTDRIVER_LDFLAGS += $(LDFLAGS)
257
258 # all: testlibs mutators mutatees drivers
259 # See also an addition to the 'all' rule at the end of the file
260
261 ### Automatically generated variables; generated by makemake.py
262
263 include make.mutators.gen
264
265 include make.solo_mutatee.gen
266
267 mutatees:
268
269 mutators:
270
271 components:
272
273 testlibs:
274
275 #######################################################################
276 ###  Filter results, if needed
277 #######################################################################
278
279 MINIMUM_BUILD_FILTER = %_max %_high %_low
280 BUILD_FILTER =
281 ifdef SKIP_BUILD_RTLIB_32
282    BUILD_FILTER += %_32_none_max %_32_none_high %_32_none_low %_32_none_none %_32_pic_max %_32_pic_high %_32_pic_low %_32_pic_none
283 endif
284
285 include $(TO_CORE)/make.components
286
287 ifneq ($(wildcard ../src/dyninst), )
288 ifneq ($(findstring dyninstAPI,$(fullSystem)),)
289 mutatees: $(filter-out $(BUILD_FILTER), $(dyninst_SOLO_MUTATEES))
290 mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(dyninst_SOLO_MUTATEES)))
291 mutators: $(dyninst_MUTATORS_SO)
292 components: $(LIBDYNINSTCOMP)
293 testlibs: $(DYNINST_TESTLIBS) $(DYNINST_STATIC_TESTLIBS)
294 ifndef SKIP_BUILD_RTLIB_32
295 testlibs: $(DYNINST_TESTLIBS_ABI) $(DYNINST_STATIC_TESTLIBS_ABI)
296 dyninst_targs = $(DYNINST_TESTLIBS_ABI) $(DYNINST_STATIC_TESTLIBS_ABI)
297 endif
298 dyninst_targs += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(dyninst_SOLO_MUTATEES)))
299 dyninst_targs += $(dyninst_MUTATORS_SO) $(LIBDYNINSTCOMP) $(DYNINST_TESTLIBS) $(DYNINST_STATIC_TESTLIBS)
300 endif
301 endif
302
303 ifneq ($(wildcard ../src/symtab), )
304 ifneq ($(findstring symtabAPI,$(fullSystem)),)
305 mutatees: $(filter-out $(BUILD_FILTER), $(symtab_SOLO_MUTATEES))
306 mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(symtab_SOLO_MUTATEES)))
307 mutators: $(symtab_MUTATORS_SO)
308 components: $(LIBSYMTABCOMP)
309 testlibs:
310 symtab_targs = $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(symtab_SOLO_MUTATEES)))
311 symtab_targs = $(symtab_MUTATORS_SO) $(LIBSYMTABCOMP)
312 endif
313 endif
314
315 ifneq ($(wildcard ../src/instruction), )
316 ifneq ($(findstring instructionAPI,$(fullSystem)),)
317 mutatees: $(filter-out $(BUILD_FILTER), $(instruction_SOLO_MUTATEES))
318 mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(instruction_SOLO_MUTATEES)))
319 mutators: $(instruction_MUTATORS_SO)
320 ifneq ($(instruction_MUTATORS_SO), )
321 components: $(LIBINSTRUCTIONCOMP)
322 testlibs:
323 instruction_targs = $(LIBINSTRUCTIONCOMP)
324 endif
325 instruction_targs += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(instruction_SOLO_MUTATEES)))
326 instruction_targs += $(instruction_MUTATORS_SO) $(LIBINSTRUCTIONCOMP)
327 endif
328 endif
329
330 ifneq ($(wildcard ../src/proccontrol), )
331 ifneq ($(findstring proccontrol,$(fullSystem)),)
332 mutatees: $(filter-out $(BUILD_FILTER), $(proccontrol_SOLO_MUTATEES)) 
333 mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(proccontrol_SOLO_MUTATEES)))
334 mutators: $(proccontrol_MUTATORS_SO)
335 ifneq ($(proccontrol_MUTATORS_SO), )
336 components: $(LIBPROCCONTROLCOMP)
337 testlibs: $(PROCCONTROL_TESTLIBS) $(PROCCONTROL_TESTLIBS_ABI) $(DYNINST_TESTLIBS) $(DYNINST_TESTLIBS_ABI)
338 proccontrol_targs = $(LIBPROCCONTROLCOMP) $(PROCCONTROL_TESTLIBS) $(PROCCONTROL_TESTLIBS_ABI) $(DYNINST_TESTLIBS) $(DYNINST_TESTLIBS_ABI)
339 endif
340 proccontrol_targs += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(proccontrol_SOLO_MUTATEES)))
341 proccontrol_targs += $(proccontrol_MUTATORS_SO)
342 endif
343 endif
344
345 common_infra: drivers output_drivers
346
347 dyninstAPI: common_infra $(dyninst_targs) $(symtab_targs) $(instruction_targs) $(proccontrol_targs)
348
349 symtabAPI: common_infra $(symtab_targs)
350
351 instructionAPI: common_infra $(instruction_targs)
352
353 proccontrol: common_infra $(proccontrol_targs)
354
355 install: default
356
357 symlink: all
358
359 clean: clean_solo_mutatees dyninst_clean_solo_mutatees
360         @$(RM) *.da *.bb. *.bbg 
361         @$(RM) $(TESTLIBS) $(TESTLIBS_ABI) $(LIBTESTSUITE) test_driver runTests libTest12.so testdriver_wrapper
362         @$(RM) $(dyninst_MUTATORS_SO)
363         @$(RM) $(symtab_MUTATORS_SO)
364         @$(RM) $(symtab_SOLO_MUTATEES)
365         @$(RM) $(instruction_MUTATORS_SO)
366         @$(RM) $(instruction_SOLO_MUTATEES)
367         @$(RM) $(proccontrol_MUTATORS_SO)
368         @$(RM) $(proccontrol_SOLO_MUTATEES)
369         @$(RM) $(OUTPUT_DRIVERS)
370         @$(RM) $(LIBDYNINSTCOMP)
371         @$(RM) $(LIBSYMTABCOMP)
372         @$(RM) $(LIBINSTRUCTIONCOMP)
373         @$(RM) $(LIBPROCCONTROLCOMP)
374         @$(RM) $(DYNINST_TESTLIBS) $(DYNINST_STATIC_TESTLIBS) $(DYNINST_TESTLIBS_ABI) $(DYNINST_STATIC_TESTLIBS_ABI)
375         @$(RM) *.o
376         @$(RM) test11
377         @$(RM) imagefile
378         @$(RM) core core.*
379         @$(RM) -r _dyninstsaved*
380         @$(RM) *.ii *.ti
381         @$(RM) .__afs*
382  
383
384 distclean: clean
385         @if [ -d $(DEPENDDIR) ]; then \
386           $(RM) $(DEPENDDIR)/*.dep; \
387           rmdir $(DEPENDDIR); \
388          fi
389
390 specclean:
391         $(RM) *.gen *.pl tuples test_info_new.gen.C
392
393 ifdef M_ABI
394 $(CALL35_1_OBJ_ABI): $(CALL35_1_SRC_ABI)
395         $(M_GCC) $(M_ABI_FLAG) -c $< $(CFLAGS) $(MUTATEE_CFLAGS_GNU) -o $@ 
396 endif
397
398 testlibs: $(LIBTESTSUITE)
399
400 drivers: test_driver runTests testdriver_wrapper
401
402 .PHONY: clean install distclean mutators mutatees testlibs gnu_mutatees native_mutatees echo all
403
404 #######################################################################
405 ###  Build command for test libraries
406 #######################################################################
407
408 $(dyninst_OBJS_ALL_MUTATORS): %.o : dyninst/%.C $(DEPENDDIR)/%.dep
409         @echo Compiling $@
410         $(HIDE_COMP)$(CXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ -I../src/dyninst ../src/dyninst/$*.C
411 $(symtab_OBJS_ALL_MUTATORS): %.o : symtab/%.C $(DEPENDDIR)/%.dep
412         @echo Compiling $@
413         $(HIDE_COMP)$(CXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ -I../src/symtab ../src/symtab/$*.C
414 $(instruction_OBJS_ALL_MUTATORS): %.o : instruction/%.C $(DEPENDDIR)/%.dep
415         @echo Compiling $@
416         $(HIDE_COMP)$(CXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ -I../src/instruction ../src/instruction/$*.C
417 $(proccontrol_OBJS_ALL_MUTATORS): %.o : proccontrol/%.C $(DEPENDDIR)/%.dep
418         @echo Compiling $@
419         $(HIDE_COMP)$(CXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ -I../src/proccontrol ../src/proccontrol/$*.C
420
421 TESTLIB_CC ?= $(CC)
422 $(DYNINST_TESTLIBS): %.so : %.c $(DEPENDDIR)/%.dep
423 ifdef MAKE_SHARED_LIB
424         @echo Compiling $@
425         $(HIDE_COMP)$(TESTLIB_CC) $(LDFLAGS) -c $(CFLAGS) $(CFLAGS_TESTLIBS) $(filter %.c, $^) -o $*.o
426         $(HIDE_COMP)$(MAKE_SHARED_LIB) $(TESTLIB_FLAGS) $*.o -o $@
427 else
428         @echo Compiling $@
429         $(HIDE_COMP)$(TESTLIB_CC) $(LDFLAGS) $(TESTLIB_FLAGS) -I../src/ $(filter %.c,$^) -o $@
430 endif
431
432 $(DYNINST_STATIC_TESTLIBS): %.a : %.c $(DEPENDDIR)/%.dep
433         @echo Compiling $@
434         $(HIDE_COMP)$(TESTLIB_CC) $(LDFLAGS) -c $(CFLAGS) $(CFLAGS_TESTLIBS) $(filter %.c, $^) -o $*.o
435         $(HIDE_COMP)$(AR) rcs $@ $*.o
436
437 ifdef M_ABI
438 $(DYNINST_TESTLIBS_ABI): %_$(M_ABI).so : %.c $(DEPENDDIR)/%.dep
439 ifdef MAKE_SHARED_LIB
440         @echo Compiling $@
441         $(HIDE_COMP)$(TESTLIB_CC) $(LDFLAGS) -c $(CFLAGS) $(CFLAGS_TESTLIBS) $(filter %.c, $^) -o $*.o
442         $(HIDE_COMP)$(MAKE_SHARED_LIB) $(LDFLAGS) $(TESTLIB_FLAGS) $*.o -o $@
443 else
444         @echo Compiling $@
445         $(HIDE_COMP)$(TESTLIB_CC) $(M_ABI_FLAG) $(LDFLAGS) $(TESTLIB_FLAGS) -I../src/ $(filter %.c,$^) -o $@
446 endif
447
448 ifdef cap_instruction_api
449     INSNAPI_LINK = -linstructionAPI
450 endif
451
452 $(DYNINST_STATIC_TESTLIBS_ABI): %_$(M_ABI).a : %.c $(DEPENDDIR)/%.dep
453         @echo Compiling $@
454         $(HIDE_COMP)$(TESTLIB_CC) -c $(CFLAGS) $(LDFLAGS) $(CFLAGS_TESTLIBS) $(filter %.c, $^) -o $*.o
455         $(HIDE_COMP)$(AR) rcs $@ $*.o
456 endif
457
458 $(OBJS_TEMPLATES): %.o : ../src/%.C
459         @echo Compiling $@
460         $(HIDE_COMP)$(M_GXX) -c -o $@ $(CXXTFLAGS) -I../src/ ../src/$*.C
461
462 test_lib_templates.o : ../src/test_lib_templates.C
463         @echo Compiling $@
464         $(HIDE_COMP)$(M_GXX) -c -o $@ -fPIC $(CXXTFLAGS) -I../src/ ../src/$*.C
465
466 $(OBJS_DYNINSTCOMP_LIB): %.o : ../src/dyninst/%.C $(DEPENDDIR)/%.dep
467         @echo Compiling $@
468         $(HIDE_COMP)$(M_GXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/dyninst/$*.C
469
470 $(OBJS_SYMTABCOMP_LIB): %.o : ../src/symtab/%.C $(DEPENDDIR)/%.dep
471         @echo Compiling $@
472         $(HIDE_COMP)$(M_GXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/symtab/$*.C
473
474 $(OBJS_INSTRUCTIONCOMP_LIB): %.o : ../src/instruction/%.C $(DEPENDDIR)/%.dep
475         @echo Compiling $@
476         $(HIDE_COMP)$(M_GXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/instruction/$*.C
477
478 $(OBJS_PROCCONTROLCOMP_LIB): %.o : ../src/proccontrol/%.C $(DEPENDDIR)/%.dep
479         @echo Compiling $@
480         $(HIDE_COMP)$(M_GXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/proccontrol/$*.C
481
482 $(OBJS_LIBTESTSUITE): %.o : ../src/%.C $(DEPENDDIR)/%.dep
483         @echo Compiling $@
484         $(HIDE_COMP)$(M_GXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/$*.C
485
486 # test_info_new.gen.o is special-cased because it makes use of the
487 # COMPILER_CONTROL_DEFS to determine which mutatees to enable for compilers
488 # that are not present at all sites.
489 test_info_new.gen.o: test_info_new.gen.C
490         @echo Compiling $@
491         $(HIDE_COMP)$(CXX) -c -fPIC -o $@ $(CXXFLAGS) $(COMPILER_CONTROL_DEFS) -I../src/ test_info_new.gen.C
492
493 $(OBJS_LIBTESTLAUNCH): %.o :  ../src/%.C ../src/%.h $(DEPENDDIR)/%.dep
494         @echo Compiling $@
495         $(HIDE_COMP)$(M_GXX) -c -fPIC -o $@ $(CXXFLAGS) -I../src/ ../src/$*.C
496
497 $(LIBDYNINSTCOMP) : $(OBJS_DYNINSTCOMP_LIB) $(LIBTESTSUITE)
498         @echo Linking $<
499         $(HIDE_COMP)$(CXX) -shared $(TESTSUITE_FLAGS) $(LIBDIR) $(OBJS_DYNINSTCOMP_LIB) -o $@ -L. -ltestSuite -ldyninstAPI -lsymtabAPI -lcommon -linstructionAPI $(COMPONENT_LDFLAGS)
500
501 $(LIBSYMTABCOMP) : $(OBJS_SYMTABCOMP_LIB) $(LIBTESTSUITE)
502         @echo Linking $<
503         $(HIDE_COMP)$(CXX) -shared $(TESTSUITE_FLAGS) $(LIBDIR) $(OBJS_SYMTABCOMP_LIB) -o $@ -L. -ltestSuite -lsymtabAPI -lcommon $(COMPONENT_LDFLAGS)
504
505 $(LIBINSTRUCTIONCOMP) : $(OBJS_INSTRUCTIONCOMP_LIB) $(LIBTESTSUITE)
506         @echo Linking $<
507         $(HIDE_COMP)$(CXX) -shared $(TESTSUITE_FLAGS) $(LIBDIR) $(OBJS_INSTRUCTIONCOMP_LIB) -o $@ -L. -ltestSuite -linstructionAPI -lcommon $(COMPONENT_LDFLAGS)
508
509 $(LIBPROCCONTROLCOMP) : $(OBJS_PROCCONTROLCOMP_LIB) $(LIBTESTSUITE)
510         @echo Linking $<
511         $(HIDE_COMP)$(CXX) -shared $(TESTSUITE_FLAGS) $(LIBDIR) $(OBJS_PROCCONTROLCOMP_LIB) -o $@ -L. -ltestSuite -lpcontrol -lcommon $(COMPONENT_LDFLAGS)
512
513 $(LIBTESTSUITE) : $(OBJS_LIBTESTSUITE) test_lib_templates.o test_lib.h
514         @echo Linking $<
515         $(HIDE_COMP)$(CXX) -shared $(TESTSUITE_FLAGS) $(LIBDIR) $(LIBS_LIBTESTSUITE) $(OBJS_LIBTESTSUITE) test_lib_templates.o -o $@ $(COMPONENT_LDFLAGS)
516
517 $(LIBTESTLAUNCH) : $(OBJS_LIBTESTLAUNCH) test_info_new.gen.o
518         @echo Linking $@
519         $(HIDE_COMP)$(CXX) -shared $(TESTUITE_FLAGS) $(LIBDIR) -o $@ $^
520 #
521 # Native Fortran mutatees
522
523 # There is no real advantage to generality here since there is only one fortran mutatee
524 # (ie for test1), thus all constituent files are built explicitly
525
526 ifdef NATIVE_FC 
527 test1.mutatee_$(NATIVE_FC).o: ../src/test1.mutateeFort.F
528         $(NATIVE_FC)  $(MUTATEE_NATIVE_FFLAGS) -c -o $@ $^ 
529 test1.mutateeFortC_$(NATIVE_FC).o: ../src/test1.mutateeFortC.c
530         $(NATIVE_FORTRAN_CC) $(MUTATEE_NATIVE_FC_CFLAGS) -c $(filter %.c,$^) -o $@
531
532 $(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
533         $(NATIVE_FC) -o $@ $(filter %.o,$^) $(MUTATEE_NATIVE_FC_LDFLAGS) $(MUTATEE_LIBS) 
534 endif
535
536 # Native OpenMP mutatees
537 # There is no real advantage to generality here since there is only one OpenMP mutatee
538 # (ie for test16), thus all constituent files are built explicitly
539 ifdef NATIVE_CXX_OMP 
540 test16.mutatee_$(NATIVE_CXX_OMP).o: ../src/test16.mutatee.c
541         $(NATIVE_CXX_OMP)  $(MUTATEE_NATIVE_CXX_CFLAGS) -o $@ $^ 
542
543 $(MUTATEES_NATIVE_CXX_OMP): test%.mutatee_$(NATIVE_CXX_OMP) : test%.mutatee_$(NATIVE_CXX_OMP).o $(DEPENDDIR)/test%.mutatee_$(NATIVE_CXX_OMP).dep
544         $(NATIVE_CXX_OMP) $(MUTATEE_NATIVE_CXX_OMP_LDFLAGS) -o $@ $(filter %.o,$^) $(MUTATEE_LIBS) 
545
546 #$(MUTATEES_NATIVE_CXX_OMP): ../src/test16.mutatee.c
547 #       $(NATIVE_CXX_OMP)  $(MUTATEE_NATIVE_CXX_CFLAGS) -o $@ $^ 
548
549 endif
550
551
552 # Install directory
553 $(TEST_DEST): 
554         mkdir $(TEST_DEST)
555
556 #######################################################################
557 ###  Generic Mutator build rule:
558 ###
559 ###  resorts to pattern matching test% (matches test1, test2, ... etc)
560 ###  to generate correct, minimal set of prerequisites for each test.
561 ###  It would be nicer to just match something simpler that wasn't 
562 ###  name-dependant, but gnu make is not making this easy.
563 ###
564 #######################################################################
565
566 MUTATEE_DEFS := -Dgnu_cc=_gcc -Dgnu_cxx=_g++
567
568 ifdef M_ABI
569 MUTATEE_DEFS += -Dgnu_abi_cc=_gcc_$(M_ABI) -Dgnu_abi_cxx=_g++_$(M_ABI) -Dm_abi
570 endif
571
572 ifdef M_G77
573 MUTATEE_DEFS += -Dgnu_fc=_g77
574 endif
575
576 ifdef NATIVE_CC
577 MUTATEE_DEFS += -Dnative_cc=_$(NATIVE_CC)
578 endif
579
580 ifdef NATIVE_CXX
581 MUTATEE_DEFS += -Dnative_cxx=_$(NATIVE_CXX)
582 endif
583
584 ifdef NATIVE_FC
585 MUTATEE_DEFS += -Dnative_fc=_$(NATIVE_FC)
586 endif
587
588 runTests.o: ../src/runTests.C $(DEPENDDIR)/runTests.dep
589         @echo Compiling $@
590         $(HIDE_COMP)$(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) ../src/runTests.C
591 runTests_static.o: ../src/runTests.C $(DEPENDDIR)/runTests.dep
592         @echo Compiling $@
593         $(HIDE_COMP)$(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) -DSTATIC_TEST_DRIVER ../src/runTests.C
594
595 runTests-utils.o: ../src/runTests-utils.C $(DEPENDDIR)/runTests-utils.dep
596         @echo Compiling $@
597         $(HIDE_COMP)$(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) ../src/runTests-utils.C
598
599 runTests: runTests.o runTests-utils.o test_driver_templates.o  $(LIBTESTLAUNCH)
600         @echo Linking $@
601         $(HIDE_COMP)$(CXX) $(CXXFLAGS) -o $@ runTests.o runTests-utils.o test_driver_templates.o -L.
602 runTests_static: runTests_static.o runTests-utils.o test_driver_templates.o 
603         @echo Linking $@
604         $(HIDE_COMP)$(CXX) $(CXXFLAGS) -o runTests runTests_static.o runTests-utils.o test_driver_templates.o 
605
606 test_driver.o: ../src/test_driver.C $(DEPENDDIR)/test_driver.dep
607         @echo Compiling $@
608         $(HIDE_COMP)$(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) ../src/test_driver.C
609
610 testdriver_be.o: ../src/testdriver_be.C $(DEPENDDIR)/testdriver_be.dep
611         @echo Compiling $@
612         $(HIDE_COMP)$(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) $(LAUNCHMON_BE_CFLAGS) ../src/testdriver_be.C
613
614 testdriver_wrapper.o: ../src/testdriver_wrapper.C ../src/remotetest.h
615         @echo Compiling $@
616         $(HIDE_COMP)$(CXX) -g -c -o $@ $(CXXFLAGS) ../src/testdriver_wrapper.C -Wall
617
618 dynlmon.o: ../src/dynlmon.C $(DEPENDDIR)/dynlmon.dep
619         $(HIDE_COMP)$(CXX) -c -o $@ $(CXXFLAGS) $(MUTATEE_DEFS) $(LAUNCHMON_FE_CFLAGS) -I../../ ../src/dynlmon.C
620
621 test_driver_static.o: ../src/test_driver.C $(DEPENDDIR)/test_driver_static.dep
622         @echo Compiling $@
623         $(HIDE_COMP)$(CXX) -c -o $@ -DSTATIC_TEST_DRIVER $(CXXFLAGS) $(MUTATEE_DEFS) ../src/test_driver.C
624
625 test_driver: test_driver.o test_driver_templates.o dynlmon.o testdriver_be.o test_info_new.gen.o $(DEPENDDIR)/test_driver.dep $(LIBTESTSUITE) $(LIBTESTLAUNCH)
626         @echo Linking $@ 
627         $(HIDE_COMP)$(CXX) -o $@ test_driver.o test_driver_templates.o test_info_new.gen.o testdriver_be.o dynlmon.o -L. -ltestSuite $(MUTATOR_LDFLAGS) $(LIBS) $(TESTDRIVER_LDFLAGS) -lcommon -ltestlaunch $(LAUNCHMON_LINK) $(COMPONENT_LDFLAGS) ; $(TESTDRIVER_EXTRA_LINK_STEP)
628
629 testdriver_wrapper: connection.o testdriver_wrapper.o
630         @echo Linking $@
631         $(HIDE_COMP)$(CXX) -o $@ connection.o testdriver_wrapper.o $(LAUNCHMON_BE_LINK)
632
633 ######################################################################
634 ### Output Drivers
635 ######################################################################
636
637 OUTPUT_DRIVERS = DatabaseOutputDriver.so
638
639 DatabaseOutputDriver.o : ../src/DatabaseOutputDriver.C # $(DEPENDDIR)/DatabaseOutputDriver.dep
640         @echo Compiling $@
641         $(HIDE_COMP)$(M_GXX) -c -o $@ -fPIC $(CXXFLAGS) -I../src/ ../src/$*.C
642
643 DatabaseOutputDriver.so: DatabaseOutputDriver.o $(LIBTESTSUITE) # $(DEPENDDIR)/DatabaseOutputDriver.dep
644         @echo Linking $@
645         $(HIDE_COMP)$(CXX) -o $@ -shared $(filter %.o,$^) $(MUTATOR_SO_LDFLAGS) $(LIBDIR) $(LIBS) -L. -ltestSuite
646 ifndef NO_OPT_FLAG
647 ifdef STRIP_SO
648         $(STRIP_SO) $@
649 endif
650 endif
651
652 .PHONY: output_drivers
653 output_drivers: $(OUTPUT_DRIVERS)
654
655 #######################################################################
656 ###  Depends
657 #######################################################################
658
659 DEPS_MUTATORS           += $(DEPENDDIR)/test_driver.dep
660 DEPS_MUTATORS           += $(DEPENDDIR)/testdriver_be.dep
661 DEPS_MUTATORS           += $(DEPENDDIR)/dynlmon.dep
662 DEPS_MUTATORS           += $(DEPENDDIR)/runTests.dep $(DEPENDDIR)/runTests-utils.dep
663 DEPS_SYMTAB_MUTATORS    += $(addprefix $(DEPENDDIR)/,$(symtab_OBJS_ALL_MUTATORS:%.o=%.dep))
664 DEPS_DYNINST_MUTATORS    += $(addprefix $(DEPENDDIR)/,$(dyninst_OBJS_ALL_MUTATORS:%.o=%.dep))
665 DEPS_INSTRUCTION_MUTATORS    += $(addprefix $(DEPENDDIR)/,$(instruction_OBJS_ALL_MUTATORS:%.o=%.dep))
666 DEPS_PROCCONTROL_MUTATORS    += $(addprefix $(DEPENDDIR)/,$(proccontrol_OBJS_ALL_MUTATORS:%.o=%.dep))
667
668 DEPS_MUTATEES_GCC       += $(addprefix $(DEPENDDIR)/,$(addsuffix _gcc.dep, $(MUTATEES_C)))
669 DEPS_MUTATEES_GXX       += $(addprefix $(DEPENDDIR)/,$(addsuffix _g++.dep, $(MUTATEES_CXX)))
670 DEPS_MUTATEES_GXX       += $(addprefix $(DEPENDDIR)/,$(addsuffix _g++.dep, $(MUTATEES_CXX_ONLY)))
671 DEPS_DYNINST_TESTLIBS   = $(addprefix $(DEPENDDIR)/,$(DYNINST_TESTLIBS:%.so=%.dep))
672 DEPS_LIBTESTSUITE        = $(addprefix $(DEPENDDIR)/,$(SRCS_LIBTESTSUITE:%.C=%.dep))
673 DEPS_LIBTESTLAUNCH        = $(addprefix $(DEPENDDIR)/,$(SRCS_LIBTESTLAUNCH:%.C=%.dep))
674 DEPS_DYNINSTCOMP       =  $(addprefix $(DEPENDDIR)/,$(notdir $(SRCS_DYNINSTCOMP_LIB:%.C=%.dep)))
675 DEPS_SYMTABCOMP        = $(addprefix $(DEPENDDIR)/,$(notdir $(SRCS_SYMTABCOMP_LIB:%.C=%.dep)))
676 DEPS_INSTRUCTIONCOMP        = $(addprefix $(DEPENDDIR)/,$(notdir $(SRCS_INSTRUCTIONCOMP_LIB:%.C=%.dep)))
677 DEPS_PROCCONTROLCOMP        = $(addprefix $(DEPENDDIR)/,$(notdir $(SRCS_PROCCONTROLCOMP_LIB:%.C=%.dep)))
678
679 ifdef M_G77
680 DEPS_MUTATEES_G77       += $(addprefix $(DEPENDDIR)/,$(addsuffix _g77.dep, $(MUTATEES_FORTRAN)))
681 endif
682
683 ifdef NATIVE_FC
684 DEPS_MUTATEES_NATIVE_FC += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_FC).dep, $(MUTATEES_FORTRAN)))
685 endif
686
687 ifdef NATIVE_CXX_OMP
688 DEPS_MUTATEES_NATIVE_CXX_OMP += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CXX_OMP).dep, $(MUTATEES_OPENMP)))
689 endif
690
691 ifdef NATIVE_CC
692 DEPS_MUTATEES_NATIVE_CC += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CC).dep, $(MUTATEES_C)))
693 endif
694
695 ifdef NATIVE_CXX
696 DEPS_MUTATEES_NATIVE_CXX += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CXX).dep, $(MUTATEES_CXX)))
697 DEPS_MUTATEES_NATIVE_CXX += $(addprefix $(DEPENDDIR)/,$(addsuffix _$(NATIVE_CXX).dep, $(MUTATEES_CXX_ONLY)))
698 endif
699
700 depend: $(DEPS_MUTATORS)
701
702 depend_dir:
703         @echo "mut deps: $(DEPS_MUTATORS)"
704         @if [ -d $(DEPENDDIR) ]; then \
705           echo "Directory \"$(DEPENDDIR)\" already exists..."; \
706          else \
707           mkdir -p $(DEPENDIR); \
708           echo "Made \"$(DEPENDDIR)\" directory..."; \
709          fi
710
711 $(DEPENDDIR)/test_driver_static.dep: test_driver.C
712         @mkdir -p $(DEPENDDIR)
713         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) -DSTATIC_TEST_DRIVER $(DEPENDFLAGS) $*.o > $@
714
715 $(DEPS_MUTATORS): $(DEPENDDIR)/%.dep : %.C
716         @mkdir -p $(DEPENDDIR)
717         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
718
719 $(DEPS_SYMTAB_MUTATORS): $(DEPENDDIR)/%.dep : symtab/%.C
720         @mkdir -p $(DEPENDDIR)
721         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
722
723 $(DEPS_INSTRUCTION_MUTATORS): $(DEPENDDIR)/%.dep : instruction/%.C
724         @mkdir -p $(DEPENDDIR)
725         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
726
727 $(DEPS_PROCCONTROL_MUTATORS): $(DEPENDDIR)/%.dep : proccontrol/%.C
728         @mkdir -p $(DEPENDDIR)
729         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
730
731 $(DEPS_DYNINST_MUTATORS): $(DEPENDDIR)/%.dep : dyninst/%.C
732         @mkdir -p $(DEPENDDIR)
733         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
734
735 $(DEPS_MUTATEES_GCC): $(DEPENDDIR)/test%.mutatee_gcc.dep : test%.mutatee.c $(SRCS_FORALL_MUTATEES)
736         @mkdir -p $(DEPENDDIR)
737         $(M_GCC) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutatee_gcc.o > $@
738
739 $(DEPS_MUTATEES_GXX): $(DEPENDDIR)/test%.mutatee_g++.dep : $(wildcard test%.mutatee.*) $(SRCS_FORALL_MUTATEES)
740         @mkdir -p $(DEPENDDIR)
741         $(M_GXX) $(CXXFLAGS) $< $(MUTATEE_CXXFLAGS) $(DEPENDFLAGS) test$*.mutatee_gxx.o > $@
742
743 $(DEPS_MUTATEES_G77): $(DEPENDDIR)/test%.mutatee_g77.dep : test%.mutateeFort.F $(SRCS_FORALL_MUTATEES)
744         @mkdir -p $(DEPENDDIR)
745         $(M_G77) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutateeFort_g77.o > $@
746
747
748 # Use gcc to generate deps for native compilers
749
750 ifdef NATIVE_CC
751 $(DEPS_MUTATEES_NATIVE_CC): $(DEPENDDIR)/test%.mutatee_$(NATIVE_CC).dep : test%.mutatee.c $(SRCS_FORALL_MUTATEES)
752         @mkdir -p $(DEPENDDIR)
753         $(M_GCC) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutatee_$(NATIVE_CC).o > $@
754 endif
755
756 ifdef NATIVE_CXX
757 $(DEPS_MUTATEES_NATIVE_CXX): $(DEPENDDIR)/test%.mutatee_$(NATIVE_CXX).dep : $(wildcard test%.mutatee.*) $(SRCS_FORALL_MUTATEES)
758         @mkdir -p $(DEPENDDIR)
759         $(M_GXX) $(CXXFLAGS) $< $(MUTATEE_CXXFLAGS) $(DEPENDFLAGS) test$*.mutatee_$(NATIVE_CXX).o > $@
760 endif
761
762 ifdef NATIVE_FC
763 $(DEPS_MUTATEES_NATIVE_FC): $(DEPENDDIR)/test%.mutatee_$(NATIVE_FC).dep : test%.mutateeFort.F $(SRCS_FORALL_MUTATEES)
764         @mkdir -p $(DEPENDDIR)
765         $(M_G77) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutateeFort_$(NATIVE_FC).o > $@
766 endif
767
768 ifdef NATIVE_CXX_OMP
769 $(DEPS_MUTATEES_NATIVE_CXX_OMP): $(DEPENDDIR)/test%.mutatee_$(NATIVE_CXX_OMP).dep : test%.mutatee.c $(SRCS_FORALL_MUTATEES)
770         @mkdir -p $(DEPENDDIR)
771         $(M_GXX) $(CFLAGS) $< $(MUTATEE_CFLAGS) $(DEPENDFLAGS) test$*.mutatee_$(NATIVE_CXX_OMP).o > $@
772 endif
773
774
775 $(DEPS_DYNINST_TESTLIBS): $(DEPENDDIR)/lib%.dep : lib%.c 
776         @mkdir -p $(DEPENDDIR)
777         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) lib$*.so > $@
778
779 $(DEPS_LIBTESTLAUNCH) $(DEPS_LIBTESTSUITE): $(DEPENDDIR)/%.dep : %.C
780         @mkdir -p $(DEPENDDIR)
781         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) -I../src $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
782
783 $(DEPS_DYNINSTCOMP): $(DEPENDDIR)/%.dep : dyninst/%.C
784         @mkdir -p $(DEPENDDIR)
785         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) -I../src -I../src/dyninst $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
786
787 $(DEPS_SYMTABCOMP): $(DEPENDDIR)/%.dep : symtab/%.C
788         @mkdir -p $(DEPENDDIR)
789         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) -I../src -I../src/symtab $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
790
791 $(DEPS_INSTRUCTIONCOMP): $(DEPENDDIR)/%.dep : instruction/%.C
792         @mkdir -p $(DEPENDDIR)
793         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) -I../src -I../src/instruction $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
794
795 $(DEPS_PROCCONTROLCOMP): $(DEPENDDIR)/%.dep : proccontrol/%.C
796         @mkdir -p $(DEPENDDIR)
797         $(HIDE_COMP)$(DEPCC) $(CXXFLAGS) -I../src -I../src/proccontrol $< $(MUTATOR_CXXFLAGS) $(DEPENDFLAGS) $*.o > $@
798
799 # do not include dep files for "clean" targets
800 ifneq ($(MAKECMDGOALS),clean)
801 ifneq ($(MAKECMDGOALS),distclean)
802 ifneq ($(MAKECMDGOALS),echo)
803
804 -include $(DEPS_MUTATORS)
805 # -include $(DEPS_MUTATEES_GCC)
806 # -include $(DEPS_MUTATEES_GXX)
807 # -include $(DEPS_TESTLIBS)
808
809 ifdef M_G77
810 # -include $(DEPS_MUTATEES_G77)
811 endif
812
813 ifdef NATIVE_CC
814 # -include $(DEPS_MUTATEES_NATIVE_CC)
815 endif
816
817 ifdef NATIVE_CXX
818 -include $(DEPS_MUTATEES_NATIVE_CXX)
819 endif
820
821 ifdef NATIVE_FC
822 -include $(DEPS_MUTATEES_NATIVE_FC)
823 endif
824
825 ifdef NATIVE_CXX_OMP
826 -include $(DEPS_MUTATEES_NATIVE_CXX_OMP)
827 endif
828
829 endif
830 endif
831 endif