Fix Windows compiler warnings
[dyninst.git] / testsuite / ppc32_linux / Makefile
1 #
2 # $Id: Makefile,v 1.1 2008/05/08 20:53:29 cooksey Exp $
3 #
4
5 # Define any symbols needed to invoke configuration changes in make.config
6 TO_CORE =       ../..
7 NO_OPT_FLAG=true
8 NO_IMPLICIT_TEMPLATES = true
9 DEBUG_FLAG = -g
10
11 # Include standard make configuration stuff that applies to everything
12 # in the paradyn tree.
13 include $(TO_CORE)/make.config.local
14 include $(TO_CORE)/make.config 
15
16 # Now make any necessary architecture specific changes to variables:
17
18 #if M_G77 is defined, g77 mutatees will be built
19 M_G77 = g77
20
21 # there is no "native" or OS-provided compiler for Linux!
22 # we use the Portland Group compilers, as that's what we've currently got
23 # (in future we probably also want to test with the KAI/Intel compilers)
24 ifdef PGI
25 NATIVE_CC = pgcc
26 NATIVE_CXX = pgCC
27 COMPILERT_NATIVE_CC = $(shell $(NATIVE_CC) -V 2>/dev/null | grep '^pg' | head -1)
28 COMPILERT_NATIVE_CXX = $(shell $(NATIVE_CXX) -V 2>/dev/null | grep '^pg' | head -1)
29 endif
30
31 GNU_WARNING_FLAGS = -W -Wall
32 MUTATOR_CXXFLAGS += $(GNU_WARNING_FLAGS)
33 MUTATEE_CFLAGS_GNU      = $(UNIFIED_DEF) $(GNU_WARNING_FLAGS)
34 MUTATEE_CXXFLAGS_GNU    = $(UNIFIED_DEF) $(GNU_WARNING_FLAGS)
35
36 # Tests 1, 2, and 12 use libdl. It is only added to their link lines
37 # as we must also test the harder-to-bootstrap general case (mutatee
38 # without the libdl)
39 MUTATEE_USE_LIBDL_SELECTIVELY = true
40 MUTATEE_LIBS =
41 MUTATEE_LDFLAGS_GNU += -Wl,-export-dynamic
42 MUTATEE_LDFLAGS_NATIVE += -Wl,-export-dynamic
43
44 MUTATEE_LDFLAGS_GNU    += -ldl $(LDFLAGS)
45 MUTATEE_LDFLAGS_NATIVE += -ldl $(LDFLAGS)
46
47 COMMA=,
48 MUTATEE_G77_FFLAGS += -Dppc64_linux -DF77 -fno-second-underscore -g
49 MUTATEE_G77_FFLAGS += $(F77FLAGS)
50 MUTATEE_G77_CFLAGS += $(filter-out -Wl$(COMMA)-export-dynamic, $(MUTATEE_CFLAGS_GNU)) 
51 MUTATEE_G77_CFLAGS += -DF77 -DFortran -g $(MUTATEE_FFLAGS) -c
52 MUTATEE_G77_CFLAGS += $(CFLAGS)
53 TEST1_FORTRAN_CSOURCE = test1.mutateeFortC.c
54
55 MUTATEE_G77_LDFLAGS += $(LDFLAGS)
56
57 MUTATEE_CFLAGS_NATIVE   = $(UNIFIED_DEF) -g
58 MUTATEE_CXXFLAGS_NATIVE = $(UNIFIED_DEF) -g
59
60 # Definitions used for test1 assembly
61 TEST1_AS = gcc -c
62 TEST1_ASFLAGS = $(MUTATEE_CFLAGS_GNU)
63 #CALL35_1_SRC = call35_1_x86_linux.s
64
65 # Definition used for test6 assembly
66 NASM = $(GCC)
67 TEST6_AS_GNU = $(NASM)
68 #TEST6_ASFLAGS_GNU = -f elf -dPLATFORM=$(PLATFORM)
69 TEST6_ASFLAGS_GNU = $(CFLAGS) -c
70 TEST6_AS_SRC = test6LS-powerpc.S
71 TEST6_AS_OBJ_BASE = $(basename $(TEST6_AS_SRC))
72
73 TESTLIB_FLAGS = -fpic -shared -g -Wl,-export-dynamic -Wl,-ldl
74 TESTLIB_FLAGS += $(LDFLAGS)
75 TESTSUITE_FLAGS += $(LDFLAGS)
76 MUTATOR_LDFLAGS += $(LDFLAGS)
77
78 # see discussion in make.module.tmpl for the format of this variable
79 MUTATEE_TEST9_EXTRA_LIB = 9.-L./ 9.-lInstMe
80
81 LIBS_LIBTESTSUITE = -ldl
82
83 STRIP_SO = strip -g
84
85 include ../make.module.tmpl
86
87 # Some ppc32_linux distributions require _XOPEN_SOURCE to be defined as 600
88 # to get the functions/types we require
89 CFLAGS   += -D_XOPEN_SOURCE=600
90 CXXFLAGS += -D_XOPEN_SOURCE=600
91 F77FLAGS += -D_XOPEN_SOURCE=600