xref: /aoo41x/main/solenv/inc/wntmsci11.mk (revision 7871dc3e)
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:forScope,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    soldep
221
222CDEFS+=-DSTLPORT_VERSION=400 -D_MT -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500
223.IF "$(COMEX)" == "11"
224_VC_MANIFEST_BASENAME=__VC80
225.ELSE
226_VC_MANIFEST_BASENAME=__VC90
227.ENDIF
228
229LINK=link /MACHINE:IX86 /IGNORE:4102 /IGNORE:4197
230    # do *not* add $(NOLOGO) to LINK or LINKFLAGS. Strangely, the wntmsci12 linker links fine then, but exits with
231    # a return value 1, which makes dmake think it failed
232.IF "$(PRODUCT)"!="full"
233.ELSE
234LINKFLAGS=/MAP /OPT:NOREF
235.ENDIF
236
237# excetion handling protection
238LINKFLAGS+=-safeseh
239
240# enable DEP
241LINKFLAGS+=-nxcompat
242
243# enable ASLR
244LINKFLAGS+=-dynamicbase
245
246.IF "$(linkinc)" != ""
247LINKFLAGS+=-NODEFAULTLIB -INCREMENTAL:YES -DEBUG
248MAPFILE=
249_VC_MANIFEST_INC=1
250.ELSE # "$(linkinc)" != ""
251_VC_MANIFEST_INC=0
252.IF "$(PRODUCT)"!="full"
253LINKFLAGS+= -NODEFAULTLIB -DEBUG
254.ELSE # "$(PRODUCT)"!="full"
255LINKFLAGS+= -NODEFAULTLIB -RELEASE -DEBUG -INCREMENTAL:NO
256.ENDIF # "$(PRODUCT)"!="full"
257MAPFILE=-out:$$@
258.ENDIF # "$(linkinc)" != ""
259
260.IF "$(bndchk)" != ""
261LINK=nmlink $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
262LINKFLAGS=-NODEFAULTLIB -DEBUG
263.ENDIF
264
265.IF "$(truetime)" != ""
266LINK=nmlink /NMttOn $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
267LINKFLAGS=-NODEFAULTLIB -DEBUG
268.ENDIF
269
270.IF "$(COMEX)" == "11"
271LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS,4.0
272LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS,4.0 /DLL
273.ELSE
274LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS
275LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS /DLL
276.ENDIF # "$(COMEX)" == "11"
277LINKFLAGSAPPCUI=/SUBSYSTEM:CONSOLE /BASE:0x1b000000
278LINKFLAGSSHLCUI=/SUBSYSTEM:CONSOLE /DLL
279LINKFLAGSTACK=/STACK:
280LINKFLAGSPROF=/DEBUG:mapped,partial /DEBUGTYPE:coff cap.lib
281LINKFLAGSWST=/DEBUG:mapped,partial /DEBUGTYPE:coff wst.lib /NODEFAULTLIB
282LINKFLAGSDEBUG=-DEBUG
283LINKFLAGSOPT=
284
285UWINAPILIB*=uwinapi.lib
286.IF "$(DYNAMIC_CRT)"!=""
287.IF "$(USE_STLP_DEBUG)" != ""
288LIBCMT=msvcrtd.lib
289.ELSE  # "$(USE_STLP_DEBUG)" != ""
290LIBCMT=msvcrt.lib
291.ENDIF # "$(USE_STLP_DEBUG)" != ""
292.ELSE # "$(DYNAMIC_CRT)"!=""
293.IF "$(USE_STLP_DEBUG)" != ""
294LIBCMT=libcmtd.lib
295CDEFS+=-D_DEBUG
296.ELSE  # "$(USE_STLP_DEBUG)" != ""
297LIBCMT=libcmt.lib
298.ENDIF # "$(USE_STLP_DEBUG)" != ""
299.ENDIF # "$(DYNAMIC_CRT)"!=""
300
301STDOBJVCL=$(L)/salmain.obj
302STDOBJGUI=
303STDSLOGUI=
304STDOBJCUI=
305STDSLOCUI=
306
307STDLIBGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
308STDLIBCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
309STDSHLGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
310STDSHLCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
311
312.IF "$(USE_STLP_DEBUG)" != ""
313LIBSTLPORT=stlport_vc71_stldebug.lib
314LIBSTLPORTST=stlport_vc71_stldebug_static.lib
315.ELSE
316LIBSTLPORT=stlport_vc71.lib
317LIBSTLPORTST=stlport_vc71_static.lib
318.ENDIF
319
320.IF "$(PROF_EDITION)" == ""
321ATL_INCLUDE*=$(COMPATH)/PlatformSDK/include/atl
322ATL_LIB*=$(COMPATH)/atlmfc/lib
323MFC_INCLUDE*=$(COMPATH)/PlatformSDK/include/mfc
324MFC_LIB*=$(COMPATH)/atlmfc/lib
325.ELSE
326ATL_INCLUDE*=$(COMPATH)/atlmfc/include
327ATL_LIB*=$(COMPATH)/atlmfc/lib
328MFC_INCLUDE*=$(COMPATH)/atlmfc/include
329MFC_LIB*=$(COMPATH)/atlmfc/lib
330.ENDIF
331
332LIBMGR=lib $(NOLOGO)
333IMPLIB=lib
334LIBFLAGS=
335
336IMPLIBFLAGS=-machine:IX86
337
338MAPSYM=
339MAPSYMFLAGS=
340
341RC=rc
342RCFLAGS=-r -DWIN32 -fo$@ $(RCFILES)
343RCLINK=rc
344RCLINKFLAGS=
345RCSETVERSION=
346
347MT=mt.exe
348MTFLAGS=$(NOLOGO)
349
350
351DLLPOSTFIX=
352PCHPOST=.pch
353
354CSC*=$(FLIPCMD) csc
355VBC*=vbc
356
357ADVAPI32LIB=advapi32.lib
358SHELL32LIB=shell32.lib
359GDI32LIB=gdi32.lib
360OLE32LIB=ole32.lib
361OLEAUT32LIB=oleaut32.lib
362UUIDLIB=uuid.lib
363WINSPOOLLIB=winspool.lib
364IMM32LIB=imm32.lib
365VERSIONLIB=version.lib
366WINMMLIB=winmm.lib
367WSOCK32LIB=wsock32.lib
368MPRLIB=mpr.lib
369WS2_32LIB=ws2_32.lib
370KERNEL32LIB=kernel32.lib
371USER32LIB=user32.lib
372COMDLG32LIB=comdlg32.lib
373COMCTL32LIB=comctl32.lib
374CRYPT32LIB=crypt32.lib
375GDIPLUSLIB=gdiplus.lib
376DBGHELPLIB=dbghelp.lib
377MSILIB=msi.lib
378DDRAWLIB=ddraw.lib
379SHLWAPILIB=shlwapi.lib
380URLMONLIB=urlmon.lib
381WININETLIB=wininet.lib
382OLDNAMESLIB=oldnames.lib
383MSIMG32LIB=msimg32.lib
384PROPSYSLIB=propsys.lib
385
386