xref: /trunk/main/solenv/inc/wntmsci10.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) == 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
207CDEFS+=-DSTLPORT_VERSION=$(STLPORT_VER) -D_MT -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500
208
209COMMENTFLAG=/COMMENT:"$(PRJNAME)_$(UPD)_$(VCSID)_"
210
211LINK=link $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
212LINKOUTPUTFILTER= $(PIPEERROR) $(GREP) -v "LNK4197:"
213.IF "$(PRODUCT)"!="full"
214.ELSE
215LINKFLAGS=/MAP /OPT:NOREF
216.ENDIF
217
218.IF "$(linkinc)" != ""
219LINKFLAGS=-NODEFAULTLIB -DEBUG:full -DEBUGTYPE:cv -INCREMENTAL:YES
220MAPFILE=
221.ELSE # "$(linkinc)" != ""
222.IF "$(PRODUCT)"!="full"
223LINKFLAGS+= -NODEFAULTLIB -DEBUG:full -DEBUGTYPE:cv
224.ELSE # "$(PRODUCT)"!="full"
225LINKFLAGS+= -NODEFAULTLIB -RELEASE -DEBUG:full
226.ENDIF # "$(PRODUCT)"!="full"
227MAPFILE=-out:$$@
228.ENDIF # "$(linkinc)" != ""
229
230.IF "$(bndchk)" != ""
231LINK=nmlink $(COMMENTFLAG) $(NOLOGO) -MACHINE:IX86
232LINKFLAGS=-NODEFAULTLIB -DEBUG:full -DEBUGTYPE:cv
233.ENDIF
234
235.IF "$(truetime)" != ""
236LINK=nmlink /NMttOn $(COMMENTFLAG) $(NOLOGO) /MACHINE:IX86
237LINKFLAGS=/NODEFAULTLIB /DEBUG:full /DEBUGTYPE:cv
238.ENDIF
239
240LINKFLAGSAPPGUI=/SUBSYSTEM:WINDOWS,4.0
241LINKFLAGSSHLGUI=/SUBSYSTEM:WINDOWS,4.0 /DLL
242LINKFLAGSAPPCUI=/SUBSYSTEM:CONSOLE /BASE:0x1b000000
243LINKFLAGSSHLCUI=/SUBSYSTEM:CONSOLE /DLL
244LINKFLAGSTACK=/STACK:
245LINKFLAGSPROF=-DEBUG:mapped,partial -DEBUGTYPE:coff cap.lib
246LINKFLAGSWST=-DEBUG:mapped,partial -DEBUGTYPE:coff wst.lib -NODEFAULTLIB
247LINKFLAGSDEBUG=-DEBUG:full -DEBUGTYPE:cv
248LINKFLAGSOPT=
249
250UWINAPILIB*=uwinapi.lib
251.IF "$(DYNAMIC_CRT)"!=""
252.IF "$(USE_STLP_DEBUG)" != ""
253LIBCMT=msvcrtd.lib
254.ELSE  # "$(USE_STLP_DEBUG)" != ""
255LIBCMT=msvcrt.lib
256.ENDIF # "$(USE_STLP_DEBUG)" != ""
257.ELSE			# "$(DYNAMIC_CRT)"!=""
258.IF "$(USE_STLP_DEBUG)" != ""
259LIBCMT=libcmtd.lib
260.ELSE  # "$(USE_STLP_DEBUG)" != ""
261LIBCMT=libcmt.lib
262.ENDIF # "$(USE_STLP_DEBUG)" != ""
263.ENDIF			# "$(DYNAMIC_CRT)"!=""
264
265STDOBJVCL=$(L)/salmain.obj
266STDOBJGUI=
267STDSLOGUI=
268STDOBJCUI=
269STDSLOCUI=
270
271STDLIBGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
272STDLIBCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
273STDSHLGUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
274STDSHLCUIMT=$(LIBCMT) $(UWINAPILIB) kernel32.lib user32.lib oldnames.lib psapi.lib
275
276.IF "$(USE_STLP_DEBUG)" != ""
277CFLAGS+=-MTd
278LIBSTLPORT=stlport_vc71_stldebug.lib
279LIBSTLPORTST=stlport_vc71_stldebug_static.lib
280.ELSE
281LIBSTLPORT=stlport_vc71.lib
282LIBSTLPORTST=stlport_vc71_static.lib
283.ENDIF
284
285ATL_INCLUDE*=$(COMPATH)/atlmfc/include
286ATL_LIB*=$(COMPATH)/atlmfc/lib
287
288LIBMGR=lib $(NOLOGO)
289IMPLIB=lib
290LIBFLAGS=
291
292IMPLIBFLAGS=-machine:IX86
293
294MAPSYM=
295MAPSYMFLAGS=
296
297RC=rc
298RCFLAGS=-r -DWIN32 -fo$@ $(RCFILES)
299RCLINK=rc
300RCLINKFLAGS=
301RCSETVERSION=
302
303
304DLLPOSTFIX=
305PCHPOST=.pch
306
307CSC*=$(FLIPCMD) csc
308VBC*=vbc
309
310ADVAPI32LIB=advapi32.lib
311SHELL32LIB=shell32.lib
312GDI32LIB=gdi32.lib
313OLE32LIB=ole32.lib
314OLEAUT32LIB=oleaut32.lib
315UUIDLIB=uuid.lib
316WINSPOOLLIB=winspool.lib
317IMM32LIB=imm32.lib
318VERSIONLIB=version.lib
319WINMMLIB=winmm.lib
320WSOCK32LIB=wsock32.lib
321MPRLIB=mpr.lib
322WS2_32LIB=ws2_32.lib
323KERNEL32LIB=kernel32.lib
324USER32LIB=user32.lib
325COMDLG32LIB=comdlg32.lib
326COMCTL32LIB=comctl32.lib
327CRYPT32LIB=crypt32.lib
328GDIPLUSLIB=gdiplus.lib
329DBGHELPLIB=dbghelp.lib
330MSILIB=msi.lib
331DDRAWLIB=ddraw.lib
332SHLWAPILIB=shlwapi.lib
333URLMONLIB=urlmon.lib
334WININETLIB=wininet.lib
335OLDNAMESLIB=oldnames.lib
336MSIMG32LIB=msimg32.lib
337
338