Subversion Repositories gelsvn

Rev

Rev 198 | 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 217 2006-05-05 09:35:48Z bj $
3
 
4
// ***********************************************************************
217 bj 5
// The default compiler for the 'make' project type is gcc (provided by
6
// the fill_value() method in MakeProjectCreator.pm).  This can be
7
// controlled by setting the compilers template variable.  It may be
107 bj 8
// changed on the MPC command line via the -value_template option.
9
// Additionally, each compiler has a default platform.  The default
10
// platform for gcc is linux.  This too can be changed via the
11
// -value_template option.  Below are some examples.
12
//
13
// Use SunCC on the default platform (solaris):
217 bj 14
//   mwc.pl -type make -value_template compilers=SunCC
15
// Use the default compiler (gcc) on LynxOS:
107 bj 16
//   mwc.pl -type make -value_template platforms=lynxos
17
// Use HP-UX aCC on the default platform (HP-UX):
217 bj 18
//   mwc.pl -type make -value_template compilers=aCC
107 bj 19
// ***********************************************************************
20
 
21
conditional_include "common"
22
conditional_include "unixcommon"
23
 
217 bj 24
configurations   = Release
107 bj 25
obj_ext          = .o
217 bj 26
res_ext          = .res
107 bj 27
compile_flags    =
28
arflags          =
29
pchsupport       = 1
30
targetoutdir     =
31
slash            = /
32
libopt           = -l
33
build64bit       = 1
217 bj 34
pchext           = .gch
35
versupport       = 1
36
dependencies     = 1
37
visibility       =
107 bj 38
 
39
// ***********************************************************************
40
// Configuration Section
41
// ***********************************************************************
42
 
217 bj 43
Debug {
44
  lib_modifier = d
45
}
46
 
47
Release {
48
  optimize = 1
49
}
50
 
51
// ***********************************************************************
52
// Compiler Section
53
// ***********************************************************************
54
 
107 bj 55
java {
56
  cxx            = javac
217 bj 57
  ld             = :
107 bj 58
  obj_ext        = .class
59
  output_option  =
60
  compile_option =
61
  ar             = jar
62
  arflags        = cvf
63
  platforms      = jvm
64
}
65
 
217 bj 66
cxx_tru64 {
107 bj 67
  cxx        = cxx
68
  clean      = cxx_repository so_locations
69
  tempincopt = "-ptr "
70
  tempinc    = cxx_repository
71
  platforms  = tru64
72
  pchcreate  = "-nopch_messages -create_pch "
73
  pchuse     = "-nopch_messages -use_pch "
74
}
75
 
198 bj 76
cxx_vms {
77
  cxx             = cxx
78
  arflags         = r
79
  compilerflags   = -ieee -names_as_is_short
80
  linkflags       = -threads
81
  shflags         = -shared -auto_symvec
82
  clean           = cxx_repository
83
  tempinc         = cxx_repository
84
  platforms       = openvms
85
}
86
 
217 bj 87
dmc {
88
  cxx          = dmc
89
  dmclink      = 1
90
  ar           = lib
91
  arflags      = -c
92
  obj_ext      = .obj
93
  dependencies =
94
  platforms    = dmc_win
95
}
96
 
107 bj 97
gcc {
98
  cxx       = g++
99
  pic       = -fPIC
100
  shflags   = -shared
101
  platforms = linux
102
  pchcreate = "-o "
103
  pchnobj   = 1
217 bj 104
  visopt    = -fvisibility=hidden -fvisibility-inlines-hidden
107 bj 105
}
106
 
217 bj 107
Intel {
108
  cxx       = icpc
109
  pic       = -fPIC
110
  shflags   = -shared
111
  platforms = linux
112
  visopt    = -fvisibility=hidden
113
}
114
 
107 bj 115
SunCC {
116
  cxx             = CC
117
  pic             = -KPIC
118
  shflags         = -G
119
  compilerflags64 = -xarch=v9
120
  linkflags       = -library=Cstd -library=Crun
121
  clean           = SunWS_cache ir.out
122
  platforms       = solaris
217 bj 123
  pchcreate       = -xpch=collect:
124
  pchuse          = -xpch=use:
125
  pchstop         = -xpchstop=
126
  pchext          = .Cpch
127
  visopt          = -xldscope=hidden
107 bj 128
}
129
 
