Subversion Repositories gelsvn

Rev

Rev 107 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 bj 1
// -*- MPC -*-
2
// $Id: makedll.mpt 198 2005-12-15 11:30:53Z bj $
3
 
4
// ***********************************************************************
5
// The default configuration for the 'make' project type is gcc.  This
6
// is controlled by the configurations template variable.  It may be
7
// changed on the MPC command line via the -value_template option.
8
// Additionally, each compiler has a default platform.  The default
9
// platform for gcc is linux.  This too can be changed via the
10
// -value_template option.  Below are some examples.
11
//
12
// Use SunCC on the default platform (solaris):
13
//   mwc.pl -type make -value_template configurations=SunCC
14
// Use the default configuration (gcc) on LynxOS:
15
//   mwc.pl -type make -value_template platforms=lynxos
16
// Use HP-UX aCC on the default platform (HP-UX):
17
//   mwc.pl -type make -value_template configurations=aCC
18
// ***********************************************************************
19
 
20
conditional_include "common"
21
conditional_include "unixcommon"
22
 
23
configurations   = gcc
24
obj_ext          = .o
25
compile_flags    =
26
arflags          =
27
pchsupport       = 1
28
targetoutdir     =
29
slash            = /
30
libopt           = -l
31
build64bit       = 1
32
 
33
// ***********************************************************************
34
// Configuration Section
35
// ***********************************************************************
36
 
37
java {
38
  cxx            = javac
39
  ld             = echo
40
  obj_ext        = .class
41
  output_option  =
42
  compile_option =
43
  ar             = jar
44
  arflags        = cvf
45
  platforms      = jvm
46
}
47
 
48
cxx {
49
  cxx        = cxx
50
  clean      = cxx_repository so_locations
51
  tempincopt = "-ptr "
52
  tempinc    = cxx_repository
53
  platforms  = tru64
54
  pchcreate  = "-nopch_messages -create_pch "
55
  pchuse     = "-nopch_messages -use_pch "
56
}
57
 
198 bj 58
cxx_vms {
59
  cxx             = cxx
60
  arflags         = r
61
  compilerflags   = -ieee -names_as_is_short
62
  linkflags       = -threads
63
  shflags         = -shared -auto_symvec
64
  clean           = cxx_repository
65
  tempinc         = cxx_repository
66
  platforms       = openvms
67
}
68
 
107 bj 69
gcc {
70
  cxx       = g++
71
  pic       = -fPIC
72
  shflags   = -shared
73
  platforms = linux
74
  pchcreate = "-o "
75
  pchnobj   = 1
76
}
77
 
78
SunCC {
79
  cxx             = CC
80
  pic             = -KPIC
81
  shflags         = -G
82
  compilerflags64 = -xarch=v9
83
  linkflags       = -library=Cstd -library=Crun
84
  clean           = SunWS_cache ir.out
85
  platforms       = solaris
86
}
87
 
88
aCC {
89
  cxx             = aCC
90
  pic             = +Z
91
  shflags         = -b
92
  platforms       = hpux
93
  compilerflags   = -AA -D_RWSTD_MULTI_THREAD +W336
94
  compilerflags64 = +DA2.0W +DS2.0W
95
  linkflags       = -Wl,+s
96
  linkflags64     = -Wl,-x -Wl,+h$(@F) -ldl
97
  pchcreate       = "+hdr_create "
98
  pchuse          = "+hdr_use "
99
}
100
 
101
xlC_r {
102
  cxx             = xlC_r
103
  arflags64      += -X64 -rv
104
  compilerflags64 = -q64
105
  platforms       = aix
106
  pchcreate       = -qgenpcomp=
107
  pchuse          = -qusepcomp=
108
}
109
 
110
SGICC {
111
  cxx             = CC
112
  pic             = -KPIC
113
  shflags         = -shared
114
  compilerflags64 = -64
115
  linkflags       = -Wl,-woff,84
116
  clean           = ii_files
117
  platforms       = irix
118
  pchcreate       = -LANG:create_pch=
119
  pchuse          = -diag_suppress 3056 -LANG:use_pch=
120
}
121
 
122
wrsppc {
123
  cxx           = g++ppc
124
  ld            = ldppc
125
  cputype       = ppc
126
  cpu           = PPC604
127
  ar            = arppc
128
  nm            = nmppc
129
  compilerflags = -mlongcall -nostdlib
130
  linkflags     = -X -r
131
  platforms     = vxworks
132
}
133
 
134
wrspentium {
135
  cxx           = g++pentium
136
  ld            = ldpentium
137
  cputype       = pentium
138
  cpu           = PENTIUM
139
  ar            = arpentium
140
  nm            = nmpentium
141
  compilerflags = -nostdlib
142
  linkflags     = -X -r
143
  platforms     = vxworks
144
}
145
 
146
NCC {
147
  cxx       = NCC
148
  pic       = -KPIC
149
  platforms = tandem
150
}
151
 
