1*cdf0e10cSrcweir#************************************************************************* 2*cdf0e10cSrcweir# 3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir# 5*cdf0e10cSrcweir# Copyright 2000, 2011 Oracle and/or its affiliates. 6*cdf0e10cSrcweir# 7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir# 9*cdf0e10cSrcweir# This file is part of OpenOffice.org. 10*cdf0e10cSrcweir# 11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir# 15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir# 21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir# 26*cdf0e10cSrcweir#************************************************************************* 27*cdf0e10cSrcweir 28*cdf0e10cSrcweirGUI := WNT 29*cdf0e10cSrcweirCOM := MSC 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir# set tmpdir to some mixed case path, suitable for native tools 32*cdf0e10cSrcweirgb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp)) 33*cdf0e10cSrcweirgb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX 34*cdf0e10cSrcweir 35*cdf0e10cSrcweirgb_CC := cl 36*cdf0e10cSrcweirgb_CXX := cl 37*cdf0e10cSrcweirgb_LINK := link 38*cdf0e10cSrcweirgb_AWK := awk 39*cdf0e10cSrcweirgb_CLASSPATHSEP := ; 40*cdf0e10cSrcweirgb_RC := rc 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir# use CC/CXX if they are nondefaults 43*cdf0e10cSrcweirifneq ($(origin CC),default) 44*cdf0e10cSrcweirgb_CC := $(CC) 45*cdf0e10cSrcweirgb_GCCP := $(CC) 46*cdf0e10cSrcweirendif 47*cdf0e10cSrcweirifneq ($(origin CXX),default) 48*cdf0e10cSrcweirgb_CXX := $(CXX) 49*cdf0e10cSrcweirendif 50*cdf0e10cSrcweir 51*cdf0e10cSrcweirgb_OSDEFS := \ 52*cdf0e10cSrcweir -DWINVER=0x0500 \ 53*cdf0e10cSrcweir -D_WIN32_IE=0x0500 \ 54*cdf0e10cSrcweir -DNT351 \ 55*cdf0e10cSrcweir -DWIN32 \ 56*cdf0e10cSrcweir -DWNT \ 57*cdf0e10cSrcweir 58*cdf0e10cSrcweirgb_COMPILERDEFS := \ 59*cdf0e10cSrcweir -DMSC \ 60*cdf0e10cSrcweir -D_CRT_NON_CONFORMING_SWPRINTFS \ 61*cdf0e10cSrcweir -D_CRT_NONSTDC_NO_DEPRECATE \ 62*cdf0e10cSrcweir -D_CRT_SECURE_NO_DEPRECATE \ 63*cdf0e10cSrcweir -D_MT \ 64*cdf0e10cSrcweir -DBOOST_MEM_FN_ENABLE_CDECL \ 65*cdf0e10cSrcweir -DCPPU_ENV=msci \ 66*cdf0e10cSrcweir -DFULL_DESK \ 67*cdf0e10cSrcweir -DM1500 \ 68*cdf0e10cSrcweir 69*cdf0e10cSrcweirgb_CPUDEFS := -DINTEL -D_X86_=1 70*cdf0e10cSrcweir 71*cdf0e10cSrcweirgb_RCDEFS := \ 72*cdf0e10cSrcweir -DWINVER=0x0400 \ 73*cdf0e10cSrcweir -DWIN32 \ 74*cdf0e10cSrcweir 75*cdf0e10cSrcweirgb_RCFLAGS := \ 76*cdf0e10cSrcweir -V 77*cdf0e10cSrcweir 78*cdf0e10cSrcweirgb_CFLAGS := \ 79*cdf0e10cSrcweir -Gd \ 80*cdf0e10cSrcweir -GR \ 81*cdf0e10cSrcweir -Gs \ 82*cdf0e10cSrcweir -GS \ 83*cdf0e10cSrcweir -Gy \ 84*cdf0e10cSrcweir -nologo \ 85*cdf0e10cSrcweir -Wall \ 86*cdf0e10cSrcweir -wd4005 \ 87*cdf0e10cSrcweir -wd4061 \ 88*cdf0e10cSrcweir -wd4127 \ 89*cdf0e10cSrcweir -wd4180 \ 90*cdf0e10cSrcweir -wd4189 \ 91*cdf0e10cSrcweir -wd4191 \ 92*cdf0e10cSrcweir -wd4217 \ 93*cdf0e10cSrcweir -wd4250 \ 94*cdf0e10cSrcweir -wd4251 \ 95*cdf0e10cSrcweir -wd4255 \ 96*cdf0e10cSrcweir -wd4275 \ 97*cdf0e10cSrcweir -wd4290 \ 98*cdf0e10cSrcweir -wd4294 \ 99*cdf0e10cSrcweir -wd4350 \ 100*cdf0e10cSrcweir -wd4355 \ 101*cdf0e10cSrcweir -wd4365 \ 102*cdf0e10cSrcweir -wd4503 \ 103*cdf0e10cSrcweir -wd4505 \ 104*cdf0e10cSrcweir -wd4511 \ 105*cdf0e10cSrcweir -wd4512 \ 106*cdf0e10cSrcweir -wd4514 \ 107*cdf0e10cSrcweir -wd4611 \ 108*cdf0e10cSrcweir -wd4619 \ 109*cdf0e10cSrcweir -wd4625 \ 110*cdf0e10cSrcweir -wd4626 \ 111*cdf0e10cSrcweir -wd4640 \ 112*cdf0e10cSrcweir -wd4668 \ 113*cdf0e10cSrcweir -wd4675 \ 114*cdf0e10cSrcweir -wd4692 \ 115*cdf0e10cSrcweir -wd4710 \ 116*cdf0e10cSrcweir -wd4711 \ 117*cdf0e10cSrcweir -wd4738 \ 118*cdf0e10cSrcweir -wd4786 \ 119*cdf0e10cSrcweir -wd4800 \ 120*cdf0e10cSrcweir -wd4820 \ 121*cdf0e10cSrcweir -wd4826 \ 122*cdf0e10cSrcweir -Zc:forScope,wchar_t- \ 123*cdf0e10cSrcweir -Zm500 \ 124*cdf0e10cSrcweir 125*cdf0e10cSrcweirgb_CXXFLAGS := \ 126*cdf0e10cSrcweir -Gd \ 127*cdf0e10cSrcweir -GR \ 128*cdf0e10cSrcweir -Gs \ 129*cdf0e10cSrcweir -GS \ 130*cdf0e10cSrcweir -Gy \ 131*cdf0e10cSrcweir -nologo \ 132*cdf0e10cSrcweir -Wall \ 133*cdf0e10cSrcweir -wd4005 \ 134*cdf0e10cSrcweir -wd4061 \ 135*cdf0e10cSrcweir -wd4127 \ 136*cdf0e10cSrcweir -wd4180 \ 137*cdf0e10cSrcweir -wd4189 \ 138*cdf0e10cSrcweir -wd4191 \ 139*cdf0e10cSrcweir -wd4217 \ 140*cdf0e10cSrcweir -wd4250 \ 141*cdf0e10cSrcweir -wd4251 \ 142*cdf0e10cSrcweir -wd4275 \ 143*cdf0e10cSrcweir -wd4290 \ 144*cdf0e10cSrcweir -wd4294 \ 145*cdf0e10cSrcweir -wd4350 \ 146*cdf0e10cSrcweir -wd4355 \ 147*cdf0e10cSrcweir -wd4365 \ 148*cdf0e10cSrcweir -wd4503 \ 149*cdf0e10cSrcweir -wd4505 \ 150*cdf0e10cSrcweir -wd4511 \ 151*cdf0e10cSrcweir -wd4512 \ 152*cdf0e10cSrcweir -wd4514 \ 153*cdf0e10cSrcweir -wd4611 \ 154*cdf0e10cSrcweir -wd4619 \ 155*cdf0e10cSrcweir -wd4625 \ 156*cdf0e10cSrcweir -wd4626 \ 157*cdf0e10cSrcweir -wd4640 \ 158*cdf0e10cSrcweir -wd4668 \ 159*cdf0e10cSrcweir -wd4675 \ 160*cdf0e10cSrcweir -wd4692 \ 161*cdf0e10cSrcweir -wd4710 \ 162*cdf0e10cSrcweir -wd4711 \ 163*cdf0e10cSrcweir -wd4738 \ 164*cdf0e10cSrcweir -wd4786 \ 165*cdf0e10cSrcweir -wd4800 \ 166*cdf0e10cSrcweir -wd4820 \ 167*cdf0e10cSrcweir -wd4826 \ 168*cdf0e10cSrcweir -Zc:forScope,wchar_t- \ 169*cdf0e10cSrcweir -Zm500 \ 170*cdf0e10cSrcweir 171*cdf0e10cSrcweirgb_STDLIBS := \ 172*cdf0e10cSrcweir uwinapi \ 173*cdf0e10cSrcweir kernel32 \ 174*cdf0e10cSrcweir msvcrt \ 175*cdf0e10cSrcweir oldnames \ 176*cdf0e10cSrcweir 177*cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) 178*cdf0e10cSrcweirgb_CFLAGS_WERROR := -WX 179*cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -WX 180*cdf0e10cSrcweirendif 181*cdf0e10cSrcweir 182*cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \ 183*cdf0e10cSrcweir -DEXCEPTIONS_ON \ 184*cdf0e10cSrcweir -EHa \ 185*cdf0e10cSrcweir 186*cdf0e10cSrcweirgb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir 189*cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \ 190*cdf0e10cSrcweir -DEXCEPTIONS_OFF \ 191*cdf0e10cSrcweir 192*cdf0e10cSrcweirgb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS) 193*cdf0e10cSrcweir 194*cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \ 195*cdf0e10cSrcweir -MACHINE:IX86 \ 196*cdf0e10cSrcweir -NODEFAULTLIB \ 197*cdf0e10cSrcweir -OPT:NOREF \ 198*cdf0e10cSrcweir -SUBSYSTEM:CONSOLE \ 199*cdf0e10cSrcweir -safeseh \ 200*cdf0e10cSrcweir -nxcompat \ 201*cdf0e10cSrcweir -dynamicbase \ 202*cdf0e10cSrcweir $(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \ 203*cdf0e10cSrcweir 204*cdf0e10cSrcweirifneq ($(ENABLE_CRASHDUMP),) 205*cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -DEBUG 206*cdf0e10cSrcweirgb_CFLAGS+=-Zi 207*cdf0e10cSrcweirgb_CXXFLAGS+=-Zi 208*cdf0e10cSrcweirendif 209*cdf0e10cSrcweir 210*cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2) 211*cdf0e10cSrcweirgb_CXXFLAGS +=-Zi 212*cdf0e10cSrcweirgb_CFLAGS +=-Zi 213*cdf0e10cSrcweirgb_COMPILEROPTFLAGS := 214*cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -DEBUG 215*cdf0e10cSrcweirelse 216*cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy- 217*cdf0e10cSrcweirendif 218*cdf0e10cSrcweir 219*cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -Od 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir# Helper class 223*cdf0e10cSrcweirgb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 224*cdf0e10cSrcweirgb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 225*cdf0e10cSrcweirgb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 226*cdf0e10cSrcweirgb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 227*cdf0e10cSrcweir 228*cdf0e10cSrcweirdefine gb_Helper_abbreviate_dirs_native 229*cdf0e10cSrcweirR=$(gb_Helper_REPODIR_NATIVE) && $(subst $(REPODIR)/,$$R/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,O=$(gb_Helper_OUTDIR_NATIVE) && W=$(gb_Helper_WORKDIR_NATIVE) && S=$(gb_Helper_SRCDIR_NATIVE))) && \ 230*cdf0e10cSrcweir$(subst $(REPODIR)/,$$R/,$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,$(subst $(WORKDIR)/,$$W/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,$(subst $(gb_Helper_SRCDIR_NATIVE)/,$$S/,$(subst $(gb_Helper_OUTDIR_NATIVE)/,$$O/,$(subst $(gb_Helper_WORKDIR_NATIVE)/,$$W/,$(1))))))))) 231*cdf0e10cSrcweirendef 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir# convert parametters filesystem root to native notation 234*cdf0e10cSrcweir# does some real work only on windows, make sure not to 235*cdf0e10cSrcweir# break the dummy implementations on unx* 236*cdf0e10cSrcweirdefine gb_Helper_convert_native 237*cdf0e10cSrcweir$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \ 238*cdf0e10cSrcweir$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \ 239*cdf0e10cSrcweir$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \ 240*cdf0e10cSrcweir$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \ 241*cdf0e10cSrcweir$(1))))) 242*cdf0e10cSrcweirendef 243*cdf0e10cSrcweir 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir# CObject class 246*cdf0e10cSrcweir 247*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 248*cdf0e10cSrcweirdefine gb_CObject__command_deponcompile 249*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 250*cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 251*cdf0e10cSrcweir $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \ 252*cdf0e10cSrcweir -I$(dir $(3)) \ 253*cdf0e10cSrcweir $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME)%,$(6)) \ 254*cdf0e10cSrcweir $(3) \ 255*cdf0e10cSrcweir -f - \ 256*cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 257*cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 258*cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 259*cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 260*cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 261*cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 262*cdf0e10cSrcweir > $(call gb_CObject_get_dep_target,$(2))) 263*cdf0e10cSrcweirendef 264*cdf0e10cSrcweirelse 265*cdf0e10cSrcweirCObject__command_deponcompile = 266*cdf0e10cSrcweirendif 267*cdf0e10cSrcweir 268*cdf0e10cSrcweirdefine gb_CObject__command 269*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C ,3) 270*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 271*cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 272*cdf0e10cSrcweir unset INCLUDE && \ 273*cdf0e10cSrcweir $(gb_CC) \ 274*cdf0e10cSrcweir $(DEFS) $(CFLAGS) -Fd$(PDBFILE) \ 275*cdf0e10cSrcweir $(PCHFLAGS) \ 276*cdf0e10cSrcweir -I$(dir $(3)) \ 277*cdf0e10cSrcweir $(INCLUDE) \ 278*cdf0e10cSrcweir -c $(3) \ 279*cdf0e10cSrcweir -Fo$(1)) 280*cdf0e10cSrcweir$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE)) 281*cdf0e10cSrcweirendef 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir# CxxObject class 285*cdf0e10cSrcweir 286*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 287*cdf0e10cSrcweirdefine gb_CxxObject__command_deponcompile 288*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 289*cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 290*cdf0e10cSrcweir $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \ 291*cdf0e10cSrcweir -I$(dir $(3)) \ 292*cdf0e10cSrcweir $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME)%,$(6)) \ 293*cdf0e10cSrcweir $(3) \ 294*cdf0e10cSrcweir -f - \ 295*cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 296*cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 297*cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 298*cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 299*cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 300*cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 301*cdf0e10cSrcweir > $(call gb_CxxObject_get_dep_target,$(2))) 302*cdf0e10cSrcweir endef 303*cdf0e10cSrcweirelse 304*cdf0e10cSrcweirgb_CxxObject__command_deponcompile = 305*cdf0e10cSrcweirendif 306*cdf0e10cSrcweir 307*cdf0e10cSrcweirdefine gb_CxxObject__command 308*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3) 309*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 310*cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 311*cdf0e10cSrcweir unset INCLUDE && \ 312*cdf0e10cSrcweir $(gb_CXX) \ 313*cdf0e10cSrcweir $(DEFS) $(CXXFLAGS) -Fd$(PDBFILE)\ 314*cdf0e10cSrcweir $(PCHFLAGS) \ 315*cdf0e10cSrcweir -I$(dir $(3)) \ 316*cdf0e10cSrcweir $(INCLUDE_STL) $(INCLUDE) \ 317*cdf0e10cSrcweir -c $(3) \ 318*cdf0e10cSrcweir -Fo$(1)) 319*cdf0e10cSrcweir$(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE)) 320*cdf0e10cSrcweirendef 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir# PrecompiledHeader class 324*cdf0e10cSrcweir 325*cdf0e10cSrcweirgb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \ 326*cdf0e10cSrcweir -Fp$(call gb_PrecompiledHeader_get_target,$(1)) 327*cdf0e10cSrcweir 328*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 329*cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile 330*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 331*cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 332*cdf0e10cSrcweir $(4) $(5) \ 333*cdf0e10cSrcweir -I$(dir $(3)) \ 334*cdf0e10cSrcweir $(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \ 335*cdf0e10cSrcweir $(3) \ 336*cdf0e10cSrcweir -f - \ 337*cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 338*cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 339*cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 340*cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 341*cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 342*cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 343*cdf0e10cSrcweir > $(call gb_PrecompiledHeader_get_dep_target,$(2))) 344*cdf0e10cSrcweirendef 345*cdf0e10cSrcweirelse 346*cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile = 347*cdf0e10cSrcweirendif 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir 350*cdf0e10cSrcweirdefine gb_PrecompiledHeader__command 351*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1) 352*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 353*cdf0e10cSrcweir mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \ 354*cdf0e10cSrcweir unset INCLUDE && \ 355*cdf0e10cSrcweir $(gb_CXX) \ 356*cdf0e10cSrcweir $(4) $(5) -Fd$(PDBFILE) \ 357*cdf0e10cSrcweir -I$(dir $(3)) \ 358*cdf0e10cSrcweir $(6) \ 359*cdf0e10cSrcweir -c $(3) \ 360*cdf0e10cSrcweir -Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj) 361*cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 362*cdf0e10cSrcweirendef 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir# NoexPrecompiledHeader class 365*cdf0e10cSrcweir 366*cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -Yu$(1).hxx \ 367*cdf0e10cSrcweir -Fp$(call gb_NoexPrecompiledHeader_get_target,$(1)) 368*cdf0e10cSrcweir 369*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 370*cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile 371*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 372*cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 373*cdf0e10cSrcweir $(4) $(5) \ 374*cdf0e10cSrcweir -I$(dir $(3)) \ 375*cdf0e10cSrcweir $(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \ 376*cdf0e10cSrcweir $(3) \ 377*cdf0e10cSrcweir -f - \ 378*cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 379*cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 380*cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 381*cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 382*cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 383*cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 384*cdf0e10cSrcweir > $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) 385*cdf0e10cSrcweirendef 386*cdf0e10cSrcweirelse 387*cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile = 388*cdf0e10cSrcweirendif 389*cdf0e10cSrcweir 390*cdf0e10cSrcweir 391*cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command 392*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1) 393*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 394*cdf0e10cSrcweir mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \ 395*cdf0e10cSrcweir unset INCLUDE && \ 396*cdf0e10cSrcweir $(gb_CXX) \ 397*cdf0e10cSrcweir $(4) $(5) -Fd$(PDBFILE) \ 398*cdf0e10cSrcweir -I$(dir $(3)) \ 399*cdf0e10cSrcweir $(6) \ 400*cdf0e10cSrcweir -c $(3) \ 401*cdf0e10cSrcweir -Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj) 402*cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 403*cdf0e10cSrcweirendef 404*cdf0e10cSrcweir 405*cdf0e10cSrcweir# LinkTarget class 406*cdf0e10cSrcweir 407*cdf0e10cSrcweirgb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS) 408*cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) 409*cdf0e10cSrcweir 410*cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\ 411*cdf0e10cSrcweir $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \ 412*cdf0e10cSrcweir $(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \ 413*cdf0e10cSrcweir 414*cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 415*cdf0e10cSrcweir 416*cdf0e10cSrcweirgb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb 417*cdf0e10cSrcweir 418*cdf0e10cSrcweirdefine gb_LinkTarget__command 419*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 420*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 421*cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 422*cdf0e10cSrcweir rm -f $(1) && \ 423*cdf0e10cSrcweir RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100, \ 424*cdf0e10cSrcweir $(call gb_Helper_convert_native,$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 425*cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 426*cdf0e10cSrcweir $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 427*cdf0e10cSrcweir $(PCHOBJS) $(NATIVERES))) && \ 428*cdf0e10cSrcweir $(gb_LINK) \ 429*cdf0e10cSrcweir $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ 430*cdf0e10cSrcweir $(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \ 431*cdf0e10cSrcweir $(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \ 432*cdf0e10cSrcweir $(LDFLAGS) \ 433*cdf0e10cSrcweir @$${RESPONSEFILE} \ 434*cdf0e10cSrcweir $(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \ 435*cdf0e10cSrcweir $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \ 436*cdf0e10cSrcweir $(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); RC=$$?; rm $${RESPONSEFILE} \ 437*cdf0e10cSrcweir $(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC) 438*cdf0e10cSrcweirendef 439*cdf0e10cSrcweir 440*cdf0e10cSrcweir 441*cdf0e10cSrcweir# Library class 442*cdf0e10cSrcweir 443*cdf0e10cSrcweirgb_Library_DEFS := -D_DLL 444*cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -DLL 445*cdf0e10cSrcweirgb_Library_get_rpath := 446*cdf0e10cSrcweir 447*cdf0e10cSrcweirgb_Library_SYSPRE := i 448*cdf0e10cSrcweirgb_Library_PLAINEXT := .lib 449*cdf0e10cSrcweir 450*cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \ 451*cdf0e10cSrcweir advapi32 \ 452*cdf0e10cSrcweir gdi32 \ 453*cdf0e10cSrcweir gdiplus \ 454*cdf0e10cSrcweir gnu_getopt \ 455*cdf0e10cSrcweir imm32\ 456*cdf0e10cSrcweir kernel32 \ 457*cdf0e10cSrcweir msimg32 \ 458*cdf0e10cSrcweir msvcrt \ 459*cdf0e10cSrcweir mpr \ 460*cdf0e10cSrcweir oldnames \ 461*cdf0e10cSrcweir ole32 \ 462*cdf0e10cSrcweir oleaut32 \ 463*cdf0e10cSrcweir shell32 \ 464*cdf0e10cSrcweir unicows \ 465*cdf0e10cSrcweir user32 \ 466*cdf0e10cSrcweir uuid \ 467*cdf0e10cSrcweir uwinapi \ 468*cdf0e10cSrcweir winspool \ 469*cdf0e10cSrcweir z \ 470*cdf0e10cSrcweir 471*cdf0e10cSrcweirgb_Library_LAYER := \ 472*cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 473*cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \ 474*cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \ 475*cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 476*cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 477*cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \ 478*cdf0e10cSrcweir $(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \ 479*cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \ 480*cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 481*cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \ 482*cdf0e10cSrcweir 483*cdf0e10cSrcweirgb_Library_FILENAMES :=\ 484*cdf0e10cSrcweir $(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 485*cdf0e10cSrcweir 486*cdf0e10cSrcweirgb_Library_DLLEXT := .dll 487*cdf0e10cSrcweirgb_Library_MAJORVER := 3 488*cdf0e10cSrcweirgb_Library_RTEXT := MSC$(gb_Library_DLLEXT) 489*cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true)) 490*cdf0e10cSrcweirgb_Library_STLEXT := port_vc7145$(gb_Library_DLLEXT) 491*cdf0e10cSrcweirelse 492*cdf0e10cSrcweirgb_Library_STLEXT := port_vc7145_stldebug$(gb_Library_DLLEXT) 493*cdf0e10cSrcweirendif 494*cdf0e10cSrcweirgb_Library_OOOEXT := mi$(gb_Library_DLLEXT) 495*cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_DLLEXT) 496*cdf0e10cSrcweirgb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT) 497*cdf0e10cSrcweirgb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT) 498*cdf0e10cSrcweir 499*cdf0e10cSrcweirgb_Library_DLLFILENAMES :=\ 500*cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \ 501*cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 502*cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 503*cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 504*cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \ 505*cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \ 506*cdf0e10cSrcweir $(foreach lib,$(gb_Library_STLLIBS),$(lib):$(lib)$(gb_Library_STLEXT)) \ 507*cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 508*cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 509*cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \ 510*cdf0e10cSrcweir 511*cdf0e10cSrcweirdefine gb_Library_Library_platform 512*cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3)) 513*cdf0e10cSrcweir 514*cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\ 515*cdf0e10cSrcweir $(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \ 516*cdf0e10cSrcweir $(3).manifest \ 517*cdf0e10cSrcweir $(call gb_LinkTarget_get_pdbfile,$(2)) \ 518*cdf0e10cSrcweir $(patsubst %.dll,%.pdb,$(3)) \ 519*cdf0e10cSrcweir $(patsubst %.dll,%.ilk,$(3)) \ 520*cdf0e10cSrcweir) 521*cdf0e10cSrcweir 522*cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \ 523*cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3)) 524*cdf0e10cSrcweir 525*cdf0e10cSrcweirifneq ($(ENABLE_CRASHDUMP),) 526*cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \ 527*cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS += \ 528*cdf0e10cSrcweir $(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \ 529*cdf0e10cSrcweir $(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \ 530*cdf0e10cSrcweir 531*cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))),$(patsubst %.dll,%.pdb,$(3))) 532*cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))),$(patsubst %.dll,%.ilk,$(3))) 533*cdf0e10cSrcweirendif 534*cdf0e10cSrcweir 535*cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3)) 536*cdf0e10cSrcweir 537*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \ 538*cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2)) 539*cdf0e10cSrcweir 540*cdf0e10cSrcweirendef 541*cdf0e10cSrcweir 542*cdf0e10cSrcweirdefine gb_Library_add_default_nativeres 543*cdf0e10cSrcweir$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) 544*cdf0e10cSrcweir$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo) 545*cdf0e10cSrcweir$(call gb_WinResTarget_set_defs,$(1)/$(2),\ 546*cdf0e10cSrcweir $$(DEFS) \ 547*cdf0e10cSrcweir -DADDITIONAL_VERINFO1 \ 548*cdf0e10cSrcweir -DADDITIONAL_VERINFO2 \ 549*cdf0e10cSrcweir -DADDITIONAL_VERINFO3 \ 550*cdf0e10cSrcweir) 551*cdf0e10cSrcweir$(call gb_Library_add_nativeres,$(1),$(2)) 552*cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) 553*cdf0e10cSrcweir 554*cdf0e10cSrcweirendef 555*cdf0e10cSrcweir 556*cdf0e10cSrcweirdefine gb_Library_add_nativeres 557*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2)) 558*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2)) 559*cdf0e10cSrcweir 560*cdf0e10cSrcweirendef 561*cdf0e10cSrcweir 562*cdf0e10cSrcweirdefine gb_Library_get_dllname 563*cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES))) 564*cdf0e10cSrcweirendef 565*cdf0e10cSrcweir 566*cdf0e10cSrcweir 567*cdf0e10cSrcweir# StaticLibrary class 568*cdf0e10cSrcweir 569*cdf0e10cSrcweirgb_StaticLibrary_DEFS := 570*cdf0e10cSrcweirgb_StaticLibrary_TARGETTYPEFLAGS := -LIB 571*cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := 572*cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .lib 573*cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 574*cdf0e10cSrcweir 575*cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \ 576*cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 577*cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 578*cdf0e10cSrcweir 579*cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES)) 580*cdf0e10cSrcweir 581*cdf0e10cSrcweirdefine gb_StaticLibrary_StaticLibrary_platform 582*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \ 583*cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2)) 584*cdf0e10cSrcweir 585*cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\ 586*cdf0e10cSrcweir $(call gb_LinkTarget_get_pdbfile,$(2)) \ 587*cdf0e10cSrcweir) 588*cdf0e10cSrcweir 589*cdf0e10cSrcweirendef 590*cdf0e10cSrcweir 591*cdf0e10cSrcweir# Executable class 592*cdf0e10cSrcweir 593*cdf0e10cSrcweirgb_Executable_EXT := .exe 594*cdf0e10cSrcweirgb_Executable_TARGETTYPEFLAGS := -RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG 595*cdf0e10cSrcweirgb_Executable_get_rpath := 596*cdf0e10cSrcweir 597*cdf0e10cSrcweirdefine gb_Executable_Executable_platform 598*cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\ 599*cdf0e10cSrcweir $(patsubst %.exe,%.pdb,$(call gb_LinkTarget_get_target,$(2))) \ 600*cdf0e10cSrcweir $(call gb_LinkTarget_get_pdbfile,$(2)) \ 601*cdf0e10cSrcweir $(call gb_LinkTarget_get_target,$(2)).manifest \ 602*cdf0e10cSrcweir) 603*cdf0e10cSrcweir 604*cdf0e10cSrcweir$(call gb_Executable_get_target,$(1)) \ 605*cdf0e10cSrcweir$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_get_target,$(1)).manifest 606*cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest,$(call gb_LinkTarget_get_target,$(2)).manifest) 607*cdf0e10cSrcweir 608*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \ 609*cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2)) 610*cdf0e10cSrcweir 611*cdf0e10cSrcweirendef 612*cdf0e10cSrcweir 613*cdf0e10cSrcweir# CppunitTest class 614*cdf0e10cSrcweir 615*cdf0e10cSrcweirgb_CppunitTest_CPPTESTPRECOMMAND := 616*cdf0e10cSrcweirgb_CppunitTest_SYSPRE := itest_ 617*cdf0e10cSrcweirgb_CppunitTest_EXT := .lib 618*cdf0e10cSrcweirgb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT) 619*cdf0e10cSrcweirgb_CppunitTest_get_libfilename = test_$(1).dll 620*cdf0e10cSrcweir 621*cdf0e10cSrcweirdefine gb_CppunitTest_CppunitTest_platform 622*cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3)) 623*cdf0e10cSrcweir 624*cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\ 625*cdf0e10cSrcweir $(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \ 626*cdf0e10cSrcweir $(3).manifest \ 627*cdf0e10cSrcweir $(patsubst %.dll,%.pdb,$(3)) \ 628*cdf0e10cSrcweir $(call gb_LinkTarget_get_pdbfile,$(2)) \ 629*cdf0e10cSrcweir $(patsubst %.dll,%.ilk,$(3)) \ 630*cdf0e10cSrcweir) 631*cdf0e10cSrcweir 632*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \ 633*cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2)) 634*cdf0e10cSrcweir 635*cdf0e10cSrcweirendef 636*cdf0e10cSrcweir 637*cdf0e10cSrcweir# JunitTest class 638*cdf0e10cSrcweir 639*cdf0e10cSrcweirgb_defaultlangiso := en-US 640*cdf0e10cSrcweirgb_smoketest_instset := $(SRCDIR)/instsetoo_native/$(INPATH)/OpenOffice/archive/install/$(gb_defaultlangiso)/OOo_*_install-arc_$(gb_defaultlangiso).zip 641*cdf0e10cSrcweir 642*cdf0e10cSrcweirifeq ($(OOO_TEST_SOFFICE),) 643*cdf0e10cSrcweir 644*cdf0e10cSrcweir 645*cdf0e10cSrcweir# Work around Windows problems with long pathnames (see issue 50885) by 646*cdf0e10cSrcweir# installing into the temp directory instead of the module output tree (in which 647*cdf0e10cSrcweir# case $(target).instpath contains the path to the temp installation, 648*cdf0e10cSrcweir# which is removed after smoketest); can be removed once issue 50885 is fixed; 649*cdf0e10cSrcweir# on other platforms, a single installation to solver is created in 650*cdf0e10cSrcweir# smoketestoo_native. 651*cdf0e10cSrcweir 652*cdf0e10cSrcweir# for now, no dependency on $(shell ls $(gb_smoketest_instset)) 653*cdf0e10cSrcweir# because that doesn't work before the instset is built 654*cdf0e10cSrcweir# and there is not much of a benefit anyway (gbuild not knowing about smoketest) 655*cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform_longpathname_hack 656*cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : $(call gb_JunitTest_get_target,$(1)).instpath 657*cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : CLEAN_CMD = $(call gb_Helper_abbreviate_dirs,rm -rf `cat $$@.instpath` $$@.instpath) 658*cdf0e10cSrcweir 659*cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)).instpath : 660*cdf0e10cSrcweir INST_DIR=$$$$(cygpath -m `mktemp -d -t testinst.XXXXXX`) \ 661*cdf0e10cSrcweir && unzip -d "$$$${INST_DIR}" $$(gb_smoketest_instset) \ 662*cdf0e10cSrcweir && mv "$$$${INST_DIR}"/OOo_*_install-arc_$$(gb_defaultlangiso) "$$$${INST_DIR}"/opt\ 663*cdf0e10cSrcweir && mkdir -p $$(dir $$@) \ 664*cdf0e10cSrcweir && echo "$$$${INST_DIR}" > $$@ 665*cdf0e10cSrcweir 666*cdf0e10cSrcweirendef 667*cdf0e10cSrcweirelse # OOO_TEST_SOFFICE 668*cdf0e10cSrcweirgb_JunitTest_JunitTest_platform_longpathname_hack = 669*cdf0e10cSrcweirendif # OOO_TEST_SOFFICE 670*cdf0e10cSrcweir 671*cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform 672*cdf0e10cSrcweir$(call gb_JunitTest_JunitTest_platform_longpathname_hack,$(1)) 673*cdf0e10cSrcweir 674*cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : DEFS := \ 675*cdf0e10cSrcweir -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:`cat $(call gb_JunitTest_get_target,$(1)).instpath`/opt/OpenOffice.org 3/program/soffice.exe}" \ 676*cdf0e10cSrcweir -Dorg.openoffice.test.arg.env=PATH \ 677*cdf0e10cSrcweir -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \ 678*cdf0e10cSrcweir 679*cdf0e10cSrcweirendef 680*cdf0e10cSrcweir 681*cdf0e10cSrcweir 682*cdf0e10cSrcweir# SdiTarget class 683*cdf0e10cSrcweir 684*cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 685*cdf0e10cSrcweir 686*cdf0e10cSrcweir# SrsPartMergeTarget 687*cdf0e10cSrcweir 688*cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 689*cdf0e10cSrcweir 690*cdf0e10cSrcweir# SrsPartTarget class 691*cdf0e10cSrcweir 692*cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe 693*cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 694*cdf0e10cSrcweir 695*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 696*cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep 697*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 698*cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 699*cdf0e10cSrcweir $(INCLUDE) \ 700*cdf0e10cSrcweir $(DEFS) \ 701*cdf0e10cSrcweir $(2) \ 702*cdf0e10cSrcweir -f - \ 703*cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 704*cdf0e10cSrcweir -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \ 705*cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 706*cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 707*cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 708*cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 709*cdf0e10cSrcweir > $(call gb_SrsPartTarget_get_dep_target,$(1))) 710*cdf0e10cSrcweirendef 711*cdf0e10cSrcweirelse 712*cdf0e10cSrcweirgb_SrsPartTarget__command_dep = 713*cdf0e10cSrcweirendif 714*cdf0e10cSrcweir 715*cdf0e10cSrcweir# WinResTarget class 716*cdf0e10cSrcweir 717*cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=.res 718*cdf0e10cSrcweir 719*cdf0e10cSrcweirdefine gb_WinResTarget__command 720*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3) 721*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 722*cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 723*cdf0e10cSrcweir $(gb_RC) \ 724*cdf0e10cSrcweir $(DEFS) $(FLAGS) \ 725*cdf0e10cSrcweir -I$(dir $(3)) \ 726*cdf0e10cSrcweir $(INCLUDE) \ 727*cdf0e10cSrcweir -Fo$(1) \ 728*cdf0e10cSrcweir $(RCFILE) ) 729*cdf0e10cSrcweirendef 730*cdf0e10cSrcweir 731*cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\ 732*cdf0e10cSrcweir WinResTarget \ 733*cdf0e10cSrcweir)) 734*cdf0e10cSrcweir 735*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 736*cdf0e10cSrcweirdefine gb_WinResTarget__command_dep 737*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 738*cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 739*cdf0e10cSrcweir $(INCLUDE) \ 740*cdf0e10cSrcweir $(DEFS) \ 741*cdf0e10cSrcweir $(2) \ 742*cdf0e10cSrcweir -f - \ 743*cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 744*cdf0e10cSrcweir -v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \ 745*cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 746*cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 747*cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 748*cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 749*cdf0e10cSrcweir > $(call gb_WinResTarget_get_dep_target,$(1))) 750*cdf0e10cSrcweirendef 751*cdf0e10cSrcweirelse 752*cdf0e10cSrcweirgb_WinResTarget__command_dep = 753*cdf0e10cSrcweirendif 754*cdf0e10cSrcweir 755*cdf0e10cSrcweir# ComponentTarget 756*cdf0e10cSrcweir 757*cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 758*cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \ 759*cdf0e10cSrcweir OOO:vnd.sun.star.expand:\dBRAND_BASE_DIR/program/ \ 760*cdf0e10cSrcweir URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 761*cdf0e10cSrcweir 762*cdf0e10cSrcweir# vim: set noet sw=4 ts=4: 763