summaryrefslogtreecommitdiff
path: root/ACE/MPC/templates/makedll.mpt
blob: f79093fd858b5e51c7b5b2c8e985d2d7a86471e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
// -*- MPC -*-
// $Id$

// ***********************************************************************
// The default compiler for the 'make' project type is gcc (provided by
// the fill_value() method in MakeProjectCreator.pm).  This can be
// controlled by setting the compilers template variable.  It may be
// changed on the MPC command line via the -value_template option.
// Additionally, each compiler has a default platform.  The default
// platform for gcc is linux.  This too can be changed via the
// -value_template option.  Below are some examples.
//
// Use SunCC on the default platform (solaris):
//   mwc.pl -type make -value_template compilers=SunCC
// Use the default compiler (gcc) on LynxOS:
//   mwc.pl -type make -value_template platforms=lynxos
// Use HP-UX aCC on the default platform (HP-UX):
//   mwc.pl -type make -value_template compilers=aCC
// ***********************************************************************

conditional_include "common"
conditional_include "unixcommon"

configurations   = Release
obj_ext          = .o
res_ext          = .res
compile_flags    =
arflags          =
pchsupport       = 1
targetoutdir     =
libopt           = -l
build64bit       = 1
pchext           = .gch
versupport       = 1
supports_include = 1
visibility       =
depgen_flags     =
cc               = cc

// ***********************************************************************
// Configuration Section
// ***********************************************************************

Debug {
  lib_modifier = d
  genflags     = -g
}

Release {
  optimize = 1
  genflags = -O
}

// ***********************************************************************
// Compiler Section
// ***********************************************************************

java {
  cc             = javac
  cxx            = javac
  ld             = :
  obj_ext        = .class
  output_option  =
  compile_option =
  ar             = jar
  arflags        = cvf
  platforms      = jvm
}

gcj {
  cc            = gcj
  cxx           = gcj
  pic           = -fPIC
  shflags       = -shared
  platforms     = linux
  exe_linkflags = --main=<%main%>
}

cxx_tru64 {
  cxx        = cxx
  clean      = cxx_repository so_locations
  tempincopt = "-ptr "
  tempinc    = cxx_repository
  platforms  = tru64
  pchcreate  = "-nopch_messages -create_pch "
  pchuse     = "-nopch_messages -use_pch "
}

cxx_vms {
  cxx             = cxx
  arflags         = r
  compilerflags   = -ieee -names_as_is_short
  linkflags       = -threads
  shflags         = -shared -auto_symvec
  clean           = cxx_repository
  tempinc         = cxx_repository
  platforms       = openvms
}

dmc {
  cc           = dmc
  cxx          = dmc
  dmclink      = 1
  ar           = lib
  arflags      = -c
  obj_ext      = .obj
  platforms    = dmc_win
}

gcc {
  cc        = gcc
  cxx       = g++
  pic       = -fPIC
  shflags   = -shared
  platforms = linux
  pchcreate = "-o "
  pchnobj   = 1
  visopt    = -fvisibility=hidden -fvisibility-inlines-hidden
}

arm_elf_gcc {
  cc            = arm-elf-gcc
  cxx           = arm-elf-g++
  ar            = arm-elf-ar
  arflags       = rcs
  compilerflags = -isystem "$(SYSTEMDIR)/arm-elf/include"
  shflags       = -shared
  platforms     = nucleus
  pchcreate     = "-o "
  pchnobj       = 1
  visopt        = -fvisibility=hidden -fvisibility-inlines-hidden
}

Intel {
  cxx       = icpc
  pic       = -fPIC
  shflags   = -shared
  platforms = linux
  visopt    = -fvisibility=hidden
}

SunCC {
  cxx             = CC
  pic             = -KPIC
  shflags         = -G
  compilerflags64 = -xarch=v9
  linkflags       = -library=Cstd -library=Crun
  clean           = SunWS_cache ir.out
  platforms       = solaris
  pchcreate       = -xpch=collect:
  pchuse          = -xpch=use:
  pchstop         = -xpchstop=
  pchext          = .Cpch
  visopt          = -xldscope=hidden
}

