Fix Windows compiler warnings
[dyninst.git] / testsuite / ppc64_bgq_ion / Makefile
1 # Define any symbols needed to invoke configuration changes in make.config
2 TO_CORE =       ../..
3 NO_IMPLICIT_TEMPLATES = true
4
5 # Include standard make configuration stuff that applies to everything
6 # in the paradyn tree.
7 include $(TO_CORE)/make.config.local
8 include $(TO_CORE)/make.config 
9
10 # Now make any necessary architecture specific changes to variables:
11
12 #if M_G77 is defined, g77 mutatees will be built
13 M_G77 = mpif77
14
15 GNU_WARNING_FLAGS = -W -Wall
16 MUTATOR_CXXFLAGS += $(GNU_WARNING_FLAGS)
17 MUTATEE_CFLAGS_GNU      = $(UNIFIED_DEF) $(GNU_WARNING_FLAGS)
18 MUTATEE_CXXFLAGS_GNU    = $(UNIFIED_DEF) $(GNU_WARNING_FLAGS)
19
20 # Tests 1, 2, and 12 use libdl. It is only added to their link lines
21 # as we must also test the harder-to-bootstrap general case (mutatee
22 # without the libdl)
23 MUTATEE_USE_LIBDL_SELECTIVELY = true
24 MUTATEE_LIBS =
25 MUTATEE_LDFLAGS_GNU += -Wl,-export-dynamic
26 MUTATEE_LDFLAGS_NATIVE += -Wl,-export-dynamic
27
28 MUTATEE_LDFLAGS_GNU    += -ldl $(LDFLAGS)
29 MUTATEE_LDFLAGS_NATIVE += -ldl $(LDFLAGS)
30
31 COMMA=,
32 MUTATEE_G77_FFLAGS += -Dppc64_bgq_ion -DF77 -fno-second-underscore -g
33 MUTATEE_G77_FFLAGS += $(F77FLAGS)
34 MUTATEE_G77_CFLAGS += $(filter-out -Wl$(COMMA)-export-dynamic, $(MUTATEE_CFLAGS_GNU)) 
35 MUTATEE_G77_CFLAGS += -DF77 -DFortran -g $(MUTATEE_FFLAGS) -c
36 MUTATEE_G77_CFLAGS += $(CFLAGS)
37 TEST1_FORTRAN_CSOURCE = test1.mutateeFortC.c
38
39 MUTATEE_G77_LDFLAGS += $(LDFLAGS)
40
41 MUTATEE_CFLAGS_NATIVE   = $(UNIFIED_DEF) -g
42 MUTATEE_CXXFLAGS_NATIVE = $(UNIFIED_DEF) -g
43
44 # Definitions used for test1 assembly
45 TEST1_AS = gcc -c
46 TEST1_ASFLAGS = $(MUTATEE_CFLAGS_GNU)
47 #CALL35_1_SRC = call35_1_x86_linux.s
48
49 # Definition used for test6 assembly
50 NASM = $(GCC)
51 TEST6_AS_GNU = $(NASM)
52 #TEST6_ASFLAGS_GNU = -f elf -dPLATFORM=$(PLATFORM)
53 TEST6_ASFLAGS_GNU = $(CFLAGS) -c
54 TEST6_AS_SRC = test6LS-powerpc.S
55 TEST6_AS_OBJ_BASE = $(basename $(TEST6_AS_SRC))
56
57 TESTLIB_FLAGS = -fpic -shared -g -Wl,-export-dynamic -Wl,-ldl
58 TESTLIB_FLAGS += $(LDFLAGS)
59 TESTSUITE_FLAGS += $(LDFLAGS)
60 MUTATOR_LDFLAGS += $(LDFLAGS)
61
62 # see discussion in make.module.tmpl for the format of this variable
63 MUTATEE_TEST9_EXTRA_LIB = 9.-L./ 9.-lInstMe
64
65 LIBS_LIBTESTSUITE = -ldl
66
67 STRIP_SO = strip -g
68
69 MYLINK_FLAGS += -Wl,-E
70 ifdef LIBDWARF_STATIC
71 ifdef LIBDWARF_LIB
72 MYLINK_FLAGS += -L$(LIBDWARF_LIB) -Wl,-rpath -Wl,$(LIBDWARF_LIB)
73 endif
74 MYLINK_FLAGS += -Wl,--whole-archive -ldwarf -Wl,--no-whole-archive
75 endif
76
77 ifdef LIBELF_STATIC
78 ifdef LIBELF_LIB
79 MYLINK_FLAGS += -L$(LIBELF_LIB)
80 endif
81 MYLINK_FLAGS += -Wl,--whole-archive -lelf -Wl,--no-whole-archive
82 else
83 ifdef LIBELF_LIB
84 MYLINK_FLAGS += -L$(LIBELF_LIB)
85 proccontrol_TESTLIB_LFAGS = -Wl,-rpath -Wl,$(LIBELF_LIB)
86 endif
87 MYLINK_FLAGS += -lelf
88 endif
89
90 ifdef USE_LIBERTY
91 MYLINK_FLAGS += -Wl,--whole-archive -liberty -Wl,--no-whole-archive
92 endif
93
94 MYLINK_FLAGS += -Wl,-rpath -Wl,$(LIBRARY_DEST)
95
96 ifdef LAUNCHMON_LIB
97 LAUNCHMON_LINK = -Wl,-rpath,$(LAUNCHMON_LIB) -L$(LAUNCHMON_LIB) -lmonfeapi -lmonbeapi $(MYLINK_FLAGS)
98 else
99 LAUNCHMON_LINK = -lmonfeapi -lmonbeapi
100 endif
101 ifdef LAUNCHMON_INC
102 LAUNCHMON_FE_CFLAGS = -I$(LAUNCHMON_INC) -Dcap_launchmon
103 LAUNCHMON_BE_CFLAGS = -I$(LAUNCHMON_INC) -Dcap_launchmon
104 else
105 LAUNCHMON_FE_CFLAGS = -Dcap_launchmon
106 LAUNCHMON_BE_CFLAGS = -Dcap_launchmon
107 endif
108
109 TO_CORE_ABS = `readlink -f $(TO_CORE)`
110 LIBRARY_DEST_ABS = `readlink -f $(LIBRARY_DEST)`
111 proccontrol_TESTLIB_LFLAGS += -Wl,-rpath -Wl,$(TO_CORE_ABS)/testsuite/$(PLATFORM) -Wl,-rpath -Wl,$(LIBRARY_DEST_ABS)
112 proccontrol_MUTATOR_FLAGS += $(proccontrol_TESTLIB_LFLAGS)
113
114 include ../make.module.tmpl
115
116 TESTLIB_CC = mpicc
117
118 CFLAGS   += -D_XOPEN_SOURCE=600
119 CXXFLAGS += -D_XOPEN_SOURCE=600
120 F77FLAGS += -D_XOPEN_SOURCE=600
121
122 .PHONY: dyninst_clean_solo_mutatees
123 dyninst_clean_solo_mutatees:
124         @echo No dyninst mutatees to clean