Introduce rs6000-ibm-aix64 platform. - - - - - - - - - - - - - - - - - -
[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 ### mips-sgi-irix6.4 flags
33 ifeq (irix,$(findstring irix,$(PLATFORM)))
34
35 ### platform flags (both compilers)
36 AS            = as -64
37 ASFLAGS      := $(filter-out -P,$(ASFLAGS))
38
39
40 ifndef USES_NATIVE_CC
41
42 ### generic "-64" binaries (default)
43 CC      = $(GCC)
44 CXX     = $(GXX)
45 MODCC         = g++ -mabi=64
46 ### generic "-n32" binaries
47 CC2           = gcc -mabi=n32
48 MODCC2        = g++ -mabi=n32
49 LD2           = ld -n32
50 ### generic flags
51 OPT_FLAG      =
52 LDFLAGS      += -Wl,-woff,131 -Wl,-woff,85
53
54 else # USES_NATIVE_CC
55
56 ### native "-64" binaries (default)
57 CC            = $(NATIVE_CC) -64
58 CXX           = $(NATIVE_CXX) -64
59 MODCC         = $(NATIVE_CXX) -64
60 ### native "-n32" binaries
61 CC2           = $(NATIVE_CC) -n32
62 MODCC2        = $(NATIVE_CXX) -n32
63 LD2           = $(NATIVE_CXX) -n32
64 ### native flags
65 NATIVE_FLAGS    += -DUSES_NATIVE_CC
66 NATIVE_FLAGS    += -D__LONGLONG
67 NATIVE_FLAGS    += -Dvfork=fork
68 NATIVE_FLAGS    += -woff 1155
69 NATIVE_FLAGS    += -Xcpluscomm
70 NATIVE_CXXFLAGS += -LANG:ansi-for-init-scope=ON
71 NATIVE_CXXFLAGS += -woff 3303
72 NATIVE_CXXFLAGS += -LANG:std
73 CFLAGS          += $(NATIVE_FLAGS)
74 CXXFLAGS        += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
75 TFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
76 KFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
77 ### native linking
78 LIBDIR          += -L/usr/local/lib64
79 ### native optimization
80 ifndef NO_OPT_FLAG
81 OPT_FLAG        += -OPT:Olimit=0
82 endif
83
84 endif # USES_NATIVE_CC
85 endif # mips-sgi-irix6.4
86
87
88 ### sparc-sun-solaris2.8 flags
89 ifdef SOLARIS_NATIVE
90 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
91
92 DEPENDFLAGS     = -xM1
93
94 CC            = $(NATIVE_CC)
95 CXX           = $(NATIVE_CXX)
96 MODCC         = $(NATIVE_CXX)
97 LD            = $(NATIVE_CXX)
98
99 NATIVE_FLAGS    += -DUSES_NATIVE_CC
100
101 CFLAGS          += $(NATIVE_FLAGS)
102 CXXFLAGS        += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
103 TFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
104 KFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
105
106 endif  # sparc-sun-solaris2.8
107 endif  # SOLARIS_NATIVE
108
109 # AIX 5.1 xlC/xlc
110 ifeq (ibm-aix,$(findstring ibm-aix,$(PLATFORM)))
111 ifdef IBM_BPATCH_COMPAT
112 CC              = $(NATIVE_CC)
113 CXX             = $(NATIVE_CXX)
114 MODCC           = $(NATIVE_CXX)
115 # define AUTO_TEMPLATES to exclude the dyninst template files -- this needs to be done in Makefile
116 #XLC_TEMPLATE_PARAMETERS = -qnotempinc -qtemplateregistry=temp_reg -qtemplaterecompile
117 #XLC_TEMPLATE_PARAMETERS = -qtempinc
118 #XLC_TEMPLATE_PARAMETERS = -qnotempinc -qnotemplateregistry
119 XLC_TEMPLATE_PARAMETERS =
120 # -qobjmodel:  (ibm) smaller classes, faster access to virtual function tables. (compat) less efficient
121 # -qsrcmsg:    nice for debugging...  prints source lines with error messages
122 # -qmakeshrobj:
123 # -qtempinc:   implicit template instantiation...  explicit instantiation of the sane template will cause
124 #              tons of duplicate symbol warnings
125 # -qtemplateregistry:   implicit template instantiation...  preferable for spaceusage reasons
126 #              like tempinc, but uses a registry file instead of special include files
127 #              Also a bit annoying because you cant run a parallel compile (registry file must be
128 #              build sequentially).
129 # -qstatsym:   Adds user defined static symbols to the xcoff name list
130 #LD             = /usr/vacpp/bin/makeC++SharedLib -p0 -blibpath:/usr/lib:/lib:/usr/local/lib -bbigtoc -bloadmap:loadmap -qobjmodel=ibm
131 #LD             = xlC -bnoentry -qmkshrobj -G -bnoobjreorder -blibpath:/usr/lib:/lib:/usr/local/lib -bbigtoc -bloadmap:loadmap -qobjmodel=ibm $(XLC_TEMPLATE_PARAMETERS)
132 LD              = xlC -bnoentry -qmkshrobj -bnoobjreorder -brtl -blibpath:/usr/lib:/lib:/usr/local/lib -bbigtoc -bloadmap:loadmap $(XLC_TEMPLATE_PARAMETERS)
133 #NATIVE_FLAGS   += -qhalt=E -qcpluscmt -D__XLC__ -qlanglvl=ansi -q32 -qlonglong -qsrcmsg
134 NATIVE_FLAGS    += -qhalt=E -D__XLC__ -qtbtable=full -qmaxmem=2048 -qro
135 CFLAGS          += $(NATIVE_FLAGS) -qcpluscmt
136 CXXFLAGS        += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS) $(XLC_TEMPLATE_PARAMETERS)
137
138 TFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS) $(XLC_TEMPLATE_PARAMETERS)KFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS) $(XLC_TEMPLATE_PARAMETERS)
139 LIBDIR          += -L/usr/local/lib
140 endif #AIX_USE_XLC
141 endif #IBM-AIX