This maintenance commit gets things working on Irix again.
[dyninst.git] / make.platform.tmpl
1 #
2 # $Id: make.platform.tmpl,v 1.6 2002/08/07 20:46:36 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 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 CFLAGS          += $(NATIVE_FLAGS)
69 CXXFLAGS        += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
70 TFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
71 KFLAGS          += $(NATIVE_FLAGS) $(NATIVE_CXXFLAGS)
72 ### native linking
73 LIBDIR          += -L/usr/local/lib64
74 ### native optimization
75 ifndef NO_OPT_FLAG
76 OPT_FLAG        += -OPT:Olimit=0
77 endif
78
79 endif # USES_NATIVE_CC
80 endif # mips-sgi-irix6.4