17871dc3eSAndrew Rist#************************************************************** 27871dc3eSAndrew Rist# 37871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 47871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 57871dc3eSAndrew Rist# distributed with this work for additional information 67871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 77871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 87871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 97871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 107871dc3eSAndrew Rist# 117871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 127871dc3eSAndrew Rist# 137871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 147871dc3eSAndrew Rist# software distributed under the License is distributed on an 157871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 177871dc3eSAndrew Rist# specific language governing permissions and limitations 187871dc3eSAndrew Rist# under the License. 197871dc3eSAndrew Rist# 207871dc3eSAndrew Rist#************************************************************** 217871dc3eSAndrew Rist 227871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweirGUI := WNT 25cdf0e10cSrcweirCOM := GCC 26cdf0e10cSrcweir 27cdf0e10cSrcweir# set tmpdir to some mixed case path, suitable for native tools 28cdf0e10cSrcweirgb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp)) 29cdf0e10cSrcweirgb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX 30cdf0e10cSrcweir 31cdf0e10cSrcweirgb_CC := $(CC) 32cdf0e10cSrcweirgb_CXX := $(CXX) 33cdf0e10cSrcweirgb_LINK := $(shell $(CC) -print-prog-name=ld) 34cdf0e10cSrcweirgb_AR := $(shell $(CC) -print-prog-name=ar) 35cdf0e10cSrcweirgb_AWK := awk 367d9c290fSMichael Stahlgb_RC := rc 37cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin) 38cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/lib/mingw 39cdf0e10cSrcweirelse 40cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin-w64-mingw32) 41cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/usr/i686-w64-mingw32/sys-root/mingw/lib 42cdf0e10cSrcweirelse 43cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/lib 44cdf0e10cSrcweirendif 45cdf0e10cSrcweirendif 46cdf0e10cSrcweirifeq ($(MINGW_SHARED_GXXLIB),YES) 47cdf0e10cSrcweirgb_MINGW_LIBSTDCPP := $(subst -l,,$(MINGW_SHARED_LIBSTDCPP)) 48cdf0e10cSrcweirelse 49cdf0e10cSrcweirgb_MINGW_LIBSTDCPP := \ 50cdf0e10cSrcweir stdc++ \ 51cdf0e10cSrcweir moldname 52cdf0e10cSrcweirendif 53cdf0e10cSrcweirifeq ($(MINGW_SHARED_GCCLIB),YES) 54cdf0e10cSrcweirgb_MINGW_LIBGCC := \ 55cdf0e10cSrcweir gcc_s \ 56cdf0e10cSrcweir gcc 57cdf0e10cSrcweirelse 58cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES) 59cdf0e10cSrcweirgb_MINGW_LIBGCC := \ 60cdf0e10cSrcweir gcc \ 61cdf0e10cSrcweir gcc_eh 62cdf0e10cSrcweirelse 63cdf0e10cSrcweirgb_MINGW_LIBGCC := gcc 64cdf0e10cSrcweirendif 65cdf0e10cSrcweirendif 66cdf0e10cSrcweir 67cdf0e10cSrcweirgb_OSDEFS := \ 68cdf0e10cSrcweir -DWINVER=0x0500 \ 69cdf0e10cSrcweir -D_WIN32_IE=0x0500 \ 707d9c290fSMichael Stahl -D_WIN32_WINNT=0x0600 \ 71cdf0e10cSrcweir -DNT351 \ 72cdf0e10cSrcweir -DWIN32 \ 73cdf0e10cSrcweir -DWNT \ 74cdf0e10cSrcweir 75cdf0e10cSrcweirgb_COMPILERDEFS := \ 76cdf0e10cSrcweir -DGCC \ 77cdf0e10cSrcweir -D$(CVER) \ 78cdf0e10cSrcweir -DCVER=$(CVER) \ 79cdf0e10cSrcweir -DGLIBC=2 \ 80386ca866SDon Lewis -DCPPU_ENV=$(COMNAME) \ 81cdf0e10cSrcweir -D_MT \ 82cdf0e10cSrcweir -D_NATIVE_WCHAR_T_DEFINED \ 83cdf0e10cSrcweir -D_MSC_EXTENSIONS \ 84cdf0e10cSrcweir -D_FORCENAMELESSUNION \ 85cdf0e10cSrcweir 86cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin-w64-mingw32) 87cdf0e10cSrcweirgb_COMPILERDEFS +=-D_declspec=__declspec 88cdf0e10cSrcweirendif 89cdf0e10cSrcweir 90787e1130SDon Lewisgb_CPUDEFS := -D$(ALIGN) -D$(CPUNAME) 918cb913c4SDamjan Jovanovicgb_CPUDEFS += \ 92cdf0e10cSrcweir -D_M_IX86 \ 93cdf0e10cSrcweir 94cdf0e10cSrcweirgb_RCDEFS := \ 957d9c290fSMichael Stahl -DWIN32 \ 967d9c290fSMichael Stahl -D__GNUC__ \ 97cdf0e10cSrcweir 98cdf0e10cSrcweirgb_RCFLAGS := \ 99cdf0e10cSrcweir -V 100cdf0e10cSrcweir 101cdf0e10cSrcweirgb_CFLAGS := \ 102cdf0e10cSrcweir -Wall \ 103cdf0e10cSrcweir -Wendif-labels \ 104cdf0e10cSrcweir -Wextra \ 105cdf0e10cSrcweir -fmessage-length=0 \ 106cdf0e10cSrcweir -fno-strict-aliasing \ 107cdf0e10cSrcweir -pipe \ 108cdf0e10cSrcweir -nostdinc \ 109cdf0e10cSrcweir 110cdf0e10cSrcweirgb_CXXFLAGS := \ 111cdf0e10cSrcweir -Wall \ 112cdf0e10cSrcweir -Wendif-labels \ 113cdf0e10cSrcweir -Wextra \ 114cdf0e10cSrcweir -Wno-ctor-dtor-privacy \ 115cdf0e10cSrcweir -Wno-non-virtual-dtor \ 116cdf0e10cSrcweir -Wreturn-type \ 117cdf0e10cSrcweir -Wshadow \ 118cdf0e10cSrcweir -Wuninitialized \ 119cdf0e10cSrcweir -fmessage-length=0 \ 120cdf0e10cSrcweir -fno-strict-aliasing \ 121cdf0e10cSrcweir -fno-use-cxa-atexit \ 122cdf0e10cSrcweir -pipe \ 123cdf0e10cSrcweir -nostdinc \ 124cdf0e10cSrcweir 125cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) 126cdf0e10cSrcweirgb_CFLAGS_WERROR := -Werror 127cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -Werror 128cdf0e10cSrcweirendif 129cdf0e10cSrcweir 130cdf0e10cSrcweirifneq ($(SYSBASE),) 131cdf0e10cSrcweirgb_CXXFLAGS += --sysroot=$(SYSBASE) 132cdf0e10cSrcweirgb_CFLAGS += --sysroot=$(SYSBASE) 133cdf0e10cSrcweirendif 134cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \ 135cdf0e10cSrcweir -DEXCEPTIONS_ON \ 136cdf0e10cSrcweir -fexceptions \ 137cdf0e10cSrcweir -fno-enforce-eh-specs \ 138cdf0e10cSrcweir 139cdf0e10cSrcweirgb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) 140cdf0e10cSrcweir 141cdf0e10cSrcweir 142cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \ 143cdf0e10cSrcweir -DEXCEPTIONS_OFF \ 144cdf0e10cSrcweir -fno-exceptions \ 145828da808SPedro Giffuni 146cdf0e10cSrcweirgb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS) 147cdf0e10cSrcweir 148cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \ 149cdf0e10cSrcweir --export-all-symbols \ 150cdf0e10cSrcweir --kill-at \ 151cdf0e10cSrcweir --exclude-libs ALL \ 152cdf0e10cSrcweir --enable-stdcall-fixup \ 153cdf0e10cSrcweir --enable-runtime-pseudo-reloc-v2 \ 154cdf0e10cSrcweir -L$(gb_Library_DLLDIR) \ 155cdf0e10cSrcweir $(patsubst %,-L%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \ 156cdf0e10cSrcweir 157cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES) 158cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -shared-libgcc 159cdf0e10cSrcweirendif 160cdf0e10cSrcweir 1619e1b801eSDamjan Jovanovicifeq ($(ENABLE_SYMBOLS),SMALL) 1629e1b801eSDamjan Jovanovicgb_DEBUG_CFLAGS := -ggdb1 -finline-limit=0 -fno-inline -fno-default-inline 1639e1b801eSDamjan Jovanovicelse 164b63233d8Sdamjangb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline 1659e1b801eSDamjan Jovanovicendif 166b63233d8Sdamjan 167cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2) 168cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -O0 169cdf0e10cSrcweirelse 170cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Os 171cdf0e10cSrcweirendif 172cdf0e10cSrcweir 173cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -O0 174cdf0e10cSrcweir 175cdf0e10cSrcweirgb_STDLIBS := \ 176cdf0e10cSrcweir mingwthrd \ 177cdf0e10cSrcweir $(gb_MINGW_LIBSTDCPP) \ 178cdf0e10cSrcweir mingw32 \ 179cdf0e10cSrcweir $(gb_MINGW_LIBGCC) \ 180cdf0e10cSrcweir uwinapi \ 181cdf0e10cSrcweir moldname \ 182cdf0e10cSrcweir mingwex \ 183cdf0e10cSrcweir kernel32 \ 184cdf0e10cSrcweir msvcrt \ 185cdf0e10cSrcweir 186cdf0e10cSrcweir 187cdf0e10cSrcweir# Helper class 188cdf0e10cSrcweir 189cdf0e10cSrcweirgb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 190cdf0e10cSrcweirgb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 191cdf0e10cSrcweirgb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 192cdf0e10cSrcweirgb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 193cdf0e10cSrcweir 194cdf0e10cSrcweirdefine gb_Helper_abbreviate_dirs_native 195cdf0e10cSrcweirR=$(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))) && \ 196cdf0e10cSrcweir$(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))))))))) 197cdf0e10cSrcweirendef 198cdf0e10cSrcweir 199cdf0e10cSrcweir# convert parametters filesystem root to native notation 200cdf0e10cSrcweir# does some real work only on windows, make sure not to 201cdf0e10cSrcweir# break the dummy implementations on unx* 202cdf0e10cSrcweirdefine gb_Helper_convert_native 203cdf0e10cSrcweir$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \ 204cdf0e10cSrcweir$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \ 205cdf0e10cSrcweir$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \ 206cdf0e10cSrcweir$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \ 207cdf0e10cSrcweir$(1))))) 208cdf0e10cSrcweirendef 209cdf0e10cSrcweir 210b63233d8Sdamjan# convert parametters filesystem root to native notation 211b63233d8Sdamjan# does some real work only on windows, make sure not to 212b63233d8Sdamjan# break the dummy implementations on unx* 213b63233d8Sdamjandefine gb_Helper_convert_native 214b63233d8Sdamjan$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \ 215b63233d8Sdamjan$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \ 216b63233d8Sdamjan$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \ 217b63233d8Sdamjan$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \ 218b63233d8Sdamjan$(1))))) 219b63233d8Sdamjanendef 220b63233d8Sdamjan 2211bb309c6SDamjan Jovanovic# AsmObject class 2221bb309c6SDamjan Jovanovic 2231bb309c6SDamjan Jovanovicgb_AsmObject_EXT := .s 2241bb309c6SDamjan Jovanovic 2251bb309c6SDamjan Jovanovicdefine gb_AsmObject__command 2261bb309c6SDamjan Jovanovic$(call gb_Output_announce,$(2),$(true),ASM,3) 2271bb309c6SDamjan Jovanovic$(call gb_Helper_abbreviate_dirs,\ 2281bb309c6SDamjan Jovanovic mkdir -p $(dir $(1)) && \ 2291bb309c6SDamjan Jovanovic $(gb_CC) \ 2301bb309c6SDamjan Jovanovic $(DEFS) \ 2311bb309c6SDamjan Jovanovic $(T_CFLAGS) \ 2321bb309c6SDamjan Jovanovic $(CFLAGS) \ 2331bb309c6SDamjan Jovanovic -c $(3) \ 2341bb309c6SDamjan Jovanovic -o $(1) \ 2351bb309c6SDamjan Jovanovic -MT $(1) \ 2361bb309c6SDamjan Jovanovic -I$(dir $(3)) \ 2371bb309c6SDamjan Jovanovic $(INCLUDE)) 2381bb309c6SDamjan Jovanovicendef 2391bb309c6SDamjan Jovanovic 240cdf0e10cSrcweir# CObject class 241cdf0e10cSrcweir 242cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 243b63233d8Sdamjandefine gb_Object__command_deponcompile 244cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 245cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 246cdf0e10cSrcweir $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \ 247cdf0e10cSrcweir -I$(dir $(3)) \ 248cdf0e10cSrcweir $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \ 249cdf0e10cSrcweir $(3) \ 250cdf0e10cSrcweir -f - \ 251cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 252cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 253cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 254cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 255cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 256cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 257b63233d8Sdamjan > $(2)) 258cdf0e10cSrcweirendef 259cdf0e10cSrcweirelse 260b63233d8Sdamjangb_Object__command_deponcompile = 261cdf0e10cSrcweirendif 262cdf0e10cSrcweir 263cdf0e10cSrcweirdefine gb_CObject__command 264cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C ,3) 265cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 266cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 267cdf0e10cSrcweir $(gb_CC) \ 268b63233d8Sdamjan $(DEFS) \ 269b63233d8Sdamjan $(T_CFLAGS) \ 270cdf0e10cSrcweir -c $(3) \ 271cdf0e10cSrcweir -o $(1) \ 272cdf0e10cSrcweir -I$(dir $(3)) \ 273cdf0e10cSrcweir $(INCLUDE)) 274b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CFLAGS),$(INCLUDE)) 275cdf0e10cSrcweirendef 276cdf0e10cSrcweir 277cdf0e10cSrcweir 278cdf0e10cSrcweir 279cdf0e10cSrcweir# CxxObject class 280cdf0e10cSrcweir 281cdf0e10cSrcweirdefine gb_CxxObject__command 282cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3) 283cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 284cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 285cdf0e10cSrcweir $(gb_CXX) \ 286b63233d8Sdamjan $(DEFS) \ 287b63233d8Sdamjan $(T_CXXFLAGS) \ 288cdf0e10cSrcweir -c $(3) \ 289cdf0e10cSrcweir -o $(1) \ 290cdf0e10cSrcweir -I$(dir $(3)) \ 291cdf0e10cSrcweir $(INCLUDE_STL) $(INCLUDE)) 292b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CXXFLAGS),$(INCLUDE_STL) $(INCLUDE)) 293cdf0e10cSrcweirendef 294cdf0e10cSrcweir 295cdf0e10cSrcweir 296cdf0e10cSrcweir# PrecompiledHeader class 297cdf0e10cSrcweir 298cdf0e10cSrcweirgb_PrecompiledHeader_EXT := .gch 299cdf0e10cSrcweir 300cdf0e10cSrcweirgb_PrecompiledHeader_get_enableflags = -I$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR) \ 301cdf0e10cSrcweir -DPRECOMPILED_HEADERS \ 302cdf0e10cSrcweir -Winvalid-pch \ 303cdf0e10cSrcweir 304cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 305cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile 306cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 307cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 308cdf0e10cSrcweir $(4) $(5) \ 309cdf0e10cSrcweir -I$(dir $(3)) \ 310cdf0e10cSrcweir $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \ 311cdf0e10cSrcweir $(3) \ 312cdf0e10cSrcweir -f - \ 313cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 314cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 315cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 316cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 317cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 318cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 319cdf0e10cSrcweir > $(call gb_PrecompiledHeader_get_dep_target,$(2))) 320cdf0e10cSrcweirendef 321cdf0e10cSrcweirelse 322cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile = 323cdf0e10cSrcweirendif 324cdf0e10cSrcweir 325cdf0e10cSrcweirdefine gb_PrecompiledHeader__command 326cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1) 327cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 328cdf0e10cSrcweir mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \ 329cdf0e10cSrcweir $(gb_CXX) \ 330cdf0e10cSrcweir -x c++-header \ 331cdf0e10cSrcweir $(4) $(5) \ 332cdf0e10cSrcweir -I$(dir $(3)) \ 333e6091915Struckman -DPRECOMPILED_HEADERS \ 334cdf0e10cSrcweir $(6) \ 335cdf0e10cSrcweir -c $(3) \ 336cdf0e10cSrcweir -o$(1)) 337cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 338cdf0e10cSrcweir 339cdf0e10cSrcweirendef 340cdf0e10cSrcweir 341cdf0e10cSrcweir# NoexPrecompiledHeader class 342cdf0e10cSrcweir 343cdf0e10cSrcweirgb_NoexPrecompiledHeader_EXT := .gch 344cdf0e10cSrcweir 345cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -I$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR) \ 346cdf0e10cSrcweir -Winvalid-pch \ 347cdf0e10cSrcweir 348cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 349cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile 350cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 351cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 352cdf0e10cSrcweir $(4) $(5) \ 353cdf0e10cSrcweir -I$(dir $(3)) \ 354cdf0e10cSrcweir $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \ 355cdf0e10cSrcweir $(3) \ 356cdf0e10cSrcweir -f - \ 357cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 358cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 359cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 360cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 361cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 362cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 363cdf0e10cSrcweir > $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) 364cdf0e10cSrcweirendef 365cdf0e10cSrcweirelse 366cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile = 367cdf0e10cSrcweirendif 368cdf0e10cSrcweir 369cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command 370cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1) 371cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 372cdf0e10cSrcweir mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \ 373cdf0e10cSrcweir $(gb_CXX) \ 374cdf0e10cSrcweir -x c++-header \ 375cdf0e10cSrcweir $(4) $(5) \ 376cdf0e10cSrcweir -I$(dir $(3)) \ 377e6091915Struckman -DPRECOMPILED_HEADERS \ 378cdf0e10cSrcweir $(6) \ 379cdf0e10cSrcweir -c $(3) \ 380cdf0e10cSrcweir -o$(1)) 381cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 382cdf0e10cSrcweir 383cdf0e10cSrcweirendef 384cdf0e10cSrcweir 385cdf0e10cSrcweir 386cdf0e10cSrcweir# LinkTarget class 387cdf0e10cSrcweir 388b63233d8Sdamjangb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) 389cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) 390cdf0e10cSrcweir 391cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\ 392cdf0e10cSrcweir $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \ 393cdf0e10cSrcweir $(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \ 394cdf0e10cSrcweir 395cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 396cdf0e10cSrcweir 397cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinkexecutable 398cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 399cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 400cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 401cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 402cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 403*52d905a6SJim Jagielski $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ 404cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 4057d9c290fSMichael Stahl $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 4067d9c290fSMichael Stahl $(NATIVERES) " > $${RESPONSEFILE} && \ 407cdf0e10cSrcweir $(gb_LINK) \ 408cdf0e10cSrcweir $(gb_Executable_TARGETTYPEFLAGS) \ 409b63233d8Sdamjan $(if $(filter YES,$(gb_Executable_TARGETGUI)), --subsystem windows, --subsystem console) \ 410b63233d8Sdamjan $(T_LDFLAGS) \ 411cdf0e10cSrcweir $(gb_MINGWLIBDIR)/crt2.o \ 412cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtbegin.o \ 413cdf0e10cSrcweir @$${RESPONSEFILE} \ 414cdf0e10cSrcweir --start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \ 415cdf0e10cSrcweir --start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \ 41644c25570SAndre Fischer --start-group $(patsubst %,-l%,$(EXTERNAL_LIBS)) --end-group \ 417b63233d8Sdamjan $(LIBS) \ 418cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtend.o \ 419cdf0e10cSrcweir -Map $(basename $(1)).map \ 420cdf0e10cSrcweir -o $(1)) 421cdf0e10cSrcweirendef 422cdf0e10cSrcweir 423cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinklibrary 424cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 425cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 426cdf0e10cSrcweir rm -f $(1) && \ 427cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 4286bf52fdaSDamjan Jovanovic echo "\ 4296bf52fdaSDamjan Jovanovic $(foreach object,$(ASMXXOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ 4306bf52fdaSDamjan Jovanovic $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 431*52d905a6SJim Jagielski $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ 432cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 4337d9c290fSMichael Stahl $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 4347d9c290fSMichael Stahl $(NATIVERES) " > $${RESPONSEFILE} && \ 435cdf0e10cSrcweir $(gb_LINK) \ 436cdf0e10cSrcweir $(gb_Library_TARGETTYPEFLAGS) \ 437b63233d8Sdamjan $(T_LDFLAGS) \ 438cdf0e10cSrcweir --enable-auto-image-base \ 439cdf0e10cSrcweir -e _DllMainCRTStartup@12 \ 440cdf0e10cSrcweir $(gb_MINGWLIBDIR)/dllcrt2.o \ 441cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtbegin.o \ 442cdf0e10cSrcweir @$${RESPONSEFILE} \ 443cdf0e10cSrcweir --start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \ 444cdf0e10cSrcweir --start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \ 445b63233d8Sdamjan $(LIBS) \ 446cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtend.o \ 447cdf0e10cSrcweir -Map $(basename $(DLLTARGET)).map \ 448cdf0e10cSrcweir -o $(DLLTARGET) && touch $(1)) 449cdf0e10cSrcweirendef 450cdf0e10cSrcweir 451cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlinklibrary 452cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 453cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 454cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 455cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 456cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 457*52d905a6SJim Jagielski $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ 458cdf0e10cSrcweir $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \ 459cdf0e10cSrcweir $(gb_AR) -rsu\ 460cdf0e10cSrcweir $(1) \ 461cdf0e10cSrcweir @$${RESPONSEFILE}) 462cdf0e10cSrcweirendef 463cdf0e10cSrcweir 464cdf0e10cSrcweirdefine gb_LinkTarget__command 465cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 466e75d772dSDamjan Jovanovic$(if $(filter GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2))) 467dfce871fSDamjan Jovanovic$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinklibrary,$(1),$(2))) 468cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1))) 469cdf0e10cSrcweirendef 470cdf0e10cSrcweir 471cdf0e10cSrcweir 472cdf0e10cSrcweir# Library class 473cdf0e10cSrcweir 474b63233d8Sdamjangb_Library_DEFS := -D_DLL_ 475cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -shared 476cdf0e10cSrcweirgb_Library_get_rpath := 477cdf0e10cSrcweir 478cdf0e10cSrcweirgb_Library_SYSPRE := i 479cdf0e10cSrcweirgb_Library_PLAINEXT := .lib 480cdf0e10cSrcweir 481cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \ 482cdf0e10cSrcweir mingwthrd \ 483cdf0e10cSrcweir mingw32 \ 484cdf0e10cSrcweir mingwex \ 485cdf0e10cSrcweir $(gb_MINGW_LIBSTDCPP) \ 486cdf0e10cSrcweir $(gb_MINGW_LIBGCC) \ 487cdf0e10cSrcweir advapi32 \ 4886ecc4615Sdamjan comdlg32 \ 489b63233d8Sdamjan d3d9 \ 490b63233d8Sdamjan d3dx \ 491b63233d8Sdamjan ddraw \ 492cdf0e10cSrcweir gdi32 \ 4937d9c290fSMichael Stahl gdiplus \ 494df3f5cbcSdamjan glu32 \ 4957d9c290fSMichael Stahl gnu_getopt \ 4967d9c290fSMichael Stahl imm32\ 497cdf0e10cSrcweir kernel32 \ 4987d9c290fSMichael Stahl msimg32 \ 499cdf0e10cSrcweir msvcrt \ 500cdf0e10cSrcweir mpr \ 501cdf0e10cSrcweir moldname \ 502cdf0e10cSrcweir ole32 \ 503cdf0e10cSrcweir oleaut32 \ 504df3f5cbcSdamjan opengl32 \ 505cdf0e10cSrcweir shell32 \ 506b1d3b18cSdamjan shlwapi \ 5075a41b379Sdamjan strmiids \ 508cdf0e10cSrcweir user32 \ 509cdf0e10cSrcweir uuid \ 510cdf0e10cSrcweir uwinapi \ 511b63233d8Sdamjan winmm \ 51242aba0ceSdamjan winspool \ 513ad2376c3Sdamjan ws2_32 \ 51442aba0ceSdamjan wsock32 515cdf0e10cSrcweir 516cdf0e10cSrcweirgb_Library_LAYER := \ 517cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 518cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \ 519cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \ 520cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 521cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 522cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \ 523cdf0e10cSrcweir $(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \ 524cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \ 525cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 526cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \ 527cdf0e10cSrcweir 528cdf0e10cSrcweirgb_Library_FILENAMES :=\ 529cdf0e10cSrcweir $(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 530cdf0e10cSrcweir 531cdf0e10cSrcweirgb_Library_DLLEXT := .dll 532cdf0e10cSrcweirgb_Library_MAJORVER := 3 533cdf0e10cSrcweirgb_Library_RTEXT := gcc3$(gb_Library_DLLEXT) 534cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true)) 535cdf0e10cSrcweirgb_Library_STLEXT := port_gcc$(gb_Library_DLLEXT) 536cdf0e10cSrcweirelse 537cdf0e10cSrcweirgb_Library_STLEXT := port_gcc_stldebug$(gb_Library_DLLEXT) 538cdf0e10cSrcweirendif 5395f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_DLLEXT) 540cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_DLLEXT) 541cdf0e10cSrcweirgb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT) 542cdf0e10cSrcweirgb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT) 543cdf0e10cSrcweir 544cdf0e10cSrcweirgb_Library_DLLFILENAMES := \ 545cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \ 546cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 547cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 548cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 549cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \ 550cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \ 551cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 552cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 553cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \ 554cdf0e10cSrcweir 555cdf0e10cSrcweirgb_Library_IARCSYSPRE := lib 556cdf0e10cSrcweirgb_Library_IARCEXT := .a 557cdf0e10cSrcweir 558cdf0e10cSrcweirgb_Library_ILIBEXT := .lib 559cdf0e10cSrcweir 560cdf0e10cSrcweirdefine gb_Library_Library_platform 561cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3)) 562cdf0e10cSrcweir 563cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\ 564cdf0e10cSrcweir $(patsubst %.dll,%.map,$(3)) \ 565cdf0e10cSrcweir) 566cdf0e10cSrcweir 567cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \ 568cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3)) 569cdf0e10cSrcweir 570b63233d8Sdamjan$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3),$(1)) 571cdf0e10cSrcweir 572cdf0e10cSrcweirendef 573cdf0e10cSrcweir 574cdf0e10cSrcweirdefine gb_Library_add_default_nativeres 575cdf0e10cSrcweir$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) 576cdf0e10cSrcweir$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo) 577cdf0e10cSrcweir$(call gb_WinResTarget_set_defs,$(1)/$(2),\ 578cdf0e10cSrcweir $$(DEFS) \ 5797d9c290fSMichael Stahl -DADDITIONAL_VERINFO1= \ 5807d9c290fSMichael Stahl -DADDITIONAL_VERINFO2= \ 5817d9c290fSMichael Stahl -DADDITIONAL_VERINFO3= \ 582cdf0e10cSrcweir) 583cdf0e10cSrcweir$(call gb_Library_add_nativeres,$(1),$(2)) 584cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) 585cdf0e10cSrcweir 586cdf0e10cSrcweirendef 587cdf0e10cSrcweir 588cdf0e10cSrcweirdefine gb_Library_add_nativeres 589cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2)) 590cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2)) 591cdf0e10cSrcweir 592cdf0e10cSrcweirendef 593cdf0e10cSrcweir 594cdf0e10cSrcweirdefine gb_Library_get_dllname 595cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES))) 596cdf0e10cSrcweirendef 597cdf0e10cSrcweir 598cdf0e10cSrcweir 599cdf0e10cSrcweir# StaticLibrary class 600cdf0e10cSrcweir 601cdf0e10cSrcweirgb_StaticLibrary_DEFS := 602cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := lib 603cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .a 604cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 605cdf0e10cSrcweir 606cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \ 607cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 608cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 609cdf0e10cSrcweir 610cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES)) 611cdf0e10cSrcweir 612cdf0e10cSrcweirgb_StaticLibrary_StaticLibrary_platform = 613cdf0e10cSrcweir 614cdf0e10cSrcweir# Executable class 615cdf0e10cSrcweir 616cdf0e10cSrcweirgb_Executable_EXT := .exe 617cdf0e10cSrcweirgb_Executable_TARGETTYPEFLAGS := 618cdf0e10cSrcweirgb_Executable_get_rpath := 619cdf0e10cSrcweirgb_Executable_Executable_platform = 620b63233d8Sdamjangb_Executable_TARGETGUI := 621cdf0e10cSrcweir 622*52d905a6SJim Jagielskigb_InBuild_Library_Path := $(OUTDIR)/bin 623*52d905a6SJim Jagielskigb_Augment_Library_Path := PATH="$${PATH}:$(gb_InBuild_Library_Path)" 624*52d905a6SJim Jagielski 625e75d772dSDamjan Jovanovic# GoogleTest class 626e75d772dSDamjan Jovanovic 627e75d772dSDamjan Jovanovicgb_GoogleTest_GTESTPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 628e75d772dSDamjan Jovanovicgb_GoogleTest_get_filename = $(1)$(gb_Executable_EXT) 629e75d772dSDamjan Jovanovic 630e75d772dSDamjan Jovanovicdefine gb_GoogleTest_GoogleTest_platform 631e75d772dSDamjan Jovanovicendef 632cdf0e10cSrcweir 63364c5c8b7SDamjan Jovanovic# JunitTest class 63464c5c8b7SDamjan Jovanovic 63564c5c8b7SDamjan Jovanovicdefine gb_JunitTest_JunitTest_platform 63664c5c8b7SDamjan Jovanovic$(call gb_JunitTest_get_target,$(1)) : DEFS := \ 63764c5c8b7SDamjan Jovanovic -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(SRCDIR)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/OpenOffice 4/program/soffice.exe}" \ 63864c5c8b7SDamjan Jovanovic -Dorg.openoffice.test.arg.env=PATH \ 63964c5c8b7SDamjan Jovanovic -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \ 64064c5c8b7SDamjan Jovanovic 64164c5c8b7SDamjan Jovanovicendef 64264c5c8b7SDamjan Jovanovic 64364c5c8b7SDamjan Jovanovic 644d6a83b31SDamjan Jovanovic# Ant class 645d6a83b31SDamjan Jovanovic 646d6a83b31SDamjan Jovanovicdefine gb_Ant_add_dependencies 647d6a83b31SDamjan Jovanovic__ant_out:=$(shell $(gb_Ant_ANTCOMMAND) -Ddependencies.outfile=`cygpath -m $(WORKDIR)/Ant/$(1)/deps` -f `cygpath -m $(2)` dependencies) 648d6a83b31SDamjan Jovanovic$$(eval $(foreach dep,$(shell cat $(WORKDIR)/Ant/$(1)/deps),$$(call gb_Ant_add_dependency,$(call gb_Ant_get_target,$(1)),$(shell cygpath -u $(dep))))) 649d6a83b31SDamjan Jovanovic 650d6a83b31SDamjan Jovanovicendef 651d6a83b31SDamjan Jovanovic 652d6a83b31SDamjan Jovanovic 653cdf0e10cSrcweir# SdiTarget class 654cdf0e10cSrcweir 655cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 656cdf0e10cSrcweir 657cdf0e10cSrcweir# SrsPartMergeTarget 658cdf0e10cSrcweir 659cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 660cdf0e10cSrcweir 661cdf0e10cSrcweir# SrsPartTarget class 662cdf0e10cSrcweir 663cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe 664cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 665cdf0e10cSrcweir 666cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 667cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep 668cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 669cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 670cdf0e10cSrcweir $(INCLUDE) \ 671cdf0e10cSrcweir $(DEFS) \ 672cdf0e10cSrcweir $(2) \ 673cdf0e10cSrcweir -f - \ 674cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 675cdf0e10cSrcweir -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \ 676cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 677cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 678cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 679cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 680cdf0e10cSrcweir > $(call gb_SrsPartTarget_get_dep_target,$(1))) 681cdf0e10cSrcweirendef 682cdf0e10cSrcweirelse 683cdf0e10cSrcweirgb_SrsPartTarget__command_dep = 684cdf0e10cSrcweirendif 685cdf0e10cSrcweir 686cdf0e10cSrcweir# WinResTarget class 687cdf0e10cSrcweir 688cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=_res.o 689cdf0e10cSrcweir 690cdf0e10cSrcweirdefine gb_WinResTarget__command 691cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3) 692cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 693cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 694cdf0e10cSrcweir $(gb_RC) \ 695cdf0e10cSrcweir $(DEFS) $(FLAGS) \ 696cdf0e10cSrcweir -I$(dir $(3)) \ 697cdf0e10cSrcweir $(INCLUDE) \ 698cdf0e10cSrcweir -Fo$(patsubst %_res.o,%.res,$(1)) \ 699cdf0e10cSrcweir $(RCFILE) ) 7007d9c290fSMichael Stahl$(call gb_Helper_abbreviate_dirs_native,\ 7017d9c290fSMichael Stahl windres $(patsubst %_res.o,%.res,$(1)) $(1)) 702cdf0e10cSrcweir rm $(patsubst %_res.o,%.res,$(1)) 703cdf0e10cSrcweirendef 704cdf0e10cSrcweir 705cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\ 706cdf0e10cSrcweir WinResTarget \ 707cdf0e10cSrcweir)) 708cdf0e10cSrcweir 709cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 710cdf0e10cSrcweirdefine gb_WinResTarget__command_dep 711cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 712cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 713cdf0e10cSrcweir $(INCLUDE) \ 714cdf0e10cSrcweir $(DEFS) \ 715cdf0e10cSrcweir $(2) \ 716cdf0e10cSrcweir -f - \ 717cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 718cdf0e10cSrcweir -v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \ 719cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 720cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 721cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 722cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 723cdf0e10cSrcweir > $(call gb_WinResTarget_get_dep_target,$(1))) 724cdf0e10cSrcweirendef 725cdf0e10cSrcweirelse 726cdf0e10cSrcweirgb_WinResTarget__command_dep = 727cdf0e10cSrcweirendif 728cdf0e10cSrcweir 729cdf0e10cSrcweir# ComponentTarget 730cdf0e10cSrcweir 731cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 732cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \ 733910823aeSJürgen Schmidt OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \ 734cdf0e10cSrcweir URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 735b63233d8Sdamjan NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \ 736b63233d8Sdamjan 737b63233d8Sdamjan# UnoApiTarget 738b63233d8Sdamjan 739b63233d8Sdamjangb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe 740b63233d8Sdamjangb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET) 741b63233d8Sdamjangb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe 742b63233d8Sdamjangb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET) 743b63233d8Sdamjangb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe 744b63233d8Sdamjangb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET) 745b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe 746b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET) 747b63233d8Sdamjangb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe 748b63233d8Sdamjangb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET) 749cdf0e10cSrcweir 750cdf0e10cSrcweir# vim: set noet sw=4 ts=4: 751