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