152
ghsppc {
153
  cxx           = cxppc
154
  ar            = cxppc
155
  arflags       = -archive -o
156
  compilerflags = --one_instantiation_per_object --exceptions
157
  platforms     = integrity
158
}
159
 
160
// ***********************************************************************
161
// Platform Section
162
// ***********************************************************************
163
 
164
jvm {
165
  lib_prefix =
166
  dll_ext    =
167
  lib_ext    = .jar
168
}
169
 
170
tru64 {
171
  shflags       = -shared /usr/lib/libcxxstd.a
172
  ldlibs        = -ltli -lrt
173
  extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT
174
}
175
 
198 bj 176
openvms {
177
  // If you want to create shareable images, you can
178
  // set dll_ext to .exe using the -value_template option of MPC.
179
  lib_prefix    =
180
  dll_ext       =
181
  exe_ext       = .exe
182
  ldlibs        = -lpthread
183
  extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT
184
}
185
 
107 bj 186
linux {
187
  ldlibs        = -ldl -lpthread
188
  extracppflags = -D_REENTRANT
189
}
190
 
191
solaris {
198 bj 192
  shflags       = -G
107 bj 193
  ldlibs        = -lsocket -ldl -lnsl -lgen -lposix4 -lthread
194
  extracppflags = -D_REENTRANT
195
}
196
 
197
hpux {
198
  dll_ext       = .sl
199
  ldlibs        = -lxti -lpthread -lrt -ldld
200
  extracppflags = -D_REENTRANT
201
}
202
 
203
aix {
204
  dll_ext       =
205
  ldlibs        = -ldl -lpthread
206
  extracppflags = -D_REENTRANT
207
}
208
 
209
irix {
210
  ldlibs  = -lsocket -lgen -lpthread
211
}
212
 
213
lynxos {
214
  dll_ext       =
215
  extracppflags = -D__NO_INCLUDE_WARN__
216
}
217
 
218
macos {
219
  dld     = libtool
220
  ranlib  = 1
221
  dll_ext = .dylib
222
  shflags = -dynamic
223
  ldlibs  = -lcc_dynamic -lstdc++ -lSystem -ldl
224
}
225
 
226
unixware {
227
  ldlibs        = -lsocket -ldl -lnsl -lgen -lposix4 -lthread
228
  extracppflags = -D_REENTRANT
229
 
230
}
231
 
232
qnx {
233
  ldlibs        = -lsocket
234
  extracppflags = -D__GCC_BUILTIN
235
}
236
 
237
vxworks {
238
  dll_ext       =
239
  specialscript = "#!/bin/sh\nfor i in $$3; do\nfor j in $$4; do\ni=`echo $$i | sed sa\^-laa`\n[ -r \"$$j/lib$$i.a\" ] && libs=\"$$libs $$j/lib$$i.a\" && break\ndone\ndone\n$$1 $$2 $$libs | munch | grep -v \\.cpp > $$5"
240
  prelink       = __ctordtor.c
241
  ldlibs        = -L$(WIND_BASE)/target/lib/$(CPUTYPE)/$(CPU)/common -larch
242
  extracppflags = -I$(WIND_BASE)/target/h
243
}
244
 
245
cygwin {
246
  dll_ext = .dll
247
  exe_ext = .exe
248
  rc      = windres
249
}
250
 
251
mingw {
252
  lib_prefix =
253
  dll_ext    = .dll
254
  exe_ext    = .exe
255
  ldlibs     = -lwsock32 -lnetapi32
256
  rc         = windres
257
  devnull    = nul
258
  delete     = del /f/s/q
259
  copy       = copy /y
260
  makedir    = mkdir
261
}
262
 
263
tandem {
264
  shflags       = -shared -all
265
  ldlibs        = -lsocket -ldl -lnsl -lgen -lthread
266
  extracppflags = -D_REENTRANT
267
}
268
 
269
// For Integrity, the following should be set as environment variables, on
270
// the make command line or within a verbatim section in your mpc file.
271
//
272
// GHSROOT     The full path to your Green Hills installation.
273
// RTOSROOT    The full path to your BSP installation (probably $GHSROOT).
274
// BSP         The BSP name (ex. sim800).
275
// TARGET_BSP  The full path to your target BSP.
276
// TARGET_LD   The full path to your target ld file.
277
//
278
integrity {
279
  dll_ext       =
280
  ldlibs        = -lshm_client -lnet -livfssca -lposixsca
281
  extraarflags  = -bspname=$(RTOSROOT)/target/$(BSP).bld
282
  extracppflags = -integrate -dynamic -bspname=$(RTOSROOT)/target/$(BSP).bld -os_dir $(GHSROOT) -non_shared -Uvector -bspfile=$(TARGET_BSP) $(TARGET_LD)
283
}
284
 
285
conditional_include "user_makedll"