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 75cdf0e10cSrcweirifeq ($(GXX_INCLUDE_PATH),) 76cdf0e10cSrcweirGXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion) 77cdf0e10cSrcweirendif 78cdf0e10cSrcweir 79cdf0e10cSrcweirgb_COMPILERDEFS := \ 80cdf0e10cSrcweir -DGCC \ 81cdf0e10cSrcweir -D$(CVER) \ 82cdf0e10cSrcweir -DCVER=$(CVER) \ 83cdf0e10cSrcweir -DGLIBC=2 \ 84cdf0e10cSrcweir -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \ 85cdf0e10cSrcweir -DCPPU_ENV=gcc3 \ 86cdf0e10cSrcweir -D_MT \ 87cdf0e10cSrcweir -D_NATIVE_WCHAR_T_DEFINED \ 88cdf0e10cSrcweir -D_MSC_EXTENSIONS \ 89cdf0e10cSrcweir -D_FORCENAMELESSUNION \ 90cdf0e10cSrcweir 91cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin-w64-mingw32) 92cdf0e10cSrcweirgb_COMPILERDEFS +=-D_declspec=__declspec 93cdf0e10cSrcweirendif 94cdf0e10cSrcweir 95cdf0e10cSrcweirgb_CPUDEFS := \ 96cdf0e10cSrcweir -DINTEL \ 97cdf0e10cSrcweir -D_M_IX86 \ 98cdf0e10cSrcweir 99cdf0e10cSrcweirgb_RCDEFS := \ 1007d9c290fSMichael Stahl -DWIN32 \ 1017d9c290fSMichael Stahl -D__GNUC__ \ 102cdf0e10cSrcweir 103cdf0e10cSrcweirgb_RCFLAGS := \ 104cdf0e10cSrcweir -V 105cdf0e10cSrcweir 106cdf0e10cSrcweirgb_CFLAGS := \ 107cdf0e10cSrcweir -Wall \ 108cdf0e10cSrcweir -Wendif-labels \ 109cdf0e10cSrcweir -Wextra \ 110cdf0e10cSrcweir -fmessage-length=0 \ 111cdf0e10cSrcweir -fno-strict-aliasing \ 112cdf0e10cSrcweir -pipe \ 113cdf0e10cSrcweir -nostdinc \ 114cdf0e10cSrcweir 115cdf0e10cSrcweirgb_CXXFLAGS := \ 116cdf0e10cSrcweir -Wall \ 117cdf0e10cSrcweir -Wendif-labels \ 118cdf0e10cSrcweir -Wextra \ 119cdf0e10cSrcweir -Wno-ctor-dtor-privacy \ 120cdf0e10cSrcweir -Wno-non-virtual-dtor \ 121cdf0e10cSrcweir -Wreturn-type \ 122cdf0e10cSrcweir -Wshadow \ 123cdf0e10cSrcweir -Wuninitialized \ 124cdf0e10cSrcweir -fmessage-length=0 \ 125cdf0e10cSrcweir -fno-strict-aliasing \ 126cdf0e10cSrcweir -fno-use-cxa-atexit \ 127cdf0e10cSrcweir -pipe \ 128cdf0e10cSrcweir -nostdinc \ 129cdf0e10cSrcweir 130cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) 131cdf0e10cSrcweirgb_CFLAGS_WERROR := -Werror 132cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -Werror 133cdf0e10cSrcweirendif 134cdf0e10cSrcweir 135cdf0e10cSrcweirifneq ($(SYSBASE),) 136cdf0e10cSrcweirgb_CXXFLAGS += --sysroot=$(SYSBASE) 137cdf0e10cSrcweirgb_CFLAGS += --sysroot=$(SYSBASE) 138cdf0e10cSrcweirendif 139cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \ 140cdf0e10cSrcweir -DEXCEPTIONS_ON \ 141cdf0e10cSrcweir -fexceptions \ 142cdf0e10cSrcweir -fno-enforce-eh-specs \ 143cdf0e10cSrcweir 144cdf0e10cSrcweirgb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) 145cdf0e10cSrcweir 146cdf0e10cSrcweir 147cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \ 148cdf0e10cSrcweir -DEXCEPTIONS_OFF \ 149cdf0e10cSrcweir -fno-exceptions \ 150828da808SPedro Giffuni 151cdf0e10cSrcweirgb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS) 152cdf0e10cSrcweir 153cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \ 154cdf0e10cSrcweir --export-all-symbols \ 155cdf0e10cSrcweir --kill-at \ 156cdf0e10cSrcweir --exclude-libs ALL \ 157cdf0e10cSrcweir --enable-stdcall-fixup \ 158cdf0e10cSrcweir --enable-runtime-pseudo-reloc-v2 \ 159cdf0e10cSrcweir -L$(gb_Library_DLLDIR) \ 160cdf0e10cSrcweir $(patsubst %,-L%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \ 161cdf0e10cSrcweir 162cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES) 163cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -shared-libgcc 164cdf0e10cSrcweirendif 165cdf0e10cSrcweir 166*b63233d8Sdamjangb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline 167*b63233d8Sdamjan 168cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2) 169cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -O0 170cdf0e10cSrcweirelse 171cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Os 172cdf0e10cSrcweirendif 173cdf0e10cSrcweir 174cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -O0 175cdf0e10cSrcweir 176cdf0e10cSrcweirgb_STDLIBS := \ 177cdf0e10cSrcweir mingwthrd \ 178cdf0e10cSrcweir $(gb_MINGW_LIBSTDCPP) \ 179cdf0e10cSrcweir mingw32 \ 180cdf0e10cSrcweir $(gb_MINGW_LIBGCC) \ 181cdf0e10cSrcweir uwinapi \ 182cdf0e10cSrcweir moldname \ 183cdf0e10cSrcweir mingwex \ 184cdf0e10cSrcweir kernel32 \ 185cdf0e10cSrcweir msvcrt \ 186cdf0e10cSrcweir 187cdf0e10cSrcweir 188cdf0e10cSrcweir# Helper class 189cdf0e10cSrcweir 190cdf0e10cSrcweirgb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 191cdf0e10cSrcweirgb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 192cdf0e10cSrcweirgb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 193cdf0e10cSrcweirgb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') 194cdf0e10cSrcweir 195cdf0e10cSrcweirdefine gb_Helper_abbreviate_dirs_native 196cdf0e10cSrcweirR=$(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))) && \ 197cdf0e10cSrcweir$(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))))))))) 198cdf0e10cSrcweirendef 199cdf0e10cSrcweir 200cdf0e10cSrcweir# convert parametters filesystem root to native notation 201cdf0e10cSrcweir# does some real work only on windows, make sure not to 202cdf0e10cSrcweir# break the dummy implementations on unx* 203cdf0e10cSrcweirdefine gb_Helper_convert_native 204cdf0e10cSrcweir$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \ 205cdf0e10cSrcweir$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \ 206cdf0e10cSrcweir$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \ 207cdf0e10cSrcweir$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \ 208cdf0e10cSrcweir$(1))))) 209cdf0e10cSrcweirendef 210cdf0e10cSrcweir 211*b63233d8Sdamjan# convert parametters filesystem root to native notation 212*b63233d8Sdamjan# does some real work only on windows, make sure not to 213*b63233d8Sdamjan# break the dummy implementations on unx* 214*b63233d8Sdamjandefine gb_Helper_convert_native 215*b63233d8Sdamjan$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \ 216*b63233d8Sdamjan$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \ 217*b63233d8Sdamjan$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \ 218*b63233d8Sdamjan$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \ 219*b63233d8Sdamjan$(1))))) 220*b63233d8Sdamjanendef 221*b63233d8Sdamjan 222cdf0e10cSrcweir# CObject class 223cdf0e10cSrcweir 224cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 225*b63233d8Sdamjandefine gb_Object__command_deponcompile 226cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 227cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 228cdf0e10cSrcweir $(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \ 229cdf0e10cSrcweir -I$(dir $(3)) \ 230cdf0e10cSrcweir $(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \ 231cdf0e10cSrcweir $(3) \ 232cdf0e10cSrcweir -f - \ 233cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 234cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 235cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 236cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 237cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 238cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 239*b63233d8Sdamjan > $(2)) 240cdf0e10cSrcweirendef 241cdf0e10cSrcweirelse 242*b63233d8Sdamjangb_Object__command_deponcompile = 243cdf0e10cSrcweirendif 244cdf0e10cSrcweir 245cdf0e10cSrcweirdefine gb_CObject__command 246cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C ,3) 247cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 248cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 249cdf0e10cSrcweir $(gb_CC) \ 250*b63233d8Sdamjan $(DEFS) \ 251*b63233d8Sdamjan $(T_CFLAGS) \ 252cdf0e10cSrcweir -c $(3) \ 253cdf0e10cSrcweir -o $(1) \ 254cdf0e10cSrcweir -I$(dir $(3)) \ 255cdf0e10cSrcweir $(INCLUDE)) 256*b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CFLAGS),$(INCLUDE)) 257cdf0e10cSrcweirendef 258cdf0e10cSrcweir 259cdf0e10cSrcweir 260cdf0e10cSrcweir 261cdf0e10cSrcweir# CxxObject class 262cdf0e10cSrcweir 263cdf0e10cSrcweirdefine gb_CxxObject__command 264cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3) 265cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 266cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 267cdf0e10cSrcweir $(gb_CXX) \ 268*b63233d8Sdamjan $(DEFS) \ 269*b63233d8Sdamjan $(T_CXXFLAGS) \ 270cdf0e10cSrcweir -c $(3) \ 271cdf0e10cSrcweir -o $(1) \ 272cdf0e10cSrcweir -I$(dir $(3)) \ 273cdf0e10cSrcweir $(INCLUDE_STL) $(INCLUDE)) 274*b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CXXFLAGS),$(INCLUDE_STL) $(INCLUDE)) 275cdf0e10cSrcweirendef 276cdf0e10cSrcweir 277cdf0e10cSrcweir 278cdf0e10cSrcweir# PrecompiledHeader class 279cdf0e10cSrcweir 280cdf0e10cSrcweirgb_PrecompiledHeader_EXT := .gch 281cdf0e10cSrcweir 282cdf0e10cSrcweirgb_PrecompiledHeader_get_enableflags = -I$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR) \ 283cdf0e10cSrcweir -DPRECOMPILED_HEADERS \ 284cdf0e10cSrcweir -Winvalid-pch \ 285cdf0e10cSrcweir 286cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 287cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile 288cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 289cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 290cdf0e10cSrcweir $(4) $(5) \ 291cdf0e10cSrcweir -I$(dir $(3)) \ 292cdf0e10cSrcweir $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \ 293cdf0e10cSrcweir $(3) \ 294cdf0e10cSrcweir -f - \ 295cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 296cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 297cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 298cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 299cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 300cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 301cdf0e10cSrcweir > $(call gb_PrecompiledHeader_get_dep_target,$(2))) 302cdf0e10cSrcweirendef 303cdf0e10cSrcweirelse 304cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile = 305cdf0e10cSrcweirendif 306cdf0e10cSrcweir 307cdf0e10cSrcweirdefine gb_PrecompiledHeader__command 308cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1) 309cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 310cdf0e10cSrcweir mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \ 311cdf0e10cSrcweir $(gb_CXX) \ 312cdf0e10cSrcweir -x c++-header \ 313cdf0e10cSrcweir $(4) $(5) \ 314cdf0e10cSrcweir -I$(dir $(3)) \ 315cdf0e10cSrcweir $(6) \ 316cdf0e10cSrcweir -c $(3) \ 317cdf0e10cSrcweir -o$(1)) 318cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 319cdf0e10cSrcweir 320cdf0e10cSrcweirendef 321cdf0e10cSrcweir 322cdf0e10cSrcweir# NoexPrecompiledHeader class 323cdf0e10cSrcweir 324cdf0e10cSrcweirgb_NoexPrecompiledHeader_EXT := .gch 325cdf0e10cSrcweir 326cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -I$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR) \ 327cdf0e10cSrcweir -Winvalid-pch \ 328cdf0e10cSrcweir 329cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 330cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile 331cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 332cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 333cdf0e10cSrcweir $(4) $(5) \ 334cdf0e10cSrcweir -I$(dir $(3)) \ 335cdf0e10cSrcweir $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \ 336cdf0e10cSrcweir $(3) \ 337cdf0e10cSrcweir -f - \ 338cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 339cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 340cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 341cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 342cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 343cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 344cdf0e10cSrcweir > $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) 345cdf0e10cSrcweirendef 346cdf0e10cSrcweirelse 347cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile = 348cdf0e10cSrcweirendif 349cdf0e10cSrcweir 350cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command 351cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1) 352cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 353cdf0e10cSrcweir mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \ 354cdf0e10cSrcweir $(gb_CXX) \ 355cdf0e10cSrcweir -x c++-header \ 356cdf0e10cSrcweir $(4) $(5) \ 357cdf0e10cSrcweir -I$(dir $(3)) \ 358cdf0e10cSrcweir $(6) \ 359cdf0e10cSrcweir -c $(3) \ 360cdf0e10cSrcweir -o$(1)) 361cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 362cdf0e10cSrcweir 363cdf0e10cSrcweirendef 364cdf0e10cSrcweir 365cdf0e10cSrcweir 366cdf0e10cSrcweir# LinkTarget class 367cdf0e10cSrcweir 368*b63233d8Sdamjangb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) 369cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) 370cdf0e10cSrcweir 371cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\ 372cdf0e10cSrcweir $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \ 373cdf0e10cSrcweir $(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \ 374cdf0e10cSrcweir 375cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 376cdf0e10cSrcweir 377cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinkexecutable 378cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 379cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 380cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 381cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 382cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 383cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 3847d9c290fSMichael Stahl $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 3857d9c290fSMichael Stahl $(NATIVERES) " > $${RESPONSEFILE} && \ 386cdf0e10cSrcweir $(gb_LINK) \ 387cdf0e10cSrcweir $(gb_Executable_TARGETTYPEFLAGS) \ 388*b63233d8Sdamjan $(if $(filter YES,$(gb_Executable_TARGETGUI)), --subsystem windows, --subsystem console) \ 389*b63233d8Sdamjan $(T_LDFLAGS) \ 390cdf0e10cSrcweir $(gb_MINGWLIBDIR)/crt2.o \ 391cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtbegin.o \ 392cdf0e10cSrcweir @$${RESPONSEFILE} \ 393cdf0e10cSrcweir --start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \ 394cdf0e10cSrcweir --start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \ 39544c25570SAndre Fischer --start-group $(patsubst %,-l%,$(EXTERNAL_LIBS)) --end-group \ 396*b63233d8Sdamjan $(LIBS) \ 397cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtend.o \ 398cdf0e10cSrcweir -Map $(basename $(1)).map \ 399cdf0e10cSrcweir -o $(1)) 400cdf0e10cSrcweirendef 401cdf0e10cSrcweir 402cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinklibrary 403cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 404cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 405cdf0e10cSrcweir rm -f $(1) && \ 406cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 407cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 408cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 4097d9c290fSMichael Stahl $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 4107d9c290fSMichael Stahl $(NATIVERES) " > $${RESPONSEFILE} && \ 411cdf0e10cSrcweir $(gb_LINK) \ 412cdf0e10cSrcweir $(gb_Library_TARGETTYPEFLAGS) \ 413*b63233d8Sdamjan $(T_LDFLAGS) \ 414cdf0e10cSrcweir --enable-auto-image-base \ 415cdf0e10cSrcweir -e _DllMainCRTStartup@12 \ 416cdf0e10cSrcweir $(gb_MINGWLIBDIR)/dllcrt2.o \ 417cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtbegin.o \ 418cdf0e10cSrcweir @$${RESPONSEFILE} \ 419cdf0e10cSrcweir --start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \ 420cdf0e10cSrcweir --start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \ 421*b63233d8Sdamjan $(LIBS) \ 422cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtend.o \ 423cdf0e10cSrcweir -Map $(basename $(DLLTARGET)).map \ 424cdf0e10cSrcweir -o $(DLLTARGET) && touch $(1)) 425cdf0e10cSrcweirendef 426cdf0e10cSrcweir 427cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlinklibrary 428cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 429cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 430cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 431cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 432cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 433cdf0e10cSrcweir $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \ 434cdf0e10cSrcweir $(gb_AR) -rsu\ 435cdf0e10cSrcweir $(1) \ 436cdf0e10cSrcweir @$${RESPONSEFILE}) 437cdf0e10cSrcweirendef 438cdf0e10cSrcweir 439cdf0e10cSrcweirdefine gb_LinkTarget__command 440cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 441e75d772dSDamjan Jovanovic$(if $(filter GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2))) 442dfce871fSDamjan Jovanovic$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinklibrary,$(1),$(2))) 443cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1))) 444cdf0e10cSrcweirendef 445cdf0e10cSrcweir 446cdf0e10cSrcweir 447cdf0e10cSrcweir# Library class 448cdf0e10cSrcweir 449*b63233d8Sdamjangb_Library_DEFS := -D_DLL_ 450cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -shared 451cdf0e10cSrcweirgb_Library_get_rpath := 452cdf0e10cSrcweir 453cdf0e10cSrcweirgb_Library_SYSPRE := i 454cdf0e10cSrcweirgb_Library_PLAINEXT := .lib 455cdf0e10cSrcweir 456cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \ 457cdf0e10cSrcweir mingwthrd \ 458cdf0e10cSrcweir mingw32 \ 459cdf0e10cSrcweir mingwex \ 460cdf0e10cSrcweir $(gb_MINGW_LIBSTDCPP) \ 461cdf0e10cSrcweir $(gb_MINGW_LIBGCC) \ 462cdf0e10cSrcweir advapi32 \ 463*b63233d8Sdamjan d3d9 \ 464*b63233d8Sdamjan d3dx \ 465*b63233d8Sdamjan ddraw \ 466cdf0e10cSrcweir gdi32 \ 4677d9c290fSMichael Stahl gdiplus \ 4687d9c290fSMichael Stahl gnu_getopt \ 4697d9c290fSMichael Stahl imm32\ 470cdf0e10cSrcweir kernel32 \ 4717d9c290fSMichael Stahl msimg32 \ 472cdf0e10cSrcweir msvcrt \ 473cdf0e10cSrcweir mpr \ 474cdf0e10cSrcweir moldname \ 475cdf0e10cSrcweir ole32 \ 476cdf0e10cSrcweir oleaut32 \ 477cdf0e10cSrcweir shell32 \ 478cdf0e10cSrcweir user32 \ 479cdf0e10cSrcweir uuid \ 480cdf0e10cSrcweir uwinapi \ 481*b63233d8Sdamjan winmm \ 482*b63233d8Sdamjan winspool 483cdf0e10cSrcweir 484cdf0e10cSrcweirgb_Library_LAYER := \ 485cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 486cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \ 487cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \ 488cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 489cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 490cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \ 491cdf0e10cSrcweir $(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \ 492cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \ 493cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 494cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \ 495cdf0e10cSrcweir 496cdf0e10cSrcweirgb_Library_FILENAMES :=\ 497cdf0e10cSrcweir $(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 498cdf0e10cSrcweir 499cdf0e10cSrcweirgb_Library_DLLEXT := .dll 500cdf0e10cSrcweirgb_Library_MAJORVER := 3 501cdf0e10cSrcweirgb_Library_RTEXT := gcc3$(gb_Library_DLLEXT) 502cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true)) 503cdf0e10cSrcweirgb_Library_STLEXT := port_gcc$(gb_Library_DLLEXT) 504cdf0e10cSrcweirelse 505cdf0e10cSrcweirgb_Library_STLEXT := port_gcc_stldebug$(gb_Library_DLLEXT) 506cdf0e10cSrcweirendif 5075f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_DLLEXT) 508cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_DLLEXT) 509cdf0e10cSrcweirgb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT) 510cdf0e10cSrcweirgb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT) 511cdf0e10cSrcweir 512cdf0e10cSrcweirgb_Library_DLLFILENAMES := \ 513cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \ 514cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 515cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 516cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 517cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \ 518cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \ 519cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 520cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 521cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \ 522cdf0e10cSrcweir 523cdf0e10cSrcweirgb_Library_IARCSYSPRE := lib 524cdf0e10cSrcweirgb_Library_IARCEXT := .a 525cdf0e10cSrcweir 526cdf0e10cSrcweirgb_Library_ILIBEXT := .lib 527cdf0e10cSrcweir 528cdf0e10cSrcweirdefine gb_Library_Library_platform 529cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3)) 530cdf0e10cSrcweir 531cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\ 532cdf0e10cSrcweir $(patsubst %.dll,%.map,$(3)) \ 533cdf0e10cSrcweir) 534cdf0e10cSrcweir 535cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \ 536cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3)) 537cdf0e10cSrcweir 538*b63233d8Sdamjan$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3),$(1)) 539cdf0e10cSrcweir 540cdf0e10cSrcweirendef 541cdf0e10cSrcweir 542cdf0e10cSrcweirdefine gb_Library_add_default_nativeres 543cdf0e10cSrcweir$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) 544cdf0e10cSrcweir$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo) 545cdf0e10cSrcweir$(call gb_WinResTarget_set_defs,$(1)/$(2),\ 546cdf0e10cSrcweir $$(DEFS) \ 5477d9c290fSMichael Stahl -DADDITIONAL_VERINFO1= \ 5487d9c290fSMichael Stahl -DADDITIONAL_VERINFO2= \ 5497d9c290fSMichael Stahl -DADDITIONAL_VERINFO3= \ 550cdf0e10cSrcweir) 551cdf0e10cSrcweir$(call gb_Library_add_nativeres,$(1),$(2)) 552cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) 553cdf0e10cSrcweir 554cdf0e10cSrcweirendef 555cdf0e10cSrcweir 556cdf0e10cSrcweirdefine gb_Library_add_nativeres 557cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2)) 558cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2)) 559cdf0e10cSrcweir 560cdf0e10cSrcweirendef 561cdf0e10cSrcweir 562cdf0e10cSrcweirdefine gb_Library_get_dllname 563cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES))) 564cdf0e10cSrcweirendef 565cdf0e10cSrcweir 566cdf0e10cSrcweir 567cdf0e10cSrcweir# StaticLibrary class 568cdf0e10cSrcweir 569cdf0e10cSrcweirgb_StaticLibrary_DEFS := 570cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := lib 571cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .a 572cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 573cdf0e10cSrcweir 574cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \ 575cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 576cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 577cdf0e10cSrcweir 578cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES)) 579cdf0e10cSrcweir 580cdf0e10cSrcweirgb_StaticLibrary_StaticLibrary_platform = 581cdf0e10cSrcweir 582cdf0e10cSrcweir# Executable class 583cdf0e10cSrcweir 584cdf0e10cSrcweirgb_Executable_EXT := .exe 585cdf0e10cSrcweirgb_Executable_TARGETTYPEFLAGS := 586cdf0e10cSrcweirgb_Executable_get_rpath := 587cdf0e10cSrcweirgb_Executable_Executable_platform = 588*b63233d8Sdamjangb_Executable_TARGETGUI := 589cdf0e10cSrcweir 590e75d772dSDamjan Jovanovic# GoogleTest class 591e75d772dSDamjan Jovanovic 592e75d772dSDamjan Jovanovicgb_GoogleTest_GTESTPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 593e75d772dSDamjan Jovanovicgb_GoogleTest_get_filename = $(1)$(gb_Executable_EXT) 594e75d772dSDamjan Jovanovic 595e75d772dSDamjan Jovanovicdefine gb_GoogleTest_GoogleTest_platform 596e75d772dSDamjan Jovanovicendef 597cdf0e10cSrcweir 598cdf0e10cSrcweir# SdiTarget class 599cdf0e10cSrcweir 600cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 601cdf0e10cSrcweir 602cdf0e10cSrcweir# SrsPartMergeTarget 603cdf0e10cSrcweir 604cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 605cdf0e10cSrcweir 606cdf0e10cSrcweir# SrsPartTarget class 607cdf0e10cSrcweir 608cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe 609cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 610cdf0e10cSrcweir 611cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 612cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep 613cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 614cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 615cdf0e10cSrcweir $(INCLUDE) \ 616cdf0e10cSrcweir $(DEFS) \ 617cdf0e10cSrcweir $(2) \ 618cdf0e10cSrcweir -f - \ 619cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 620cdf0e10cSrcweir -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \ 621cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 622cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 623cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 624cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 625cdf0e10cSrcweir > $(call gb_SrsPartTarget_get_dep_target,$(1))) 626cdf0e10cSrcweirendef 627cdf0e10cSrcweirelse 628cdf0e10cSrcweirgb_SrsPartTarget__command_dep = 629cdf0e10cSrcweirendif 630cdf0e10cSrcweir 631cdf0e10cSrcweir# WinResTarget class 632cdf0e10cSrcweir 633cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=_res.o 634cdf0e10cSrcweir 635cdf0e10cSrcweirdefine gb_WinResTarget__command 636cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3) 637cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 638cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 639cdf0e10cSrcweir $(gb_RC) \ 640cdf0e10cSrcweir $(DEFS) $(FLAGS) \ 641cdf0e10cSrcweir -I$(dir $(3)) \ 642cdf0e10cSrcweir $(INCLUDE) \ 643cdf0e10cSrcweir -Fo$(patsubst %_res.o,%.res,$(1)) \ 644cdf0e10cSrcweir $(RCFILE) ) 6457d9c290fSMichael Stahl$(call gb_Helper_abbreviate_dirs_native,\ 6467d9c290fSMichael Stahl windres $(patsubst %_res.o,%.res,$(1)) $(1)) 647cdf0e10cSrcweir rm $(patsubst %_res.o,%.res,$(1)) 648cdf0e10cSrcweirendef 649cdf0e10cSrcweir 650cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\ 651cdf0e10cSrcweir WinResTarget \ 652cdf0e10cSrcweir)) 653cdf0e10cSrcweir 654cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 655cdf0e10cSrcweirdefine gb_WinResTarget__command_dep 656cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 657cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 658cdf0e10cSrcweir $(INCLUDE) \ 659cdf0e10cSrcweir $(DEFS) \ 660cdf0e10cSrcweir $(2) \ 661cdf0e10cSrcweir -f - \ 662cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 663cdf0e10cSrcweir -v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \ 664cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 665cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 666cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 667cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 668cdf0e10cSrcweir > $(call gb_WinResTarget_get_dep_target,$(1))) 669cdf0e10cSrcweirendef 670cdf0e10cSrcweirelse 671cdf0e10cSrcweirgb_WinResTarget__command_dep = 672cdf0e10cSrcweirendif 673cdf0e10cSrcweir 674cdf0e10cSrcweir# ComponentTarget 675cdf0e10cSrcweir 676cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 677cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \ 678910823aeSJürgen Schmidt OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \ 679cdf0e10cSrcweir URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 680*b63233d8Sdamjan NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \ 681*b63233d8Sdamjan 682*b63233d8Sdamjan# UnoApiTarget 683*b63233d8Sdamjan 684*b63233d8Sdamjangb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe 685*b63233d8Sdamjangb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET) 686*b63233d8Sdamjangb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe 687*b63233d8Sdamjangb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET) 688*b63233d8Sdamjangb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe 689*b63233d8Sdamjangb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET) 690*b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe 691*b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET) 692*b63233d8Sdamjangb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe 693*b63233d8Sdamjangb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET) 694cdf0e10cSrcweir 695cdf0e10cSrcweir# vim: set noet sw=4 ts=4: 696