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 166b63233d8Sdamjangb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline 167b63233d8Sdamjan 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 211b63233d8Sdamjan# convert parametters filesystem root to native notation 212b63233d8Sdamjan# does some real work only on windows, make sure not to 213b63233d8Sdamjan# break the dummy implementations on unx* 214b63233d8Sdamjandefine gb_Helper_convert_native 215b63233d8Sdamjan$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \ 216b63233d8Sdamjan$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \ 217b63233d8Sdamjan$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \ 218b63233d8Sdamjan$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \ 219b63233d8Sdamjan$(1))))) 220b63233d8Sdamjanendef 221b63233d8Sdamjan 222cdf0e10cSrcweir# CObject class 223cdf0e10cSrcweir 224cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 225b63233d8Sdamjandefine 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)/ \ 239b63233d8Sdamjan > $(2)) 240cdf0e10cSrcweirendef 241cdf0e10cSrcweirelse 242b63233d8Sdamjangb_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) \ 250b63233d8Sdamjan $(DEFS) \ 251b63233d8Sdamjan $(T_CFLAGS) \ 252cdf0e10cSrcweir -c $(3) \ 253cdf0e10cSrcweir -o $(1) \ 254cdf0e10cSrcweir -I$(dir $(3)) \ 255cdf0e10cSrcweir $(INCLUDE)) 256b63233d8Sdamjan$(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) \ 268b63233d8Sdamjan $(DEFS) \ 269b63233d8Sdamjan $(T_CXXFLAGS) \ 270cdf0e10cSrcweir -c $(3) \ 271cdf0e10cSrcweir -o $(1) \ 272cdf0e10cSrcweir -I$(dir $(3)) \ 273cdf0e10cSrcweir $(INCLUDE_STL) $(INCLUDE)) 274b63233d8Sdamjan$(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)) \ 315e6091915Struckman -DPRECOMPILED_HEADERS \ 316cdf0e10cSrcweir $(6) \ 317cdf0e10cSrcweir -c $(3) \ 318cdf0e10cSrcweir -o$(1)) 319cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 320cdf0e10cSrcweir 321cdf0e10cSrcweirendef 322cdf0e10cSrcweir 323cdf0e10cSrcweir# NoexPrecompiledHeader class 324cdf0e10cSrcweir 325cdf0e10cSrcweirgb_NoexPrecompiledHeader_EXT := .gch 326cdf0e10cSrcweir 327cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -I$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR) \ 328cdf0e10cSrcweir -Winvalid-pch \ 329cdf0e10cSrcweir 330cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 331cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile 332cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 333cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 334cdf0e10cSrcweir $(4) $(5) \ 335cdf0e10cSrcweir -I$(dir $(3)) \ 336cdf0e10cSrcweir $(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \ 337cdf0e10cSrcweir $(3) \ 338cdf0e10cSrcweir -f - \ 339cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 340cdf0e10cSrcweir -v OBJECTFILE=$(1) \ 341cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 342cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 343cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 344cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 345cdf0e10cSrcweir > $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) 346cdf0e10cSrcweirendef 347cdf0e10cSrcweirelse 348cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile = 349cdf0e10cSrcweirendif 350cdf0e10cSrcweir 351cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command 352cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1) 353cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 354cdf0e10cSrcweir mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \ 355cdf0e10cSrcweir $(gb_CXX) \ 356cdf0e10cSrcweir -x c++-header \ 357cdf0e10cSrcweir $(4) $(5) \ 358cdf0e10cSrcweir -I$(dir $(3)) \ 359e6091915Struckman -DPRECOMPILED_HEADERS \ 360cdf0e10cSrcweir $(6) \ 361cdf0e10cSrcweir -c $(3) \ 362cdf0e10cSrcweir -o$(1)) 363cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6)) 364cdf0e10cSrcweir 365cdf0e10cSrcweirendef 366cdf0e10cSrcweir 367cdf0e10cSrcweir 368cdf0e10cSrcweir# LinkTarget class 369cdf0e10cSrcweir 370b63233d8Sdamjangb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) 371cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) 372cdf0e10cSrcweir 373cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\ 374cdf0e10cSrcweir $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \ 375cdf0e10cSrcweir $(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \ 376cdf0e10cSrcweir 377cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 378cdf0e10cSrcweir 379cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinkexecutable 380cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 381cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 382cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 383cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 384cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 385cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 3867d9c290fSMichael Stahl $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 3877d9c290fSMichael Stahl $(NATIVERES) " > $${RESPONSEFILE} && \ 388cdf0e10cSrcweir $(gb_LINK) \ 389cdf0e10cSrcweir $(gb_Executable_TARGETTYPEFLAGS) \ 390b63233d8Sdamjan $(if $(filter YES,$(gb_Executable_TARGETGUI)), --subsystem windows, --subsystem console) \ 391b63233d8Sdamjan $(T_LDFLAGS) \ 392cdf0e10cSrcweir $(gb_MINGWLIBDIR)/crt2.o \ 393cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtbegin.o \ 394cdf0e10cSrcweir @$${RESPONSEFILE} \ 395cdf0e10cSrcweir --start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \ 396cdf0e10cSrcweir --start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \ 39744c25570SAndre Fischer --start-group $(patsubst %,-l%,$(EXTERNAL_LIBS)) --end-group \ 398b63233d8Sdamjan $(LIBS) \ 399cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtend.o \ 400cdf0e10cSrcweir -Map $(basename $(1)).map \ 401cdf0e10cSrcweir -o $(1)) 402cdf0e10cSrcweirendef 403cdf0e10cSrcweir 404cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinklibrary 405cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 406cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 407cdf0e10cSrcweir rm -f $(1) && \ 408cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 409cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 410cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 4117d9c290fSMichael Stahl $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 4127d9c290fSMichael Stahl $(NATIVERES) " > $${RESPONSEFILE} && \ 413cdf0e10cSrcweir $(gb_LINK) \ 414cdf0e10cSrcweir $(gb_Library_TARGETTYPEFLAGS) \ 415b63233d8Sdamjan $(T_LDFLAGS) \ 416cdf0e10cSrcweir --enable-auto-image-base \ 417cdf0e10cSrcweir -e _DllMainCRTStartup@12 \ 418cdf0e10cSrcweir $(gb_MINGWLIBDIR)/dllcrt2.o \ 419cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtbegin.o \ 420cdf0e10cSrcweir @$${RESPONSEFILE} \ 421cdf0e10cSrcweir --start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \ 422cdf0e10cSrcweir --start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \ 423b63233d8Sdamjan $(LIBS) \ 424cdf0e10cSrcweir $(MINGW_CLIB_DIR)/crtend.o \ 425cdf0e10cSrcweir -Map $(basename $(DLLTARGET)).map \ 426cdf0e10cSrcweir -o $(DLLTARGET) && touch $(1)) 427cdf0e10cSrcweirendef 428cdf0e10cSrcweir 429cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlinklibrary 430cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 431cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 432cdf0e10cSrcweir RESPONSEFILE=`$(gb_MKTEMP)` && \ 433cdf0e10cSrcweir echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 434cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 435cdf0e10cSrcweir $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \ 436cdf0e10cSrcweir $(gb_AR) -rsu\ 437cdf0e10cSrcweir $(1) \ 438cdf0e10cSrcweir @$${RESPONSEFILE}) 439cdf0e10cSrcweirendef 440cdf0e10cSrcweir 441cdf0e10cSrcweirdefine gb_LinkTarget__command 442cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 443e75d772dSDamjan Jovanovic$(if $(filter GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2))) 444dfce871fSDamjan Jovanovic$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinklibrary,$(1),$(2))) 445cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1))) 446cdf0e10cSrcweirendef 447cdf0e10cSrcweir 448cdf0e10cSrcweir 449cdf0e10cSrcweir# Library class 450cdf0e10cSrcweir 451b63233d8Sdamjangb_Library_DEFS := -D_DLL_ 452cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -shared 453cdf0e10cSrcweirgb_Library_get_rpath := 454cdf0e10cSrcweir 455cdf0e10cSrcweirgb_Library_SYSPRE := i 456cdf0e10cSrcweirgb_Library_PLAINEXT := .lib 457cdf0e10cSrcweir 458cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \ 459cdf0e10cSrcweir mingwthrd \ 460cdf0e10cSrcweir mingw32 \ 461cdf0e10cSrcweir mingwex \ 462cdf0e10cSrcweir $(gb_MINGW_LIBSTDCPP) \ 463cdf0e10cSrcweir $(gb_MINGW_LIBGCC) \ 464cdf0e10cSrcweir advapi32 \ 4656ecc4615Sdamjan comdlg32 \ 466b63233d8Sdamjan d3d9 \ 467b63233d8Sdamjan d3dx \ 468b63233d8Sdamjan ddraw \ 469cdf0e10cSrcweir gdi32 \ 4707d9c290fSMichael Stahl gdiplus \ 471df3f5cbcSdamjan glu32 \ 4727d9c290fSMichael Stahl gnu_getopt \ 4737d9c290fSMichael Stahl imm32\ 474cdf0e10cSrcweir kernel32 \ 4757d9c290fSMichael Stahl msimg32 \ 476cdf0e10cSrcweir msvcrt \ 477cdf0e10cSrcweir mpr \ 478cdf0e10cSrcweir moldname \ 479cdf0e10cSrcweir ole32 \ 480cdf0e10cSrcweir oleaut32 \ 481df3f5cbcSdamjan opengl32 \ 482cdf0e10cSrcweir shell32 \ 4835a41b379Sdamjan strmiids \ 484cdf0e10cSrcweir user32 \ 485cdf0e10cSrcweir uuid \ 486cdf0e10cSrcweir uwinapi \ 487b63233d8Sdamjan winmm \ 48842aba0ceSdamjan winspool \ 489*ad2376c3Sdamjan ws2_32 \ 49042aba0ceSdamjan wsock32 491cdf0e10cSrcweir 492cdf0e10cSrcweirgb_Library_LAYER := \ 493cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 494cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \ 495cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \ 496cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 497cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 498cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \ 499cdf0e10cSrcweir $(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \ 500cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \ 501cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 502cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \ 503cdf0e10cSrcweir 504cdf0e10cSrcweirgb_Library_FILENAMES :=\ 505cdf0e10cSrcweir $(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 506cdf0e10cSrcweir 507cdf0e10cSrcweirgb_Library_DLLEXT := .dll 508cdf0e10cSrcweirgb_Library_MAJORVER := 3 509cdf0e10cSrcweirgb_Library_RTEXT := gcc3$(gb_Library_DLLEXT) 510cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true)) 511cdf0e10cSrcweirgb_Library_STLEXT := port_gcc$(gb_Library_DLLEXT) 512cdf0e10cSrcweirelse 513cdf0e10cSrcweirgb_Library_STLEXT := port_gcc_stldebug$(gb_Library_DLLEXT) 514cdf0e10cSrcweirendif 5155f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_DLLEXT) 516cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_DLLEXT) 517cdf0e10cSrcweirgb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT) 518cdf0e10cSrcweirgb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT) 519cdf0e10cSrcweir 520cdf0e10cSrcweirgb_Library_DLLFILENAMES := \ 521cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \ 522cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 523cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 524cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \ 525cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \ 526cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \ 527cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 528cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 529cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \ 530cdf0e10cSrcweir 531cdf0e10cSrcweirgb_Library_IARCSYSPRE := lib 532cdf0e10cSrcweirgb_Library_IARCEXT := .a 533cdf0e10cSrcweir 534cdf0e10cSrcweirgb_Library_ILIBEXT := .lib 535cdf0e10cSrcweir 536cdf0e10cSrcweirdefine gb_Library_Library_platform 537cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3)) 538cdf0e10cSrcweir 539cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\ 540cdf0e10cSrcweir $(patsubst %.dll,%.map,$(3)) \ 541cdf0e10cSrcweir) 542cdf0e10cSrcweir 543cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \ 544cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3)) 545cdf0e10cSrcweir 546b63233d8Sdamjan$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3),$(1)) 547cdf0e10cSrcweir 548cdf0e10cSrcweirendef 549cdf0e10cSrcweir 550cdf0e10cSrcweirdefine gb_Library_add_default_nativeres 551cdf0e10cSrcweir$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2)) 552cdf0e10cSrcweir$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo) 553cdf0e10cSrcweir$(call gb_WinResTarget_set_defs,$(1)/$(2),\ 554cdf0e10cSrcweir $$(DEFS) \ 5557d9c290fSMichael Stahl -DADDITIONAL_VERINFO1= \ 5567d9c290fSMichael Stahl -DADDITIONAL_VERINFO2= \ 5577d9c290fSMichael Stahl -DADDITIONAL_VERINFO3= \ 558cdf0e10cSrcweir) 559cdf0e10cSrcweir$(call gb_Library_add_nativeres,$(1),$(2)) 560cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2)) 561cdf0e10cSrcweir 562cdf0e10cSrcweirendef 563cdf0e10cSrcweir 564cdf0e10cSrcweirdefine gb_Library_add_nativeres 565cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2)) 566cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2)) 567cdf0e10cSrcweir 568cdf0e10cSrcweirendef 569cdf0e10cSrcweir 570cdf0e10cSrcweirdefine gb_Library_get_dllname 571cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES))) 572cdf0e10cSrcweirendef 573cdf0e10cSrcweir 574cdf0e10cSrcweir 575cdf0e10cSrcweir# StaticLibrary class 576cdf0e10cSrcweir 577cdf0e10cSrcweirgb_StaticLibrary_DEFS := 578cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := lib 579cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .a 580cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 581cdf0e10cSrcweir 582cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \ 583cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 584cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 585cdf0e10cSrcweir 586cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES)) 587cdf0e10cSrcweir 588cdf0e10cSrcweirgb_StaticLibrary_StaticLibrary_platform = 589cdf0e10cSrcweir 590cdf0e10cSrcweir# Executable class 591cdf0e10cSrcweir 592cdf0e10cSrcweirgb_Executable_EXT := .exe 593cdf0e10cSrcweirgb_Executable_TARGETTYPEFLAGS := 594cdf0e10cSrcweirgb_Executable_get_rpath := 595cdf0e10cSrcweirgb_Executable_Executable_platform = 596b63233d8Sdamjangb_Executable_TARGETGUI := 597cdf0e10cSrcweir 598e75d772dSDamjan Jovanovic# GoogleTest class 599e75d772dSDamjan Jovanovic 600e75d772dSDamjan Jovanovicgb_GoogleTest_GTESTPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 601e75d772dSDamjan Jovanovicgb_GoogleTest_get_filename = $(1)$(gb_Executable_EXT) 602e75d772dSDamjan Jovanovic 603e75d772dSDamjan Jovanovicdefine gb_GoogleTest_GoogleTest_platform 604e75d772dSDamjan Jovanovicendef 605cdf0e10cSrcweir 606cdf0e10cSrcweir# SdiTarget class 607cdf0e10cSrcweir 608cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 609cdf0e10cSrcweir 610cdf0e10cSrcweir# SrsPartMergeTarget 611cdf0e10cSrcweir 612cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 613cdf0e10cSrcweir 614cdf0e10cSrcweir# SrsPartTarget class 615cdf0e10cSrcweir 616cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe 617cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 618cdf0e10cSrcweir 619cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 620cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep 621cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 622cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 623cdf0e10cSrcweir $(INCLUDE) \ 624cdf0e10cSrcweir $(DEFS) \ 625cdf0e10cSrcweir $(2) \ 626cdf0e10cSrcweir -f - \ 627cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 628cdf0e10cSrcweir -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \ 629cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 630cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 631cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 632cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 633cdf0e10cSrcweir > $(call gb_SrsPartTarget_get_dep_target,$(1))) 634cdf0e10cSrcweirendef 635cdf0e10cSrcweirelse 636cdf0e10cSrcweirgb_SrsPartTarget__command_dep = 637cdf0e10cSrcweirendif 638cdf0e10cSrcweir 639cdf0e10cSrcweir# WinResTarget class 640cdf0e10cSrcweir 641cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=_res.o 642cdf0e10cSrcweir 643cdf0e10cSrcweirdefine gb_WinResTarget__command 644cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3) 645cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 646cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 647cdf0e10cSrcweir $(gb_RC) \ 648cdf0e10cSrcweir $(DEFS) $(FLAGS) \ 649cdf0e10cSrcweir -I$(dir $(3)) \ 650cdf0e10cSrcweir $(INCLUDE) \ 651cdf0e10cSrcweir -Fo$(patsubst %_res.o,%.res,$(1)) \ 652cdf0e10cSrcweir $(RCFILE) ) 6537d9c290fSMichael Stahl$(call gb_Helper_abbreviate_dirs_native,\ 6547d9c290fSMichael Stahl windres $(patsubst %_res.o,%.res,$(1)) $(1)) 655cdf0e10cSrcweir rm $(patsubst %_res.o,%.res,$(1)) 656cdf0e10cSrcweirendef 657cdf0e10cSrcweir 658cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\ 659cdf0e10cSrcweir WinResTarget \ 660cdf0e10cSrcweir)) 661cdf0e10cSrcweir 662cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true)) 663cdf0e10cSrcweirdefine gb_WinResTarget__command_dep 664cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 665cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 666cdf0e10cSrcweir $(INCLUDE) \ 667cdf0e10cSrcweir $(DEFS) \ 668cdf0e10cSrcweir $(2) \ 669cdf0e10cSrcweir -f - \ 670cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 671cdf0e10cSrcweir -v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \ 672cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 673cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 674cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 675cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 676cdf0e10cSrcweir > $(call gb_WinResTarget_get_dep_target,$(1))) 677cdf0e10cSrcweirendef 678cdf0e10cSrcweirelse 679cdf0e10cSrcweirgb_WinResTarget__command_dep = 680cdf0e10cSrcweirendif 681cdf0e10cSrcweir 682cdf0e10cSrcweir# ComponentTarget 683cdf0e10cSrcweir 684cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" 685cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \ 686910823aeSJürgen Schmidt OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \ 687cdf0e10cSrcweir URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 688b63233d8Sdamjan NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \ 689b63233d8Sdamjan 690b63233d8Sdamjan# UnoApiTarget 691b63233d8Sdamjan 692b63233d8Sdamjangb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe 693b63233d8Sdamjangb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET) 694b63233d8Sdamjangb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe 695b63233d8Sdamjangb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET) 696b63233d8Sdamjangb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe 697b63233d8Sdamjangb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET) 698b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe 699b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET) 700b63233d8Sdamjangb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe 701b63233d8Sdamjangb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET) 702cdf0e10cSrcweir 703cdf0e10cSrcweir# vim: set noet sw=4 ts=4: 704