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