Moved platform-neutral stripping of GCC build flags out of Irix-specific area
[dyninst.git] / make.platform.tmpl
1 #
2 # $Id: make.platform.tmpl,v 1.2 1999/11/11 01:00:49 wylie Exp $
3 # make.platform.tmpl: toplevel, platform-specific make configuration
4 #
5
6 ifdef USES_NATIVE_CC
7 ### filter non-native flags
8 # -fno-implicit-templates
9 # -fexternal-templates
10 # -fPIC
11 # $(BASICWARNINGS)
12 # $(COMMONWARNINGS)
13 # $(USEFULWARNINGS)
14 # $(TCLFRIENDLYWARNINGS)
15 CFLAGS          := $(filter-out -f%,$(CFLAGS))
16 CXXFLAGS        := $(filter-out -f%,$(CXXFLAGS))
17 KFLAGS          := $(filter-out -f%,$(KFLAGS))
18 TFLAGS          := $(filter-out -f%,$(TFLAGS))
19 CFLAGS          := $(filter-out -W%,$(CFLAGS))
20 CXXFLAGS        := $(filter-out -W%,$(CXXFLAGS))
21 KFLAGS          := $(filter-out -W%,$(KFLAGS))
22 TFLAGS          := $(filter-out -W%,$(TFLAGS))
23 #LIBS            := $(filter-out -lstdc++,$(LIBS))
24 SYSLIBS         := $(filter-out -lstdc++,$(SYSLIBS))
25 DEPENDFLAGS     := $(subst -MM,-M,$(DEPENDFLAGS))
26 endif
27
28 ### mips-sgi-irix6.4 flags
29 ifeq ($(PLATFORM),mips-sgi-irix6.4)
30
31 ### platform flags (both compilers)
32 AS            = as -64
33 ASFLAGS      := $(filter-out -P,$(ASFLAGS))
34 TCLTK_DIR     = /p/paradyn/packages/tcl8.0p2
35
36
37 ifndef USES_NATIVE_CC
38
39 ### generic "-64" binaries (default)
40 CC            = gcc -mabi=64
41 CXX           = g++ -mabi=64
42 MODCC         = g++ -mabi=64
43 ### generic "-n32" binaries
44 CC2           = gcc -mabi=n32
45 MODCC2        = g++ -mabi=n32
46 LD2           = ld -n32
47 ### generic flags
48 OPT_FLAG      =
49 LDFLAGS      += -Wl,-woff,131 -Wl,-woff,85
50
51 else # USES_NATIVE_CC
52
53 ### native "-64" binaries (default)
54 CC            = cc -64
55 CXX           = CC -64
56 MODCC         = CC -64
57 ### native "-n32" binaries
58 CC2           = cc -n32
59 MODCC2        = CC -n32
60 LD2           = CC -n32
61 ### native flags
62 NATIVE_FLAGS    += -DUSES_NATIVE_CC
63 NATIVE_FLAGS    += -D__LONGLONG
64 NATIVE_FLAGS    += -Dvfork=fork
65 NATIVE_FLAGS    += -woff 1155
66 NATIVE_FLAGS    += -Xcpluscomm
67 NATIVE_CXXFLAGS += -LANG:ansi-for-init-scope=ON
68 NATIVE_CXXFLAGS += -woff 3303
69 CFLAGS          += $(NATIVE_FLAGS)
70 CXXFLAGS        += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
71 TFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
72 KFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
73 ### native linking
74 LIBDIR          += -L/usr/local/lib64
75 ### native optimization
76 ifndef NO_OPT_FLAG
77 OPT_FLAG        += -OPT:Olimit=0
78 endif
79
80 endif # USES_NATIVE_CC
81 endif # mips-sgi-irix6.4