xref: /aoo42x/main/solenv/inc/wntmscx.mk (revision acf9b005)
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) == WNTMSCX
25
26SOLAR_JAVA*=TRUE
27FULL_DESK=TRUE
28JAVAFLAGSDEBUG=-g
29
30# SOLAR JAva Unterstuetzung nur fuer wntmscx
31
32ASM=ml
33AFLAGS=/c /Cp /coff
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# main\sal\qa\OStringBuffer\rtl_OStringBuffer.cxx
83# "fatal error C1128: number of sections exceeded object file format limit : compile with /bigobj"
84CFLAGS+=-bigobj
85
86# Stack buffer overrun detection.
87CFLAGS+=-GS
88
89CFLAGS+=-c -nologo -Gs $(NOLOGO)
90
91CDEFS+= -D_AMD64_=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
225CDEFS+=-D_MT -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500
226.IF "$(COMEX)" == "11"
227_VC_MANIFEST_BASENAME=__VC80
228.ELSE
229_VC_MANIFEST_BASENAME=__VC90
230.ENDIF
231
232LINK=link /MACHINE:X64 /IGNORE:4102 /IGNORE:4197
233    # do *not* add $(NOLOGO) to LINK or LINKFLAGS. Strangely, the wntmsci12 linker links fine then, but exits with
234    # a return value 1, which makes dmake think it failed
235.IF "$(PRODUCT)"!="full"
236.ELSE
237LINKFLAGS=/MAP /OPT:NOREF
238.ENDIF
239
240# excetion handling protection isn't used on Win64
241
242# enable DEP
243LINKFLAGS+=-nxcompat
244
245# enable ASLR
246LINKFLAGS+=-dynamicbase
247
248.IF "$(linkinc)" != ""
249LINKFLAGS+=-NODEFAULTLIB -INCREMENTAL:YES -DEBUG
250MAPFILE=
251_VC_MANIFEST_INC=1
252.ELSE # "$(linkinc)" != ""
253_VC_MANIFEST_INC=0
254.IF "$(PRODUCT)"!="full"
255LINKFLAGS+= -NODEFAULTLIB -DEBUG
256.ELSE # "$(PRODUCT)"!="full"
257LINKFLAGS+= -NODEFAULTLIB -RELEASE -DEBUG -INCREMENTAL:NO
258.ENDIF # "$(PRODUCT)"!="full"
259MAPFILE=-out:$$@
260.ENDIF # "$(linkinc)" != ""
261
262.IF "$(bndchk)" != ""
263LINK=nmlink $(COMMENTFLAG) $(NOLOGO) /MACHINE:X64
264LINKFLAGS=-NODEFAULTLIB -DEBUG
265.ENDIF
266
267.IF "$(truetime)" != ""
268LINK=nmlink /NMttOn $(COMMENTFLAG) $(NOLOGO) /MACHINE:X64
269LINKFLAGS=-NODEFAULTLIB -DEBUG
270.ENDIF
271
272.IF "$(COMEX)" == "11"
273LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS,4.0
274LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS,4.0 /DLL
275.ELSE
276LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS
277LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS /DLL
278.ENDIF # "$(COMEX)" == "11"
279LINKFLAGSAPPCUI=/SUBSYSTEM:CONSOLE /BASE:0x1b000000
280LINKFLAGSSHLCUI=/SUBSYSTEM:CONSOLE /DLL
281LINKFLAGSTACK=/STACK:
282LINKFLAGSPROF=/DEBUG:mapped,partial /DEBUGTYPE:coff cap.lib
283LINKFLAGSWST=/DEBUG:mapped,partial /DEBUGTYPE:coff wst.lib /NODEFAULTLIB
284LINKFLAGSDEBUG=-DEBUG
285LINKFLAGSOPT=
286
287UWINAPILIB*=uwinapi.lib
288.IF "$(DYNAMIC_CRT)"!=""
289.IF "$(USE_STLP_DEBUG)" != ""
290LIBCMT=msvcrt.lib
291.ELSE  # "$(USE_STLP_DEBUG)" != ""
292LIBCMT=msvcrt.lib
293.ENDIF # "$(USE_STLP_DEBUG)" != ""
294.ELSE # "$(DYNAMIC_CRT)"!=""
295.IF "$(USE_STLP_DEBUG)" != ""
296LIBCMT=libcmt.lib
297.ELSE  # "$(USE_STLP_DEBUG)" != ""
298LIBCMT=libcmt.lib
299.ENDIF # "$(USE_STLP_DEBUG)" != ""
300.ENDIF # "$(DYNAMIC_CRT)"!=""
301
302STDOBJVCL=$(L)/salmain.obj
303STDOBJGUI=
304STDSLOGUI=
305STDOBJCUI=
306STDSLOCUI=
307
308STDLIBGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
309STDLIBCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
310STDSHLGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
311STDSHLCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib
312
313.IF "$(USE_SYSTEM_STL)" == "YES"
314.IF "$(DYNAMIC_CRT)"!=""
315.IF "$(USE_STLP_DEBUG)" != ""
316LIBCMT+= msvcprt.lib
317.ELSE
318LIBCMT+= msvcprt.lib
319.ENDIF
320.ELSE # "$(DYNAMIC_CRT)"==""
321.IF "$(USE_STLP_DEBUG)" != ""
322LIBCMT+= libcpmt.lib
323.ELSE
324LIBCMT+= libcpmt.lib
325.ENDIF "$(USE_STLP_DEBUG)" == ""
326.ENDIF # "$(DYNAMIC_CRT)"!=""
327.ELSE # !USE_SYSTEM_STL
328.IF "$(USE_STLP_DEBUG)" != ""
329LIBSTLPORT=stlport_vc71_stldebug.lib
330LIBSTLPORTST=stlport_vc71_stldebug_static.lib
331.ELSE
332LIBSTLPORT=stlport_vc71.lib
333LIBSTLPORTST=stlport_vc71_static.lib
334.ENDIF
335.ENDIF
336
337.IF "$(PROF_EDITION)" == ""
338ATL_INCLUDE*=$(COMPATH)/PlatformSDK/include/atl
339ATL_LIB*=$(COMPATH)/atlmfc/lib
340MFC_INCLUDE*=$(COMPATH)/PlatformSDK/include/mfc
341MFC_LIB*=$(COMPATH)/atlmfc/lib
342.ELSE
343ATL_INCLUDE*=$(COMPATH)/atlmfc/include
344ATL_LIB*=$(COMPATH)/atlmfc/lib
345MFC_INCLUDE*=$(COMPATH)/atlmfc/include
346MFC_LIB*=$(COMPATH)/atlmfc/lib
347.ENDIF
348
349LIBMGR=lib $(NOLOGO)
350IMPLIB=lib
351LIBFLAGS=
352
353IMPLIBFLAGS=-machine:X64
354
355MAPSYM=
356MAPSYMFLAGS=
357
358RC=rc
359RCFLAGS=-r -DWIN32 -fo$@ $(RCFILES)
360RCLINK=rc
361RCLINKFLAGS=
362RCSETVERSION=
363
364MT=mt.exe
365MTFLAGS=$(NOLOGO)
366
367
368DLLPOSTFIX=
369PCHPOST=.pch
370
371CSC*=$(FLIPCMD) csc
372VBC*=vbc
373
374ADVAPI32LIB=advapi32.lib
375SHELL32LIB=shell32.lib
376GDI32LIB=gdi32.lib
377OLE32LIB=ole32.lib
378OLEAUT32LIB=oleaut32.lib
379UUIDLIB=uuid.lib
380WINSPOOLLIB=winspool.lib
381IMM32LIB=imm32.lib
382VERSIONLIB=version.lib
383WINMMLIB=winmm.lib
384WSOCK32LIB=wsock32.lib
385MPRLIB=mpr.lib
386WS2_32LIB=ws2_32.lib
387KERNEL32LIB=kernel32.lib
388USER32LIB=user32.lib
389COMDLG32LIB=comdlg32.lib
390COMCTL32LIB=comctl32.lib
391CRYPT32LIB=crypt32.lib
392GDIPLUSLIB=gdiplus.lib
393DBGHELPLIB=dbghelp.lib
394MSILIB=msi.lib
395DDRAWLIB=ddraw.lib
396SHLWAPILIB=shlwapi.lib
397URLMONLIB=urlmon.lib
398WININETLIB=wininet.lib
399OLDNAMESLIB=oldnames.lib
400MSIMG32LIB=msimg32.lib
401PROPSYSLIB=propsys.lib
402
403