Subversion Repositories gelsvn

Rev

Rev 107 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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