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