130
aCC {
131
  cxx             = aCC
132
  pic             = +Z
133
  shflags         = -b
134
  platforms       = hpux
135
  compilerflags   = -AA -D_RWSTD_MULTI_THREAD +W336
136
  compilerflags64 = +DA2.0W +DS2.0W
137
  linkflags       = -Wl,+s
138
  linkflags64     = -Wl,-x -Wl,+h$(@F) -ldl
139
  pchcreate       = "+hdr_create "
140
  pchuse          = "+hdr_use "
141
}
142
 
143
xlC_r {
144
  cxx             = xlC_r
145
  arflags64      += -X64 -rv
146
  compilerflags64 = -q64
147
  platforms       = aix
148
  pchcreate       = -qgenpcomp=
149
  pchuse          = -qusepcomp=
217 bj 150
  dependencies    =
107 bj 151
}
152
 
153
SGICC {
154
  cxx             = CC
155
  pic             = -KPIC
156
  shflags         = -shared
157
  compilerflags64 = -64
158
  linkflags       = -Wl,-woff,84
159
  clean           = ii_files
160
  platforms       = irix
161
  pchcreate       = -LANG:create_pch=
162
  pchuse          = -diag_suppress 3056 -LANG:use_pch=
163
}
164
 
165
wrsppc {
166
  cxx           = g++ppc
167
  cputype       = ppc
168
  cpu           = PPC604
169
  ar            = arppc
170
  nm            = nmppc
217 bj 171
  compilerflags = -mlongcall
107 bj 172
  platforms     = vxworks
173
}
174
 
175
wrspentium {
176
  cxx           = g++pentium
177
  cputype       = pentium
178
  cpu           = PENTIUM
179
  ar            = arpentium
180
  nm            = nmpentium
181
  platforms     = vxworks
182
}
183
 
184
NCC {
185
  cxx       = NCC
186
  pic       = -KPIC
187
  platforms = tandem
188
}
189
 
190
ghsppc {
191
  cxx           = cxppc
192
  ar            = cxppc
193
  arflags       = -archive -o
194
  compilerflags = --one_instantiation_per_object --exceptions
195
  platforms     = integrity
196
}
197
 
198
// ***********************************************************************
199
// Platform Section
200
// ***********************************************************************
201
 
202
jvm {
217 bj 203
  versupport =
107 bj 204
  lib_prefix =
205
  dll_ext    =
206
  lib_ext    = .jar
207
}
208
 
209
tru64 {
210
  shflags       = -shared /usr/lib/libcxxstd.a
211
  ldlibs        = -ltli -lrt
212
  extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT
213
}
214
 
198 bj 215
openvms {
216
  // If you want to create shareable images, you can
217
  // set dll_ext to .exe using the -value_template option of MPC.
217 bj 218
  versupport    =
198 bj 219
  lib_prefix    =
220
  dll_ext       =
221
  exe_ext       = .exe
222
  ldlibs        = -lpthread
223
  extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT
224
}
225
 
107 bj 226
linux {
217 bj 227
  ldlibs        = -ldl -lpthread $(subst lib,-l,$(sort $(basename $(notdir $(wildcard /usr/lib/librt.so /lib/librt.so)))))
107 bj 228
  extracppflags = -D_REENTRANT
229
}
230
 
231
solaris {
198 bj 232
  shflags       = -G
107 bj 233
  ldlibs        = -lsocket -ldl -lnsl -lgen -lposix4 -lthread
234
  extracppflags = -D_REENTRANT
235
}
236
 
237
hpux {
238
  dll_ext       = .sl
239
  ldlibs        = -lxti -lpthread -lrt -ldld
240
  extracppflags = -D_REENTRANT
241
}
242
 
243
aix {
244
  dll_ext       =
245
  ldlibs        = -ldl -lpthread
246
  extracppflags = -D_REENTRANT
247
}
248
 
249
irix {
250
  ldlibs  = -lsocket -lgen -lpthread
251
}
252
 
253
lynxos {
254
  dll_ext       =
217 bj 255
  extracppflags = -D__NO_INCLUDE_WARN__ -mthreads -mminimal-toc
107 bj 256
}
257
 
258
macos {
259
  dld     = libtool
260
  ranlib  = 1
261
  dll_ext = .dylib
262
  shflags = -dynamic
263
  ldlibs  = -lcc_dynamic -lstdc++ -lSystem -ldl
264
}
265
 
