xref: /aoo41x/main/solenv/inc/os2.mk (revision 534c536d)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24# --- OS2-Environment ----------------------------------------------
25
26.IF "$(GUI)" == "OS2"
27
28# YD defined in os2env.cmd
29#.IF "$(NOSOLAR_JAVA)"==""
30#SOLAR_JAVA=TRUE
31#.ENDIF
32
33.IF "$(SOLAR_JAVA)"!=""
34JAVADEF=-DSOLAR_JAVA
35.ENDIF
36JAVAFLAGSDEBUG=-g
37
38# --- Borland ---
39.IF "$(COM)" == "BLC"
40
41JAVADEF=-DSOLAR_JAVA
42
43ASM=tasm
44AFLAGS=
45
46CXX=bcc
47CC=bcc
48CFLAGS=-c -3 -a1 -X -d -wbbf -weas -wucp -w-hid -w-par -I. $(MINUS_I)$(INCLUDE)
49CFLAGSCXX=-Pcxx -RT- -x- -V
50CFLAGSOBJGUIST=
51CFLAGSOBJCUIST=
52CFLAGSOBJGUIMT=-sm
53CFLAGSOBJCUIMT=-sm
54CFLAGSSLOGUIMT=-sm -sd
55CFLAGSSLOCUIMT=-sm -sd
56CFLAGSPROF=
57CFLAGSDEBUG=-v
58CFLAGSDBGUTIL=
59CFLAGSOPT=-Os -Ob -k-
60CFLAGSNOOPT=-Od
61CFLAGSOUTOBJ=-o
62
63LINK=tlink
64LINKFLAGS=/m /L$(LIB)
65#LINKFLAGSAPPGUI=/Toe /B:0x10000 /aa
66#Base wg. lxopt raus
67LINKFLAGSAPPGUI=/Toe /aa
68LINKFLAGSSHLGUI=/Tod
69LINKFLAGSAPPCUI=/Toe /B:0x10000 /ap
70LINKFLAGSSHLCUI=/Tod
71LINKFLAGSTACK=/S:
72LINKFLAGSPROF=
73LINKFLAGSDEBUG=/v
74.IF "$(SOLAR_JAVA)"==""
75LINKFLAGSOPT=/Oc
76.ENDIF
77
78STDOBJVCL=$(L)/salmain.o
79STDOBJGUI=c02.obj
80STDSLOGUI=c02d.obj
81STDOBJCUI=c02.obj
82STDSLOCUI=c02d.obj
83STDLIBGUIST=c2.lib os2.lib
84STDLIBCUIST=c2.lib os2.lib
85STDLIBGUIMT=c2mt.lib os2.lib
86STDLIBCUIMT=c2mt.lib os2.lib
87STDSHLGUIMT=c2mt.lib os2.lib
88STDSHLCUIMT=c2mt.lib os2.lib
89
90LIBMGR=tlib
91LIBFLAGS=/C /P128
92
93IMPLIB=implib
94IMPLIBFLAGS=/c
95
96MAPSYM=
97MAPSYMFLAGS=
98
99RC=rc
100RCFLAGS=-r $(RCFILES) $@
101RCLINK=rc
102RCLINKFLAGS=
103RCSETVERSION=
104
105DLLPOSTFIX=
106
107.ENDIF
108
109# --- IBM ---
110.IF "$(COM)" == "ICC"
111
112ASM=tasm
113AFLAGS=/ml /oi
114
115CXX=icc
116CC=icc
117.IF "$(COMEX)"=="3"
118CFLAGS=/C+ /Q+ /Gf+ /Sp1 /G4 /Se /Gs+ /Gt+ /Gd+ /J- /W2 /D__EXTENDED__ /Si+ /Xi+ $(MINUS_I)$(INCLUDE)  /Wvft-
119.ELSE
120.IF "$(COMEX)"=="I"
121CFLAGS=/C+ /Tl10 /Q+ /Gf+ /Sp4 /G4 /Sc /Gs- /D__EXTENDED__ /Si+ /Su4
122.ELSE
123CFLAGS=/C+ /Tl10 /Q+ /Gf+ /Sp1 /G4 /Sc /Gs+ /D__EXTENDED__ /Si+
124.ENDIF
125.ENDIF
126
127CFLAGSCXX=/Tdp
128
129CFLAGSEXCEPTIONS=-Gx-
130CFLAGS_NO_EXCEPTIONS=-Gx+
131
132CFLAGSOBJGUIST=/Ge+
133CFLAGSOBJCUIST=/Ge+
134.IF "$(COMEX)"=="I"
135CFLAGSOBJGUIMT=/Ge+ /Gm+
136CFLAGSOBJCUIMT=/Ge+ /Gm+
137CFLAGSSLOGUIMT=/Ge- /Gm+
138CFLAGSSLOCUIMT=/Ge- /Gm+
139.ELSE
140CFLAGSOBJGUIMT=/Ge+ /Gm+
141CFLAGSOBJCUIMT=/Ge+ /Gm+
142CFLAGSSLOGUIMT=/Ge- /Gm+
143CFLAGSSLOCUIMT=/Ge- /Gm+
144.ENDIF
145CFLAGSPROF=/Gh+
146CFLAGSDEBUG=/Ti+
147CFLAGSDBGUTIL=
148CFLAGSOPT=/O+ /Oi+ /Oc+
149CFLAGSNOOPT=/O-
150CFLAGSOUTOBJ=/Fo
151
152CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE
153
154LINK=ilink
155#LINKFLAGS=/PACKCODE:8192 /ALIGN:16 /NOD /NOE /NOI /MAP /NOFREE
156
157#bei too many segments ist /SEGMENTS:nnnn hilfreich. 3072 ist max!
158.IF "$(CPPRTST)"!=""
159LINKFLAGS=/NOFREE /NOD /NOE /NOI /MAP /OPTFUNC /PACKD:65536 /EXEPACK:2
160.ELSE
161LINKFLAGS=/NOFREE /NOD /NOE /NOI /MAP /OPTFUNC /PACKD:65536
162.ENDIF
163LINKFLAGSAPPGUI=/PM:PM /NOBASE
164LINKFLAGSSHLGUI=
165LINKFLAGSAPPCUI=/PM:VIO /NOBASE
166LINKFLAGSSHLCUI=
167LINKFLAGSTACK=/STACK:
168LINKFLAGSPROF=
169LINKFLAGSDEBUG=/COD
170#LINKFLAGSOPT=/EXEPACK:2 /OPTFUNC
171LINKFLAGSOPT=
172#.IF "$(product)"!="full" && "$(product)"!="demo" && "$(product)"!="compact"
173#LINKFLAGS=$(LINKFLAGS) /COD
174#.ELSE
175#LINKFLAGS=$(LINKFLAGS)
176#.ENDIF
177
178.IF "$(product)"=="full" || "$(product)"=="demo" || "$(product)"=="compact"
179#	LINKFLAGS=$(LINKFLAGS)
180.ELSE
181LINKFLAGS+=/COD
182.ENDIF
183
184STDOBJVCL=$(L)/salmain.obj
185STDOBJGUI=
186STDSLOGUI=
187STDOBJCUI=
188STDSLOCUI=
189.IF "$(COMEX)"=="3"
190.IF "$(CPPRTST)"!=""
191STDLIBGUIST=cppom30o.lib cpprtst.lib os2386.lib
192STDLIBCUIST=cppom30o.lib cpprtst.lib os2386.lib
193STDLIBGUIMT=cppom30o.lib cpprtst.lib os2386.lib
194STDLIBCUIMT=cppom30o.lib cpprtst.lib os2386.lib
195STDSHLGUIMT=cppom30o.lib cpprtst.lib os2386.lib
196STDSHLCUIMT=cppom30o.lib cpprtst.lib os2386.lib
197.ELSE
198STDLIBGUIST=cppom30o.lib cppom30i.lib os2386.lib
199STDLIBCUIST=cppom30o.lib cppom30i.lib os2386.lib
200STDLIBGUIMT=cppom30o.lib cppom30i.lib os2386.lib
201STDLIBCUIMT=cppom30o.lib cppom30i.lib os2386.lib
202STDSHLGUIMT=cppom30o.lib cppom30i.lib os2386.lib
203STDSHLCUIMT=cppom30o.lib cppom30i.lib os2386.lib
204.ENDIF
205.ELSE
206STDLIBGUIST=dde4sbs.lib os2386.lib
207STDLIBCUIST=dde4sbs.lib os2386.lib
208STDLIBGUIMT=dde4mbs.lib os2386.lib
209STDLIBCUIMT=dde4mbs.lib os2386.lib
210STDSHLGUIMT=dde4mbs.lib os2386.lib
211STDSHLCUIMT=dde4mbs.lib os2386.lib
212.ENDIF
213
214.IF "$(COMEX)"=="3"
215LIBMGR=ilib
216.ELSE
217LIBMGR=lib
218.ENDIF
219LIBFLAGS=/NOI
220
221IMPLIB=implib
222IMPLIBFLAGS=/noi
223
224MAPSYM=
225MAPSYMFLAGS=
226
227RC=rc
228RCFLAGS=-r $(RCFILES) $@
229RCLINK=rc
230RCLINKFLAGS=
231RCSETVERSION=
232
233DLLPOSTFIX=co
234
235.ENDIF
236
237# --- GNU ---
238.IF "$(COM)" == "GCC"
239
240.INCLUDE : os2gcci.mk
241
242.ENDIF
243
244# --- Watcom ---
245.IF "$(COM)" == "WTC"
246
247ASM=wasm
248AFLAGS=/ml /4pr
249
250CC=wcl386
251CXX=wcl386
252.IF "$(e2p)" != ""
253CFLAGS=-c -W3 -Zp4 -Zld $(MINUS_I)$(INCLUDE) -bt=os2 -zq  -zm -ep -ee
254.ELSE
255CFLAGS=-c -Zp4 -W3 -Zl -Zld $(MINUS_I)$(INCLUDE) -bt=os2 -zq -s
256.ENDIF
257CFLAGSCXX=-cc++ -xst
258CFLAGSOBJGUIST=          #-Alfd -GA -GEfs
259CFLAGSOBJCUIST=
260CFLAGSOBJGUIMT=-bm          #-Alfw -GA -GEd
261CFLAGSOBJCUIMT=-bm
262CFLAGSSLOGUIMT=-bm -bd              #-Alfw -GD -GEfd
263CFLAGSSLOCUIMT=-bm -bd
264CFLAGSPROF=
265CFLAGSDEBUG=/d2
266CFLAGSDBGUTIL=
267.IF "$(e2p)" != ""
268CFLAGSOPT=-otexan -3s
269CFLAGSNOOPT=-od -3s
270.ELSE
271CFLAGSOPT=-otexan -4s
272CFLAGSNOOPT=-od -4s
273.ENDIF
274CFLAGSOUTOBJ=-Fo
275
276LINK=wlink
277LINKFLAGS=op symf op caseexact op statics op MANY
278LINKFLAGSAPPGUI=sys os2v2 pm
279LINKFLAGSSHLGUI=sys os2v2 dll INITINSTANCE TERMINSTANCE
280LINKFLAGSAPPCUI=sys os2v2
281LINKFLAGSSHLCUI=sys os2v2 dll
282LINKFLAGSTACK=op stack=
283LINKFLAGSPROF=
284LINKFLAGSDEBUG=debug all op undefsok
285LINKFLAGSOPT=
286
287STDOBJVCL=$(L)/salmain.obj
288STDOBJGUI=libr clib3s.lib libr plib3s.lib libr math387s.lib
289STDSLOGUI=libr clib3s.lib libr os2386.lib libr plib3s.lib libr math387s.lib
290STDOBJCUI=libr clib3s.lib libr plib3s.lib libr math387s.lib
291STDSLOCUI=libr clib3s.lib libr plib3s.lib libr math387s.lib
292STDLIBGUIST=libr os2386.lib libr clib3s.lib libr plib3s.lib
293STDLIBCUIST=libr os2386.lib libr clib3s.lib libr plib3s.lib
294STDLIBGUIMT=libr os2386.lib libr clib3s.lib libr plib3s.lib
295STDLIBCUIMT=libr os2386.lib libr clib3s.lib libr plib3s.lib
296STDSHLGUIMT=libr os2386.lib libr clib3s.lib libr plibmt3s.lib libr math387s.lib libr plib3s.lib libr noemu387.lib
297STDSHLCUIMT=libr os2386.lib libr clib3s.lib libr plibmt3s.lib libr matg387s.lib libr plib3s.lib
298
299LIBMGR=wlib
300LIBFLAGS=/p=128 /c /m
301
302IMPLIB=echo
303IMPLIBFLAGS=
304
305MAPSYM=mapsym
306MAPSYMFLAGS=
307
308RC=rc
309RCFLAGS=-r $(RCFILES) $@
310RCLINK=rc
311RCLINKFLAGS=
312RCSETVERSION=
313
314DLLPOSTFIX=wo
315
316.ENDIF
317
318# --- OS2 Allgemein ---
319HC=toipf
320HCFLAGS=
321PATH_SEPERATOR*=;
322DLLPRE=
323DLLPOST=.dll
324EXECPOST=.exe
325SCPPOST=.ins
326DLLDEST=$(BIN)
327SOLARSHAREDBIN=$(SOLARBINDIR)
328
329.ENDIF
330