aCC {
  cxx             = aCC
  pic             = +Z
  shflags         = -b
  platforms       = hpux
  compilerflags   = -AA -D_RWSTD_MULTI_THREAD +W336
  compilerflags64 = +DA2.0W +DS2.0W
  linkflags       = -Wl,+s
  linkflags64     = -Wl,-x -Wl,+h$(@F) -ldl
  pchcreate       = "+hdr_create "
  pchuse          = "+hdr_use "
}

xlC_r {
  cc              = xlc_r
  cxx             = xlC_r
  arflags64      += -X64 -rv
  compilerflags64 = -q64
  platforms       = aix
  pchcreate       = -qgenpcomp=
  pchuse          = -qusepcomp=
}

SGICC {
  cxx             = CC
  pic             = -KPIC
  shflags         = -shared
  compilerflags64 = -64
  linkflags       = -Wl,-woff,84
  clean           = ii_files
  platforms       = irix
  pchcreate       = -LANG:create_pch=
  pchuse          = -diag_suppress 3056 -LANG:use_pch=
}

wrsppc {
  cc            = gcc$(CPUTYPE)
  cxx           = g++$(CPUTYPE)
  cputype       = ppc
  cpu           = PPC604
  ar            = ar$(CPUTYPE)
  nm            = nm$(CPUTYPE)
  compilerflags = -mlongcall
  platforms     = vxworks
}

wrspentium {
  cc            = gcc$(CPUTYPE)
  cxx           = g++$(CPUTYPE)
  cputype       = pentium
  cpu           = PENTIUM
  ar            = ar$(CPUTYPE)
  nm            = nm$(CPUTYPE)
  platforms     = vxworks
}

NCC {
  cxx       = NCC
  pic       = -KPIC
  platforms = tandem
}

ghsppc {
  cc            = cc$(CXXINT)$(CPUTYPE)
  cxx           = cx$(CXXINT)$(CPUTYPE)
  ar            = cx$(CXXINT)$(CPUTYPE)
  cputype       = ppc
  arflags       = --one_instantiation_per_object -archive -o
  compilerflags = --new_style_casts --one_instantiation_per_object --exceptions --std --long_long
  platforms     = integrity
}

// ***********************************************************************
// Platform Section
// ***********************************************************************

jvm {
  versupport =
  lib_prefix =
  dll_ext    =
  lib_ext    = .jar
}

tru64 {
  shflags       = -shared /usr/lib/libcxxstd.a
  ldlibs        = -ltli -lrt
  extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT
}

openvms {
  // If you want to create shareable images, you can
  // set dll_ext to .exe using the -value_template option of MPC.
  versupport    =
  lib_prefix    =
  dll_ext       =
  exe_ext       = .exe
  ldlibs        = -lpthread
  extracppflags = -D__USE_STD_IOSTREAM -D_REENTRANT
}

linux {
  gnumake       = 1
  ldlibs        = -ldl $(subst lib,-l,$(sort $(basename $(notdir $(wildcard /usr/lib/librt.so /lib/librt.so))))) -lpthread
  extracppflags = -D_REENTRANT
}

nucleus {
  gnumake       = 1
  extracppflags = -mcpu=arm7tdmi -msoft-float -mthumb-interwork
}

solaris {
  shflags       = -G
  ldlibs        = -lsocket -ldl -lnsl -lgen -lposix4 -lthread
  extracppflags = -D_REENTRANT
}

hpux {
  dll_ext       = .sl
  ldlibs        = -lxti -lrt -lpthread -ldld
  extracppflags = -D_REENTRANT
}

aix {
  dll_ext          =
  ldlibs           = -ldl -lpthread
  extracppflags    = -D_REENTRANT
  supports_include =
}

irix {
  ldlibs  = -lsocket -lgen -lpthread
}

lynxos {
  dll_ext       =
  extracppflags = -D__NO_INCLUDE_WARN__ -mthreads -mminimal-toc
}

macos {
  dld     = libtool
  ranlib  = 1
  dll_ext = .dylib
  shflags = -dynamic
  ldlibs  = -lcc_dynamic -lstdc++ -lSystem -ldl
}

unixware {
  ldlibs        = -lsocket -ldl -lnsl -lgen -lposix4 -lthread
  extracppflags = -D_REENTRANT
}

qnx {
  ldlibs        = -lsocket
  extracppflags = -D__GCC_BUILTIN
}

