various fixes made when working with older gcc 3.2.3
[dyninst.git] / make.platform.tmpl
1 #
2 # $Id: make.platform.tmpl,v 1.13 2008/02/19 13:36:40 rchen 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 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
26 DEPENDFLAGS     := $(subst -MM,-xM,$(DEPENDFLAGS))
27 else
28 DEPENDFLAGS     := $(subst -MM,-M,$(DEPENDFLAGS))
29 endif
30 endif
31
32 ### sparc-sun-solaris2.8 flags
33 ifdef SOLARIS_NATIVE
34 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
35
36 DEPENDFLAGS     = -xM1
37
38 CC            = $(NATIVE_CC)
39 CXX           = $(NATIVE_CXX)
40 MODCC         = $(NATIVE_CXX)
41 LD            = $(NATIVE_CXX)
42
43 NATIVE_FLAGS    += -DUSES_NATIVE_CC
44
45 CFLAGS          += $(NATIVE_FLAGS)
46 CXXFLAGS        += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
47 TFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
48 KFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
49
50 endif  # sparc-sun-solaris2.8
51 endif  # SOLARIS_NATIVE
52
53 # AIX 5.1 xlC/xlc
54 ifeq (ibm-aix,$(findstring ibm-aix,$(PLATFORM)))
55 ifdef IBM_BPATCH_COMPAT
56 CC              = $(NATIVE_CC)
57 CXX             = $(NATIVE_CXX)
58 MODCC           = $(NATIVE_CXX)
59 # define AUTO_TEMPLATES to exclude the dyninst template files -- this needs to be done in Makefile
60 #XLC_TEMPLATE_PARAMETERS = -qnotempinc -qtemplateregistry=temp_reg -qtemplaterecompile
61 #XLC_TEMPLATE_PARAMETERS = -qtempinc
62 #XLC_TEMPLATE_PARAMETERS = -qnotempinc -qnotemplateregistry
63 XLC_TEMPLATE_PARAMETERS =
64 # -qobjmodel:  (ibm) smaller classes, faster access to virtual function tables. (compat) less efficient
65 # -qsrcmsg:    nice for debugging...  prints source lines with error messages
66 # -qmakeshrobj:
67 # -qtempinc:   implicit template instantiation...  explicit instantiation of the sane template will cause
68 #              tons of duplicate symbol warnings
69 # -qtemplateregistry:   implicit template instantiation...  preferable for spaceusage reasons
70 #              like tempinc, but uses a registry file instead of special include files
71 #              Also a bit annoying because you cant run a parallel compile (registry file must be
72 #              build sequentially).
73 # -qstatsym:   Adds user defined static symbols to the xcoff name list
74 #LD             = /usr/vacpp/bin/makeC++SharedLib -p0 -blibpath:/usr/lib:/lib:/usr/local/lib -bbigtoc -bloadmap:loadmap -qobjmodel=ibm
75 #LD             = xlC -bnoentry -qmkshrobj -G -bnoobjreorder -blibpath:/usr/lib:/lib:/usr/local/lib -bbigtoc -bloadmap:loadmap -qobjmodel=ibm $(XLC_TEMPLATE_PARAMETERS)
76 LD              = xlC -bnoentry -qmkshrobj -bnoobjreorder -brtl -blibpath:/usr/lib:/lib:/usr/local/lib -bbigtoc -bloadmap:loadmap $(XLC_TEMPLATE_PARAMETERS)
77 #NATIVE_FLAGS   += -qhalt=E -qcpluscmt -D__XLC__ -qlanglvl=ansi -q32 -qlonglong -qsrcmsg
78 NATIVE_FLAGS    += -qhalt=E -D__XLC__ -qtbtable=full -qmaxmem=2048 -qro
79 CFLAGS          += $(NATIVE_FLAGS) -qcpluscmt
80 CXXFLAGS        += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS) $(XLC_TEMPLATE_PARAMETERS)
81
82 TFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS) $(XLC_TEMPLATE_PARAMETERS)KFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS) $(XLC_TEMPLATE_PARAMETERS)
83 LIBDIR          += -L/usr/local/lib
84 endif #AIX_USE_XLC
85 endif #IBM-AIX