266
unixware {
267
  ldlibs        = -lsocket -ldl -lnsl -lgen -lposix4 -lthread
268
  extracppflags = -D_REENTRANT
269
}
270
 
271
qnx {
272
  ldlibs        = -lsocket
273
  extracppflags = -D__GCC_BUILTIN
274
}
275
 
276
vxworks {
217 bj 277
  versupport    =
107 bj 278
  dll_ext       =
217 bj 279
  exe_ext       = .out
280
  specialscript = "for i in $$3; do for j in $$4; do i=`echo $$i | sed sa\^-laa`;[ -r \"$$j/lib$$i.a\" ] && libs=\"$$libs $$j/lib$$i.a\" && break;done;done;$$1 $$2 $$libs | munch | grep -v \\.cpp > $$5"
107 bj 281
  prelink       = __ctordtor.c
217 bj 282
  clean         = __ctordtor$(OBJEXT)
107 bj 283
  ldlibs        = -L$(WIND_BASE)/target/lib/$(CPUTYPE)/$(CPU)/common -larch
217 bj 284
  extracppflags = -nostdlib -I$(WIND_BASE)/target/h
285
  ld            = ld$(CPUTYPE)
286
  linkflags     = -X -r
107 bj 287
}
288
 
217 bj 289
vxworks_rtp {
290
  versupport    =
291
  dll_ext       =
292
  exe_ext       = .vxe
293
  extracppflags = -I$(WIND_BASE)/target/usr/h -I$(WIND_BASE)/target/usr/h/wrn/coreip -mrtp
294
  linkflags     = -L$(WIND_BASE)/target/usr/lib/$(CPUTYPE)/$(CPU)/common
295
}
296
 
107 bj 297
cygwin {
217 bj 298
  versupport =
299
  dll_ext    = .dll
300
  exe_ext    = .exe
301
  rc         = windres
302
  res_ext    = .o
107 bj 303
}
304
 
305
mingw {
217 bj 306
  versupport =
107 bj 307
  lib_prefix =
308
  dll_ext    = .dll
217 bj 309
  lib_ext    = .lib
107 bj 310
  exe_ext    = .exe
311
  ldlibs     = -lwsock32 -lnetapi32
217 bj 312
  rc         = rc
107 bj 313
  devnull    = nul
314
  delete     = del /f/s/q
217 bj 315
  type       = type
107 bj 316
  copy       = copy /y
317
  makedir    = mkdir
217 bj 318
  move       = move /y
107 bj 319
}
320
 
217 bj 321
dmc_win {
322
  versupport =
323
  lib_prefix =
324
  dll_ext    = .dll
325
  lib_ext    = .lib
326
  exe_ext    = .exe
327
  ldlibs     = wsock32+kernel32
328
  rc         = rc
329
  devnull    = nul
330
  delete     = del /f/s/q
331
  type       = type
332
  copy       = copy /y
333
  makedir    = mkdir
334
  move       = move /y
335
}
336
 
107 bj 337
tandem {
338
  shflags       = -shared -all
339
  ldlibs        = -lsocket -ldl -lnsl -lgen -lthread
340
  extracppflags = -D_REENTRANT
341
}
342
 
343
// For Integrity, the following should be set as environment variables, on
344
// the make command line or within a verbatim section in your mpc file.
345
//
346
// GHSROOT     The full path to your Green Hills installation.
347
// RTOSROOT    The full path to your BSP installation (probably $GHSROOT).
348
// BSP         The BSP name (ex. sim800).
349
// TARGET_BSP  The full path to your target BSP.
350
// TARGET_LD   The full path to your target ld file.
351
//
352
integrity {
217 bj 353
  versupport    =
107 bj 354
  dll_ext       =
355
  ldlibs        = -lshm_client -lnet -livfssca -lposixsca
356
  extraarflags  = -bspname=$(RTOSROOT)/target/$(BSP).bld
357
  extracppflags = -integrate -dynamic -bspname=$(RTOSROOT)/target/$(BSP).bld -os_dir $(GHSROOT) -non_shared -Uvector -bspfile=$(TARGET_BSP) $(TARGET_LD)
358
}
359
 
360
conditional_include "user_makedll"