vxworks {
  versupport       =
  dll_ext          =
  exe_ext          = .out
  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 > $$6"
  prelinktarget    = __ctordtor.c
  prelinktargetobj = __ctordtor$(OBJEXT)
  clean            = __ctordtor$(OBJEXT)
  ldlibs           = -L$(WIND_BASE)/target/lib/$(CPUTYPE)/$(CPU)/common$(CPU_SPECIFIC) -larch
  extracppflags    = -nostdlib -I$(WIND_BASE)/target/h
  ld               = ld$(CPUTYPE)
  linkflags        = -X -r
}

vxworks_rtp {
  versupport    =
  dll_ext       =
  exe_ext       = .vxe
  extracppflags = -I$(WIND_BASE)/target/usr/h -I$(WIND_BASE)/target/usr/h/wrn/coreip -mrtp
  ldlibs        = -ldl
  linkflags     = -L$(WIND_BASE)/target/usr/lib/$(CPUTYPE)/$(CPU)/common
}

cygwin {
  gnumake    = 1
  versupport =
  dll_ext    = .dll
  exe_ext    = .exe
  rc         = windres
  res_ext    = .o
  depgen_flags = -t make
}

// MinGW compiler with the MSYS shell, make, etc.
mingw_msys {
  versupport   =
  lib_prefix   =
  dll_ext      = .dll
  lib_ext      = .lib
  exe_ext      = .exe
  ldlibs       = -lwsock32 -lnetapi32
  rc           = rc
  pic          =
  depgen_flags = -t make
}

// MinGW compiler with either:
// a) a native Windows shell and make, or
// b) MSYS's make passing --win32 (which will use cmd.exe as its subshell)
mingw {
  versupport   =
  lib_prefix   =
  dll_ext      = .dll
  lib_ext      = .lib
  exe_ext      = .exe
  ldlibs       = -lwsock32 -lnetapi32
  rc           = rc
  devnull      = nul
  delete       = del /f/s/q
  type         = type
  copy         = copy /y
  makedir      = mkdir
  move         = move /y
  testdirstart = if not exist
  testdirend   =
  pic          =
  slash        = \\
  depgen_flags = -t make
}

dmc_win {
  versupport       =
  lib_prefix       =
  dll_ext          = .dll
  lib_ext          = .lib
  exe_ext          = .exe
  ldlibs           = wsock32+kernel32
  rc               = rc
  devnull          = nul
  delete           = del /f/s/q
  type             = type
  copy             = copy /y
  makedir          = mkdir
  move             = move /y
  supports_include =
  testdirstart     = if not exist
  testdirend       =
  depgen_flags     = -t make
}

tandem {
  shflags       = -shared -all
  ldlibs        = -lsocket -ldl -lnsl -lgen -lthread
  extracppflags = -D_REENTRANT
}

// For Integrity, the following should be set as environment variables, on
// the make command line or within a verbatim section in your mpc file.
//
// OS_DIR The full path to your BSP installation.
// BSP    The BSP name (ex. sim800).
//
integrity {
  cxxint         = int
  versupport     =
  dll_ext        =
  ldlibs         = -lshm_client -lnet -lsocket -lposix
  extraarflags   = -bsp $(BSP) -os_dir $(OS_DIR) --one_instantiation_per_object
  extracppflags  = -integrate -dynamic -bsp $(BSP) -os_dir $(OS_DIR) --one_instantiation_per_object -non_shared -Uvector
  specialscript  = "echo Kernel > $$6; echo Filename DynamicDownload >> $$6;echo EndKernel >> $$6; echo AddressSpace >> $$6;echo Filename $$5 >> $$6;echo Language C++ >> $$6;echo Library libINTEGRITY.so >> $$6;echo Library libc.so >> $$6;echo Library libscxx_e.so >> $$6;echo Task Initial >> $$6;echo StackLength 0x8000 >> $$6;echo EndTask >> $$6;echo EndAddressSpace >> $$6"
  prelinktarget  = $(notdir $(BIN).int)
  postlinkbinary = $(MV) $(BIN) $(BIN).tmp && intex -bsp $(BSP) -os_dir $(OS_DIR) -intfile $(notdir $(BIN).int) -o $(BIN) $(BIN).tmp
}

conditional_include "user_makedll"