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_SYSTEM_STL)" == "YES" 313.IF "$(DYNAMIC_CRT)"!="" 314.IF "$(USE_STLP_DEBUG)" != "" 315LIBCMT+= msvcprtd.lib 316.ELSE 317LIBCMT+= msvcprt.lib 318.ENDIF 319.ELSE # "$(DYNAMIC_CRT)"=="" 320.IF "$(USE_STLP_DEBUG)" != "" 321LIBCMT+= libcpmtd.lib 322.ELSE 323LIBCMT+= libcpmt.lib 324.ENDIF "$(USE_STLP_DEBUG)" == "" 325.ENDIF # "$(DYNAMIC_CRT)"!="" 326.ELSE # !USE_SYSTEM_STL 327.IF "$(USE_STLP_DEBUG)" != "" 328LIBSTLPORT=stlport_vc71_stldebug.lib 329LIBSTLPORTST=stlport_vc71_stldebug_static.lib 330.ELSE 331LIBSTLPORT=stlport_vc71.lib 332LIBSTLPORTST=stlport_vc71_static.lib 333.ENDIF 334.ENDIF 335 336.IF "$(PROF_EDITION)" == "" 337ATL_INCLUDE*=$(COMPATH)/PlatformSDK/include/atl 338ATL_LIB*=$(COMPATH)/atlmfc/lib 339MFC_INCLUDE*=$(COMPATH)/PlatformSDK/include/mfc 340MFC_LIB*=$(COMPATH)/atlmfc/lib 341.ELSE 342ATL_INCLUDE*=$(COMPATH)/atlmfc/include 343ATL_LIB*=$(COMPATH)/atlmfc/lib 344MFC_INCLUDE*=$(COMPATH)/atlmfc/include 345MFC_LIB*=$(COMPATH)/atlmfc/lib 346.ENDIF 347 348LIBMGR=lib $(NOLOGO) 349IMPLIB=lib 350LIBFLAGS= 351 352IMPLIBFLAGS=-machine:IX86 353 354MAPSYM= 355MAPSYMFLAGS= 356 357RC=rc 358RCFLAGS=-r -DWIN32 -fo$@ $(RCFILES) 359RCLINK=rc 360RCLINKFLAGS= 361RCSETVERSION= 362 363MT=mt.exe 364MTFLAGS=$(NOLOGO) 365 366 367DLLPOSTFIX= 368PCHPOST=.pch 369 370CSC*=$(FLIPCMD) csc 371VBC*=vbc 372 373ADVAPI32LIB=advapi32.lib 374SHELL32LIB=shell32.lib 375GDI32LIB=gdi32.lib 376OLE32LIB=ole32.lib 377OLEAUT32LIB=oleaut32.lib 378UUIDLIB=uuid.lib 379WINSPOOLLIB=winspool.lib 380IMM32LIB=imm32.lib 381VERSIONLIB=version.lib 382WINMMLIB=winmm.lib 383WSOCK32LIB=wsock32.lib 384MPRLIB=mpr.lib 385WS2_32LIB=ws2_32.lib 386KERNEL32LIB=kernel32.lib 387USER32LIB=user32.lib 388COMDLG32LIB=comdlg32.lib 389COMCTL32LIB=comctl32.lib 390CRYPT32LIB=crypt32.lib 391GDIPLUSLIB=gdiplus.lib 392DBGHELPLIB=dbghelp.lib 393MSILIB=msi.lib 394DDRAWLIB=ddraw.lib 395SHLWAPILIB=shlwapi.lib 396URLMONLIB=urlmon.lib 397WININETLIB=wininet.lib 398OLDNAMESLIB=oldnames.lib 399MSIMG32LIB=msimg32.lib 400PROPSYSLIB=propsys.lib 401 402