xref: /aoo42x/main/solenv/inc/wntmsci11.mk (revision f3ecff4e)
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# mk file for $(OS)$(COM)$(CPU)$(COMEX) == WNTMSCI11 and WNTMSCI12
25
26SOLAR_JAVA*=TRUE
27FULL_DESK=TRUE
28JAVAFLAGSDEBUG=-g
29
30# SOLAR JAva Unterstuetzung nur fuer wntmsci
31
32ASM=ml
33AFLAGS=/c /Cp /coff /safeseh
34
35# architecture dependent flags for the C and C++ compiler that can be changed by
36# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
37ARCH_FLAGS*=
38
39CC*:=cl
40.IF "$(bndchk)" != ""
41CXX*=nmcl
42.ELSE
43.IF "$(truetime)" != ""
44CXX*=nmcl /NMttOn
45.ELSE
46CXX*:=cl
47.ENDIF
48.ENDIF # "$(bndchk)" != ""
49
50.IF "$(stoponerror)" != ""
51CXX+= /NMstoponerror
52.ENDIF
53
54.IF "$(nmpass)" != ""
55CXX+= /NMpass
56.ENDIF
57
58.IF "$(ttinlines)" != ""
59CXX+= /NMttInlines
60.ENDIF
61
62.IF "$(ttnolines)" != ""
63CXX+= /NMttNoLines
64.ENDIF
65
66.IF "$(VERBOSE)" != "TRUE"
67NOLOGO*=-nologo
68.ENDIF
69
70.IF "$(VERBOSE)" != "TRUE"
71COMPILE_ECHO_SWITCH=-n
72COMPILE_ECHO_FILE=
73.ENDIF
74
75# Flags for COMEX == 11
76
77# disable "warning C4675: resolved overload was found by argument-dependent
78# lookup":
79# -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800
80CFLAGS+=-Zm500 -Zc:wchar_t- -GR
81
82# Stack buffer overrun detection.
83CFLAGS+=-GS
84
85CFLAGS+=-c -nologo -Gs $(NOLOGO)
86
87CDEFS+= -D_X86_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
88
89.IF "$(product)" != ""
90CFLAGS+= -Gy
91.ENDIF # "$(product)" != ""
92
93.IF "$(bndchk)" == ""
94.IF "$(VC_STANDARD)"==""
95CFLAGS+= -Ob1
96.ENDIF	# "$(VC_STANDARD)"==""
97.ENDIF
98
99# flags to enable build with symbols; required for crashdump feature
100#CFLAGSENABLESYMBOLS=-Zi -Fd$(MISC)/_ooo_st_$(TARGET).PDB
101CFLAGSENABLESYMBOLS=-Z7 -Yd
102
103.IF "$(bndchk)" != ""
104.IF "$(debug)" == ""
105CFLAGS+= -Z7
106.ENDIF
107.ENDIF
108
109.IF "$(truetime)" != ""
110.IF "$(debug)" == ""
111CFLAGS+= -Z7
112.ENDIF
113.ENDIF
114
115.IF "$(FULL_DESK)"!=""
116CDEFS+=-DFULL_DESK
117RSCDEFS+=-DFULL_DESK
118.ENDIF
119
120CFLAGSEXCEPTIONS=-EHa
121CFLAGS_NO_EXCEPTIONS=
122
123# enable boost support for __cdecl (SAL_CALL) C++-UNO interface methods
124CDEFS+=-DBOOST_MEM_FN_ENABLE_CDECL
125
126# with the current debug switches PCH won't work
127# anyway. so keep the existing .pch intact and don't
128# touch it
129.IF "$(debug)"!=""
130ENABLE_PCH:=
131.ENDIF "$(debug)"!=""
132
133CFLAGS_CREATE_PCH=-I$(INCPCH) -Fo$(SLO)/pchname.obj -Ycprecompiled_$(PRJNAME).hxx -DPRECOMPILED_HEADERS
134CFLAGS_USE_PCH=-I$(INCPCH) -Yuprecompiled_$(PRJNAME).hxx -Fp$(SLO)/pch/precompiled_$(PRJNAME).hxx$(PCHPOST) -DPRECOMPILED_HEADERS
135CFLAGS_USE_EXCEPTIONS_PCH=-I$(INCPCH) -Yuprecompiled_$(PRJNAME).hxx -Fp$(SLO)/pch_ex/precompiled_$(PRJNAME).hxx$(PCHPOST) -DPRECOMPILED_HEADERS
136.IF "$(CALL_CDECL)"=="TRUE"
137CFLAGSCALL=-Gd
138.ELSE			# "$(CALL_CDECL)"=="TRUE"
139CFLAGSCALL=-Gz
140.ENDIF			# "$(CALL_CDECL)"=="TRUE"
141
142CFLAGSCC=$(ARCH_FLAGS)
143.IF "$(DYNAMIC_CRT)"!=""
144CDEFSSLOMT+=-DWIN32 -D_MT -D_DLL
145CDEFSSLOMT+=-DWIN32 -D_MT -D_DLL
146.IF "$(NO_DYNAMIC_OBJ)"==""
147CDEFSOBJMT+=-DWIN32 -D_MT -D_DLL
148CDEFSOBJMT+=-DWIN32 -D_MT -D_DLL
149.ELSE
150CDEFSOBJMT+=-DWIN32 -D_MT
151CDEFSOBJMT+=-DWIN32 -D_MT
152.ENDIF # "$(NO_DYNAMIC_OBJ)"==""
153.ELSE
154CDEFSSLOMT+=-DWIN32 -D_MT
155CDEFSSLOMT+=-DWIN32 -D_MT
156CDEFSOBJMT+=-DWIN32 -D_MT
157CDEFSOBJMT+=-DWIN32 -D_MT
158.ENDIF # "$(DYNAMIC_CRT)"!=""
159
160CFLAGSPROF=-Gh -Fd$(MISC)/$(@:b).pdb
161CFLAGSDEBUG=-Zi -Fd$(MISC)/$(@:b).pdb
162CFLAGSDBGUTIL=
163.IF "$(VC_STANDARD)"==""
164CFLAGSOPT=-Oxs -Oy-
165CFLAGSNOOPT=-Od
166.ELSE			#  "$(VC_STANDARD)"==""
167CFLAGSOPT=
168CFLAGSNOOPT=
169.ENDIF			#  "$(VC_STANDARD)"==""
170CFLAGSOUTOBJ=-Fo
171
172# For C and C++, certain warnings are disabled globally, as they result in
173# spurious warnings and are hard or impossible to workaround:
174# - "warning C4061: enumerate in switch of enum is not explicitly handled by a
175#   case label",
176# - "warning C4127: conditional expression is constant",
177# - "warning C4191: unsafe conversion from function type to function type",
178# - "warning C4217: member template functions cannot be used for copy-assignment
179#   or copy-construction",
180# - "warning C4250: 'class1' : inherits 'class2::member' via dominance",
181# - "warning C4355: 'this' used in base member initializer list",
182# - "warning C4511: copy constructor could not be generated",
183# - "warning C4512: assignment operator could not be generated",
184# - "warning C4514: unreferenced inline function has been removed",
185# - "warning C4611: interaction between '_setjmp' and C++ object destruction is
186#   non-portable",
187# - "warning C4625: copy constructor could not be generated because a base class
188#   copy constructor is inaccessible",
189# - "warning C4626: assignment operator could not be generated because a base
190#   class assignment operator is inaccessible",
191# - "warning C4675: resolved overload was found by argument-dependent lookup",
192# - "warning C4710: function not inlined",
193# - "warning C4711: function selected for automatic inline expansion",
194# - "warning C4820: padding added after member".
195# - "warning C4503: 'identifier' : decorated name length exceeded, name was truncated"
196#   (http://msdn2.microsoft.com/en-us/library/074af4b6.aspx)
197# - "warning C4180: qualifier applied to function type has no meaning; ignored"
198#   (frequently seen with a recent boost)
199# For C, certain warnings from system headers (stdlib.h etc.) have to be
200# disabled globally (for C++, this is not necessary, as the system headers are
201# wrapped by STLport):
202# - "warning C4255: no function prototype given: converting
203#   '()' to '(void)'".
204# - "warning C4365: conversion from ... to ... signed/unsigned mismatch"
205
206CFLAGSWARNCXX=-Wall -wd4061 -wd4127 -wd4191 -wd4217 -wd4250 -wd4251 -wd4275 \
207    -wd4290 -wd4294 -wd4355 -wd4511 -wd4512 -wd4514 -wd4611 -wd4625 -wd4626 \
208    -wd4640 -wd4675 -wd4710 -wd4711 -wd4786 -wd4800 -wd4820 -wd4503 -wd4619 \
209    -wd4365 -wd4668 -wd4738 -wd4826 -wd4350 -wd4505 -wd4692 -wd4189 -wd4005 \
210    -wd4180
211CFLAGSWARNCC=$(CFLAGSWARNCXX) -wd4255
212CFLAGSWALLCC=$(CFLAGSWARNCC)
213CFLAGSWALLCXX=$(CFLAGSWARNCXX)
214CFLAGSWERRCC=-WX
215
216# Once all modules on this platform compile without warnings, set
217# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
218# settings.mk):
219MODULES_WITH_WARNINGS :=
220
221CDEFS+=-D_MT -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500
222.IF "$(COMEX)" == "11"
223_VC_MANIFEST_BASENAME=__VC80
224.ELSE
225_VC_MANIFEST_BASENAME=__VC90
226.ENDIF
227
228LINK=link /MACHINE:IX86 /IGNORE:4102 /IGNORE:4197
229    # do *not* add $(NOLOGO) to LINK or LINKFLAGS. Strangely, the wntmsci12 linker links fine then, but exits with
230    # a return value 1, which makes dmake think it failed
231.IF "$(PRODUCT)"!="full"
232.ELSE
233LINKFLAGS=/MAP /OPT:NOREF
234.ENDIF
235
236# excetion handling protection
237LINKFLAGS+=-safeseh
238
239# enable DEP
240LINKFLAGS+=-nxcompat
241
242# enable ASLR
243LINKFLAGS+=-dynamicbase
244
245.IF "$(linkinc)" != ""
246LINKFLAGS+=-NODEFAULTLIB -INCREMENTAL:YES -DEBUG
247MAPFILE=
248_VC_MANIFEST_INC=1
249.ELSE # "$(linkinc)" != ""
250_VC_MANIFEST_INC=0
251.IF "$(PRODUCT)"!="full"
252LINKFLAGS+= -NODEFAULTLIB -DEBUG
253.ELSE # "$(PRODUCT)"!="full"
254LINKFLAGS+= -NODEFAULTLIB -RELEASE -DEBUG -INCREMENTAL:NO
255.ENDIF # "$(PRODUCT)"!="full"
256MAPFILE=-out:$$@
257.ENDIF # "$(linkinc)" != ""
258
259.IF "$(bndchk)" != ""
260LINK=nmlink $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
261LINKFLAGS=-NODEFAULTLIB -DEBUG
262.ENDIF
263
264.IF "$(truetime)" != ""
265LINK=nmlink /NMttOn $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
266LINKFLAGS=-NODEFAULTLIB -DEBUG
267.ENDIF
268
269.IF "$(COMEX)" == "11"
270LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS,4.0
271LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS,4.0 /DLL
272.ELSE
273LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS
274LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS /DLL
275.ENDIF # "$(COMEX)" == "11"
276LINKFLAGSAPPCUI=/SUBSYSTEM:CONSOLE /BASE:0x1b000000
277LINKFLAGSSHLCUI=/SUBSYSTEM:CONSOLE /DLL
278LINKFLAGSTACK=/STACK:
279LINKFLAGSPROF=/DEBUG:mapped,partial /DEBUGTYPE:coff cap.lib
280LINKFLAGSWST=/DEBUG:mapped,partial /DEBUGTYPE:coff wst.lib /NODEFAULTLIB
281LINKFLAGSDEBUG=-DEBUG
282LINKFLAGSOPT=
283
284UWINAPILIB*=uwinapi.lib
285.IF "$(DYNAMIC_CRT)"!=""
286.IF "$(USE_STLP_DEBUG)" != ""
287LIBCMT=msvcrt.lib
288.ELSE  # "$(USE_STLP_DEBUG)" != ""
289LIBCMT=msvcrt.lib
290.ENDIF # "$(USE_STLP_DEBUG)" != ""
291.ELSE # "$(DYNAMIC_CRT)"!=""
292.IF "$(USE_STLP_DEBUG)" != ""
293LIBCMT=libcmt.lib
294.ELSE  # "$(USE_STLP_DEBUG)" != ""
295LIBCMT=libcmt.lib
296.ENDIF # "$(USE_STLP_DEBUG)" != ""
297.ENDIF # "$(DYNAMIC_CRT)"!=""
298
299STDOBJVCL=$(L)/salmain.obj
300STDOBJGUI=
301STDSLOGUI=
302STDOBJCUI=
303STDSLOCUI=
304
305STDLIBGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
306STDLIBCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
307STDSHLGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
308STDSHLCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
309
310.IF "$(USE_SYSTEM_STL)" == "YES"
311.IF "$(DYNAMIC_CRT)"!=""
312.IF "$(USE_STLP_DEBUG)" != ""
313LIBCMT+= msvcprt.lib
314.ELSE
315LIBCMT+= msvcprt.lib
316.ENDIF
317.ELSE # "$(DYNAMIC_CRT)"==""
318.IF "$(USE_STLP_DEBUG)" != ""
319LIBCMT+= libcpmt.lib
320.ELSE
321LIBCMT+= libcpmt.lib
322.ENDIF "$(USE_STLP_DEBUG)" == ""
323.ENDIF # "$(DYNAMIC_CRT)"!=""
324.ELSE # !USE_SYSTEM_STL
325.IF "$(USE_STLP_DEBUG)" != ""
326LIBSTLPORT=stlport_vc71_stldebug.lib
327LIBSTLPORTST=stlport_vc71_stldebug_static.lib
328.ELSE
329LIBSTLPORT=stlport_vc71.lib
330LIBSTLPORTST=stlport_vc71_static.lib
331.ENDIF
332.ENDIF
333
334.IF "$(PROF_EDITION)" == ""
335ATL_INCLUDE*=$(COMPATH)/PlatformSDK/include/atl
336ATL_LIB*=$(COMPATH)/atlmfc/lib
337MFC_INCLUDE*=$(COMPATH)/PlatformSDK/include/mfc
338MFC_LIB*=$(COMPATH)/atlmfc/lib
339.ELSE
340ATL_INCLUDE*=$(COMPATH)/atlmfc/include
341ATL_LIB*=$(COMPATH)/atlmfc/lib
342MFC_INCLUDE*=$(COMPATH)/atlmfc/include
343MFC_LIB*=$(COMPATH)/atlmfc/lib
344.ENDIF
345
346LIBMGR=lib $(NOLOGO)
347IMPLIB=lib
348LIBFLAGS=
349
350IMPLIBFLAGS=-machine:IX86
351
352MAPSYM=
353MAPSYMFLAGS=
354
355RC=rc
356RCFLAGS=-r -DWIN32 -fo$@ $(RCFILES)
357RCLINK=rc
358RCLINKFLAGS=
359RCSETVERSION=
360
361MT=mt.exe
362MTFLAGS=$(NOLOGO)
363
364
365DLLPOSTFIX=
366PCHPOST=.pch
367
368CSC*=$(FLIPCMD) csc
369VBC*=vbc
370
371ADVAPI32LIB=advapi32.lib
372SHELL32LIB=shell32.lib
373GDI32LIB=gdi32.lib
374OLE32LIB=ole32.lib
375OLEAUT32LIB=oleaut32.lib
376UUIDLIB=uuid.lib
377WINSPOOLLIB=winspool.lib
378IMM32LIB=imm32.lib
379VERSIONLIB=version.lib
380WINMMLIB=winmm.lib
381WSOCK32LIB=wsock32.lib
382MPRLIB=mpr.lib
383WS2_32LIB=ws2_32.lib
384KERNEL32LIB=kernel32.lib
385USER32LIB=user32.lib
386COMDLG32LIB=comdlg32.lib
387COMCTL32LIB=comctl32.lib
388CRYPT32LIB=crypt32.lib
389GDIPLUSLIB=gdiplus.lib
390DBGHELPLIB=dbghelp.lib
391MSILIB=msi.lib
392DDRAWLIB=ddraw.lib
393SHLWAPILIB=shlwapi.lib
394URLMONLIB=urlmon.lib
395WININETLIB=wininet.lib
396OLDNAMESLIB=oldnames.lib
397MSIMG32LIB=msimg32.lib
398PROPSYSLIB=propsys.lib
399
400