xref: /aoo41x/main/solenv/inc/wntmsci10.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) == WNTMSCI10
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# Flags for COMEX == 10
67
68CFLAGS+=-Zm500 -Zc:forScope -GR
69CFLAGS+=-c -nologo -Gs $(NOLOGO)
70
71CDEFS+= -D_X86_=1
72
73.IF "$(product)" != ""
74CFLAGS+= -Gy
75.ENDIF # "$(product)" != ""
76
77.IF "$(bndchk)" == ""
78.IF "$(VC_STANDARD)"==""
79CFLAGS+= -Ob1
80.ENDIF	# "$(VC_STANDARD)"==""
81.ENDIF
82
83# flags to enable build with symbols; required for crashdump feature
84#CFLAGSENABLESYMBOLS=-Zi -Fd$(MISC)/_ooo_st_$(TARGET).PDB
85# full debug for RE builds only due to size concerns
86.IF "$(UPDATER)"!=""
87CFLAGSENABLESYMBOLS=-Z7 -Yd
88.ELSE				# "$(UPDATER)"!=""
89# -Zd got higher priority and overrides debug switches
90.IF "$(debug)"==""
91CFLAGSENABLESYMBOLS=-Zd
92.ENDIF			# "$(debug)"==""
93.ENDIF				# "$(UPDATER)"!=""
94
95.IF "$(bndchk)" != ""
96.IF "$(debug)" == ""
97CFLAGS+= -Z7
98.ENDIF
99.ENDIF
100
101.IF "$(truetime)" != ""
102.IF "$(debug)" == ""
103CFLAGS+= -Z7
104.ENDIF
105.ENDIF
106
107.IF "$(FULL_DESK)"!=""
108CDEFS+=-DFULL_DESK
109RSCDEFS+=-DFULL_DESK
110.ENDIF
111
112CFLAGSEXCEPTIONS=-GX
113CFLAGS_NO_EXCEPTIONS=
114
115CFLAGS_CREATE_PCH=-I$(INCPCH) -Fo$(SLO)/pchname.obj -Ycprecompiled_$(PRJNAME).hxx -DPRECOMPILED_HEADERS
116CFLAGS_USE_PCH=-I$(INCPCH) -Yuprecompiled_$(PRJNAME).hxx -Fp$(SLO)/pch/precompiled_$(PRJNAME).hxx$(PCHPOST) -DPRECOMPILED_HEADERS
117CFLAGS_USE_EXCEPTIONS_PCH=-I$(INCPCH) -Yuprecompiled_$(PRJNAME).hxx -Fp$(SLO)/pch_ex/precompiled_$(PRJNAME).hxx$(PCHPOST) -DPRECOMPILED_HEADERS
118.IF "$(CALL_CDECL)"=="TRUE"
119CFLAGSCALL=-Gd
120.ELSE			# "$(CALL_CDECL)"=="TRUE"
121CFLAGSCALL=-Gz
122.ENDIF			# "$(CALL_CDECL)"=="TRUE"
123
124CFLAGSCC=$(ARCH_FLAGS)
125.IF "$(DYNAMIC_CRT)"!=""
126CDEFSSLOMT+=-DWIN32 -D_MT -D_DLL
127CDEFSSLOMT+=-DWIN32 -D_MT -D_DLL
128.IF "$(NO_DYNAMIC_OBJ)"==""
129CDEFSOBJMT+=-DWIN32 -D_MT -D_DLL
130CDEFSOBJMT+=-DWIN32 -D_MT -D_DLL
131.ELSE
132CDEFSOBJMT+=-DWIN32 -D_MT
133CDEFSOBJMT+=-DWIN32 -D_MT
134.ENDIF
135.ELSE
136CDEFSSLOMT+=-DWIN32 -D_MT
137CDEFSSLOMT+=-DWIN32 -D_MT
138CDEFSOBJMT+=-DWIN32 -D_MT
139CDEFSOBJMT+=-DWIN32 -D_MT
140.ENDIF
141CFLAGSPROF=-Gh -Fd$(MISC)/$(@:b).pdb
142CFLAGSDEBUG=-Zi -Fd$(MISC)\_ooo_st_$(TARGET).PDB
143CFLAGSDBGUTIL=
144.IF "$(VC_STANDARD)"==""
145CFLAGSOPT=-Oxs -Oy-
146CFLAGSNOOPT=-Od
147.ELSE			#  "$(VC_STANDARD)"==""
148CFLAGSOPT=
149CFLAGSNOOPT=
150.ENDIF			#  "$(VC_STANDARD)"==""
151CFLAGSOUTOBJ=-Fo
152
153# For C and C++, certain warnings are disabled globally, as they result in
154# spurious warnings and are hard or impossible to workaround:
155# - "warning C4061: enumerate in switch of enum is not explicitly handled by a
156#   case label",
157# - "warning C4063: case 'identifier' is not a valid value for switch of enum
158#   'enumeration'",
159# - "warning C4127: conditional expression is constant",
160# - "warning C4191: unsafe conversion from function type to function type",
161# - "warning C4217: member template functions cannot be used for copy-assignment
162#   or copy-construction",
163# - "warning C4250: 'class1' : inherits 'class2::member' via dominance",
164# - "warning C4292: compiler limit : terminating debug information emission",
165# - "warning C4344: behavior change: use of explicit template arguments results
166#   in call to 'function",
167# - "warning C4347: behavior change: 'overload A' is called instead of
168#   'overload B'",
169# - "warning C4355: 'this' used in base member initializer list",
170# - "warning C4503: 'identifier': decorated name length exceeded, name was
171#   truncated" (http://msdn2.microsoft.com/en-us/library/074af4b6.aspx),
172# - "warning C4511: copy constructor could not be generated",
173# - "warning C4512: assignment operator could not be generated",
174# - "warning C4514: unreferenced inline function has been removed",
175# - "warning C4611: interaction between '_setjmp' and C++ object destruction is
176#   non-portable",
177# - "warning C4619: warning Cnnnn unknown",
178# - "warning C4625: copy constructor could not be generated because a base class
179#   copy constructor is inaccessible",
180# - "warning C4626: assignment operator could not be generated because a base
181#   class assignment operator is inaccessible",
182# - "warning C4675: resolved overload was found by argument-dependent lookup",
183# - "warning C4686: possible change in behavior, change in UDT return calling
184#   convention",
185# - "warning C4710: function not inlined",
186# - "warning C4711: function selected for automatic inline expansion",
187# - "warning C4820: padding added after member".
188# For C, certain warnings from system headers (stdlib.h etc.) have to be
189# disabled globally (for C++, this is not necessary, as the system headers are
190# wrapped by STLport):
191# - "warning C4255: no function prototype given: converting '()' to '(void)'".
192CFLAGSWARNCXX=-Wall -wd4061 -wd4063 -wd4127 -wd4191 -wd4217 -wd4250 -wd4251 \
193    -wd4275 -wd4290 -wd4292 -wd4294 -wd4344 -wd4347 -wd4355 -wd4503 -wd4511 \
194    -wd4512 -wd4514 -wd4611 -wd4619 -wd4625 -wd4626 -wd4640 -wd4675 -wd4686 \
195    -wd4710 -wd4711 -wd4786 -wd4800 -wd4820
196CFLAGSWARNCC=$(CFLAGSWARNCXX) -wd4255
197CFLAGSWALLCC=$(CFLAGSWARNCC)
198CFLAGSWALLCXX=$(CFLAGSWARNCXX)
199CFLAGSWERRCC=-WX
200
201# Once all modules on this platform compile without warnings, set
202# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
203# settings.mk):
204MODULES_WITH_WARNINGS := \
205    lingucomponent \
206    soldep
207
208CDEFS+=-DSTLPORT_VERSION=$(STLPORT_VER) -D_MT -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500
209
210COMMENTFLAG=/COMMENT:"$(PRJNAME)_$(UPD)_$(VCSID)_"
211
212LINK=link $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
213LINKOUTPUTFILTER= $(PIPEERROR) $(GREP) -v "LNK4197:"
214.IF "$(PRODUCT)"!="full"
215.ELSE
216LINKFLAGS=/MAP /OPT:NOREF
217.ENDIF
218
219.IF "$(linkinc)" != ""
220LINKFLAGS=-NODEFAULTLIB -DEBUG:full -DEBUGTYPE:cv -INCREMENTAL:YES
221MAPFILE=
222.ELSE # "$(linkinc)" != ""
223.IF "$(PRODUCT)"!="full"
224LINKFLAGS+= -NODEFAULTLIB -DEBUG:full -DEBUGTYPE:cv
225.ELSE # "$(PRODUCT)"!="full"
226LINKFLAGS+= -NODEFAULTLIB -RELEASE -DEBUG:full
227.ENDIF # "$(PRODUCT)"!="full"
228MAPFILE=-out:$$@
229.ENDIF # "$(linkinc)" != ""
230
231.IF "$(bndchk)" != ""
232LINK=nmlink $(COMMENTFLAG) $(NOLOGO) -MACHINE:IX86
233LINKFLAGS=-NODEFAULTLIB -DEBUG:full -DEBUGTYPE:cv
234.ENDIF
235
236.IF "$(truetime)" != ""
237LINK=nmlink /NMttOn $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
238LINKFLAGS=/NODEFAULTLIB /DEBUG:full /DEBUGTYPE:cv
239.ENDIF
240
241LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS,4.0
242LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS,4.0 /DLL
243LINKFLAGSAPPCUI=/SUBSYSTEM:CONSOLE /BASE:0x1b000000
244LINKFLAGSSHLCUI=/SUBSYSTEM:CONSOLE /DLL
245LINKFLAGSTACK=/STACK:
246LINKFLAGSPROF=-DEBUG:mapped,partial -DEBUGTYPE:coff cap.lib
247LINKFLAGSWST=-DEBUG:mapped,partial -DEBUGTYPE:coff wst.lib -NODEFAULTLIB
248LINKFLAGSDEBUG=-DEBUG:full -DEBUGTYPE:cv
249LINKFLAGSOPT=
250
251UWINAPILIB*=uwinapi.lib
252.IF "$(DYNAMIC_CRT)"!=""
253.IF "$(USE_STLP_DEBUG)" != ""
254LIBCMT=msvcrtd.lib
255.ELSE  # "$(USE_STLP_DEBUG)" != ""
256LIBCMT=msvcrt.lib
257.ENDIF # "$(USE_STLP_DEBUG)" != ""
258.ELSE			# "$(DYNAMIC_CRT)"!=""
259.IF "$(USE_STLP_DEBUG)" != ""
260LIBCMT=libcmtd.lib
261.ELSE  # "$(USE_STLP_DEBUG)" != ""
262LIBCMT=libcmt.lib
263.ENDIF # "$(USE_STLP_DEBUG)" != ""
264.ENDIF			# "$(DYNAMIC_CRT)"!=""
265
266STDOBJVCL=$(L)/salmain.obj
267STDOBJGUI=
268STDSLOGUI=
269STDOBJCUI=
270STDSLOCUI=
271
272STDLIBGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
273STDLIBCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
274STDSHLGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
275STDSHLCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
276
277.IF "$(USE_STLP_DEBUG)" != ""
278CFLAGS+=-MTd
279LIBSTLPORT=stlport_vc71_stldebug.lib
280LIBSTLPORTST=stlport_vc71_stldebug_static.lib
281.ELSE
282LIBSTLPORT=stlport_vc71.lib
283LIBSTLPORTST=stlport_vc71_static.lib
284.ENDIF
285
286ATL_INCLUDE*=$(COMPATH)/atlmfc/include
287ATL_LIB*=$(COMPATH)/atlmfc/lib
288
289LIBMGR=lib $(NOLOGO)
290IMPLIB=lib
291LIBFLAGS=
292
293IMPLIBFLAGS=-machine:IX86
294
295MAPSYM=
296MAPSYMFLAGS=
297
298RC=rc
299RCFLAGS=-r -DWIN32 -fo$@ $(RCFILES)
300RCLINK=rc
301RCLINKFLAGS=
302RCSETVERSION=
303
304
305DLLPOSTFIX=
306PCHPOST=.pch
307
308CSC*=$(FLIPCMD) csc
309VBC*=vbc
310
311ADVAPI32LIB=advapi32.lib
312SHELL32LIB=shell32.lib
313GDI32LIB=gdi32.lib
314OLE32LIB=ole32.lib
315OLEAUT32LIB=oleaut32.lib
316UUIDLIB=uuid.lib
317WINSPOOLLIB=winspool.lib
318IMM32LIB=imm32.lib
319VERSIONLIB=version.lib
320WINMMLIB=winmm.lib
321WSOCK32LIB=wsock32.lib
322MPRLIB=mpr.lib
323WS2_32LIB=ws2_32.lib
324KERNEL32LIB=kernel32.lib
325USER32LIB=user32.lib
326COMDLG32LIB=comdlg32.lib
327COMCTL32LIB=comctl32.lib
328CRYPT32LIB=crypt32.lib
329GDIPLUSLIB=gdiplus.lib
330DBGHELPLIB=dbghelp.lib
331MSILIB=msi.lib
332DDRAWLIB=ddraw.lib
333SHLWAPILIB=shlwapi.lib
334URLMONLIB=urlmon.lib
335WININETLIB=wininet.lib
336OLDNAMESLIB=oldnames.lib
337MSIMG32LIB=msimg32.lib
338
339