xref: /aoo41x/main/solenv/gbuild/platform/winmingw.mk (revision 910823ae)
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	--subsystem console \
157cdf0e10cSrcweir	--exclude-libs ALL \
158cdf0e10cSrcweir	--enable-stdcall-fixup \
159cdf0e10cSrcweir	--enable-runtime-pseudo-reloc-v2 \
160cdf0e10cSrcweir	-L$(gb_Library_DLLDIR) \
161cdf0e10cSrcweir	$(patsubst %,-L%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
162cdf0e10cSrcweir
163cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES)
164cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -shared-libgcc
165cdf0e10cSrcweirendif
166cdf0e10cSrcweir
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
210cdf0e10cSrcweir# CObject class
211cdf0e10cSrcweir
212cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
213cdf0e10cSrcweirdefine gb_CObject__command_deponcompile
214cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
215cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
216cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
217cdf0e10cSrcweir		-I$(dir $(3)) \
218cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
219cdf0e10cSrcweir		$(3) \
220cdf0e10cSrcweir		-f - \
221cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
222cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
223cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
224cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
225cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
226cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
227cdf0e10cSrcweir	> $(call gb_CObject_get_dep_target,$(2)))
228cdf0e10cSrcweirendef
229cdf0e10cSrcweirelse
230cdf0e10cSrcweirCObject__command_deponcompile =
231cdf0e10cSrcweirendif
232cdf0e10cSrcweir
233cdf0e10cSrcweirdefine gb_CObject__command
234cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C  ,3)
235cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
236cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
237cdf0e10cSrcweir	$(gb_CC) \
238cdf0e10cSrcweir		$(DEFS) $(CFLAGS) \
239cdf0e10cSrcweir		-c $(3) \
240cdf0e10cSrcweir		-o $(1) \
241cdf0e10cSrcweir		-I$(dir $(3)) \
242cdf0e10cSrcweir		$(INCLUDE))
243cdf0e10cSrcweir$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE))
244cdf0e10cSrcweirendef
245cdf0e10cSrcweir
246cdf0e10cSrcweir
247cdf0e10cSrcweir
248cdf0e10cSrcweir# CxxObject class
249cdf0e10cSrcweir
250cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
251cdf0e10cSrcweirdefine gb_CxxObject__command_deponcompile
252cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
253cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
254cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
255cdf0e10cSrcweir		-I$(dir $(3)) \
256cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
257cdf0e10cSrcweir		$(3) \
258cdf0e10cSrcweir		-f - \
259cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
260cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
261cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
262cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
263cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
264cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
265cdf0e10cSrcweir	> $(call gb_CxxObject_get_dep_target,$(2)))
266cdf0e10cSrcweirendef
267cdf0e10cSrcweirelse
268cdf0e10cSrcweirgb_CxxObject__command_deponcompile =
269cdf0e10cSrcweirendif
270cdf0e10cSrcweir
271cdf0e10cSrcweirdefine gb_CxxObject__command
272cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3)
273cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
274cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
275cdf0e10cSrcweir	$(gb_CXX) \
276cdf0e10cSrcweir		$(DEFS) $(CXXFLAGS) \
277cdf0e10cSrcweir		-c $(3) \
278cdf0e10cSrcweir		-o $(1) \
279cdf0e10cSrcweir		-I$(dir $(3)) \
280cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE))
281cdf0e10cSrcweir$(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CXXFLAGS),$(INCLUDE_STL) $(INCLUDE))
282cdf0e10cSrcweirendef
283cdf0e10cSrcweir
284cdf0e10cSrcweir
285cdf0e10cSrcweir# PrecompiledHeader class
286cdf0e10cSrcweir
287cdf0e10cSrcweirgb_PrecompiledHeader_EXT := .gch
288cdf0e10cSrcweir
289cdf0e10cSrcweirgb_PrecompiledHeader_get_enableflags = -I$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR) \
290cdf0e10cSrcweir					-DPRECOMPILED_HEADERS \
291cdf0e10cSrcweir					-Winvalid-pch \
292cdf0e10cSrcweir
293cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
294cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile
295cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
296cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
297cdf0e10cSrcweir		$(4) $(5) \
298cdf0e10cSrcweir		-I$(dir $(3)) \
299cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
300cdf0e10cSrcweir		$(3) \
301cdf0e10cSrcweir		-f - \
302cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
303cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
304cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
305cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
306cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
307cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
308cdf0e10cSrcweir	> $(call gb_PrecompiledHeader_get_dep_target,$(2)))
309cdf0e10cSrcweirendef
310cdf0e10cSrcweirelse
311cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile =
312cdf0e10cSrcweirendif
313cdf0e10cSrcweir
314cdf0e10cSrcweirdefine gb_PrecompiledHeader__command
315cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
316cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
317cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
318cdf0e10cSrcweir	$(gb_CXX) \
319cdf0e10cSrcweir		-x c++-header \
320cdf0e10cSrcweir		$(4) $(5) \
321cdf0e10cSrcweir		-I$(dir $(3)) \
322cdf0e10cSrcweir		$(6) \
323cdf0e10cSrcweir		-c $(3) \
324cdf0e10cSrcweir		-o$(1))
325cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
326cdf0e10cSrcweir
327cdf0e10cSrcweirendef
328cdf0e10cSrcweir
329cdf0e10cSrcweir# NoexPrecompiledHeader class
330cdf0e10cSrcweir
331cdf0e10cSrcweirgb_NoexPrecompiledHeader_EXT := .gch
332cdf0e10cSrcweir
333cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -I$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR) \
334cdf0e10cSrcweir					-Winvalid-pch \
335cdf0e10cSrcweir
336cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
337cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile
338cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
339cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
340cdf0e10cSrcweir		$(4) $(5) \
341cdf0e10cSrcweir		-I$(dir $(3)) \
342cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
343cdf0e10cSrcweir		$(3) \
344cdf0e10cSrcweir		-f - \
345cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
346cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
347cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
348cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
349cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
350cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
351cdf0e10cSrcweir	> $(call gb_NoexPrecompiledHeader_get_dep_target,$(2)))
352cdf0e10cSrcweirendef
353cdf0e10cSrcweirelse
354cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile =
355cdf0e10cSrcweirendif
356cdf0e10cSrcweir
357cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command
358cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
359cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
360cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
361cdf0e10cSrcweir	$(gb_CXX) \
362cdf0e10cSrcweir		-x c++-header \
363cdf0e10cSrcweir		$(4) $(5) \
364cdf0e10cSrcweir		-I$(dir $(3)) \
365cdf0e10cSrcweir		$(6) \
366cdf0e10cSrcweir		-c $(3) \
367cdf0e10cSrcweir		-o$(1))
368cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
369cdf0e10cSrcweir
370cdf0e10cSrcweirendef
371cdf0e10cSrcweir
372cdf0e10cSrcweir
373cdf0e10cSrcweir# LinkTarget class
374cdf0e10cSrcweir
375cdf0e10cSrcweirgb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
376cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
377cdf0e10cSrcweir
378cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
379cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
380cdf0e10cSrcweirgb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
381cdf0e10cSrcweir
382cdf0e10cSrcweirendif
383cdf0e10cSrcweir
384cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\
385cdf0e10cSrcweir	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
386cdf0e10cSrcweir	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
387cdf0e10cSrcweir
388cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
389cdf0e10cSrcweir
390cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinkexecutable
391cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
392cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
393cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
394cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
395cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
396cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
3977d9c290fSMichael Stahl		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
3987d9c290fSMichael Stahl		$(NATIVERES) " > $${RESPONSEFILE} && \
399cdf0e10cSrcweir	$(gb_LINK) \
400cdf0e10cSrcweir		$(gb_Executable_TARGETTYPEFLAGS) \
401cdf0e10cSrcweir		$(LDFLAGS) \
402cdf0e10cSrcweir		$(gb_MINGWLIBDIR)/crt2.o \
403cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtbegin.o \
404cdf0e10cSrcweir		@$${RESPONSEFILE} \
405cdf0e10cSrcweir		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
406cdf0e10cSrcweir		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
40744c25570SAndre Fischer		--start-group $(patsubst %,-l%,$(EXTERNAL_LIBS)) --end-group \
408cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtend.o \
409cdf0e10cSrcweir		-Map $(basename $(1)).map \
410cdf0e10cSrcweir		-o $(1))
411cdf0e10cSrcweirendef
412cdf0e10cSrcweir
413cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinklibrary
414cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
415cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
416cdf0e10cSrcweir	rm -f $(1) && \
417cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
418cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
419cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
4207d9c290fSMichael Stahl		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
4217d9c290fSMichael Stahl		$(NATIVERES) " > $${RESPONSEFILE} && \
422cdf0e10cSrcweir	$(gb_LINK) \
423cdf0e10cSrcweir		$(gb_Library_TARGETTYPEFLAGS) \
424cdf0e10cSrcweir		$(LDFLAGS) \
425cdf0e10cSrcweir		--enable-auto-image-base \
426cdf0e10cSrcweir		-e _DllMainCRTStartup@12 \
427cdf0e10cSrcweir		$(gb_MINGWLIBDIR)/dllcrt2.o \
428cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtbegin.o \
429cdf0e10cSrcweir		@$${RESPONSEFILE} \
430cdf0e10cSrcweir		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
431cdf0e10cSrcweir		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
432cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtend.o \
433cdf0e10cSrcweir		-Map $(basename $(DLLTARGET)).map \
434cdf0e10cSrcweir		-o $(DLLTARGET) && touch $(1))
435cdf0e10cSrcweirendef
436cdf0e10cSrcweir
437cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlinklibrary
438cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
439cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
440cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
441cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
442cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
443cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
444cdf0e10cSrcweir	$(gb_AR) -rsu\
445cdf0e10cSrcweir		$(1) \
446cdf0e10cSrcweir		@$${RESPONSEFILE})
447cdf0e10cSrcweirendef
448cdf0e10cSrcweir
449cdf0e10cSrcweirdefine gb_LinkTarget__command
450cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
451cdf0e10cSrcweir$(if $(filter Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
452cdf0e10cSrcweir$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinklibrary,$(1),$(2)))
453cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1)))
454cdf0e10cSrcweirendef
455cdf0e10cSrcweir
456cdf0e10cSrcweir
457cdf0e10cSrcweir# Library class
458cdf0e10cSrcweir
459cdf0e10cSrcweirgb_Library_DEFS := -D_DLL
460cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -shared
461cdf0e10cSrcweirgb_Library_get_rpath :=
462cdf0e10cSrcweir
463cdf0e10cSrcweirgb_Library_SYSPRE := i
464cdf0e10cSrcweirgb_Library_PLAINEXT := .lib
465cdf0e10cSrcweir
466cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \
467cdf0e10cSrcweir	mingwthrd \
468cdf0e10cSrcweir	mingw32 \
469cdf0e10cSrcweir	mingwex \
470cdf0e10cSrcweir	$(gb_MINGW_LIBSTDCPP) \
471cdf0e10cSrcweir	$(gb_MINGW_LIBGCC) \
472cdf0e10cSrcweir	advapi32 \
473cdf0e10cSrcweir	gdi32 \
4747d9c290fSMichael Stahl	gdiplus \
4757d9c290fSMichael Stahl	gnu_getopt \
4767d9c290fSMichael Stahl	imm32\
477cdf0e10cSrcweir	kernel32 \
4787d9c290fSMichael Stahl	msimg32 \
479cdf0e10cSrcweir	msvcrt \
480cdf0e10cSrcweir	mpr \
481cdf0e10cSrcweir	moldname \
482cdf0e10cSrcweir	ole32 \
483cdf0e10cSrcweir	oleaut32 \
484cdf0e10cSrcweir	shell32 \
485cdf0e10cSrcweir	user32 \
486cdf0e10cSrcweir	uuid \
487cdf0e10cSrcweir	uwinapi \
4887d9c290fSMichael Stahl	winspool \
489cdf0e10cSrcweir	z \
490828da808SPedro Giffuni	cppunit
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
546cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
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 =
596cdf0e10cSrcweir
597cdf0e10cSrcweir
598cdf0e10cSrcweir# CppunitTest class
599cdf0e10cSrcweir
600cdf0e10cSrcweirgb_CppunitTest_CPPTESTPRECOMMAND :=
601cdf0e10cSrcweirgb_CppunitTest_SYSPRE := itest_
602cdf0e10cSrcweirgb_CppunitTest_EXT := .lib
603cdf0e10cSrcweirgb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
604cdf0e10cSrcweirgb_CppunitTest_get_libfilename = test_$(1).dll
605cdf0e10cSrcweir
606cdf0e10cSrcweirdefine gb_CppunitTest_CppunitTest_platform
607cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
608cdf0e10cSrcweir
609cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
610cdf0e10cSrcweir	$(patsubst %.dll,%.map,$(3)) \
611cdf0e10cSrcweir)
612cdf0e10cSrcweir
613cdf0e10cSrcweirendef
614cdf0e10cSrcweir
615cdf0e10cSrcweir# SdiTarget class
616cdf0e10cSrcweir
617cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
618cdf0e10cSrcweir
619cdf0e10cSrcweir# SrsPartMergeTarget
620cdf0e10cSrcweir
621cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
622cdf0e10cSrcweir
623cdf0e10cSrcweir# SrsPartTarget class
624cdf0e10cSrcweir
625cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
626cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
627cdf0e10cSrcweir
628cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
629cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep
630cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
631cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
632cdf0e10cSrcweir		$(INCLUDE) \
633cdf0e10cSrcweir		$(DEFS) \
634cdf0e10cSrcweir		$(2) \
635cdf0e10cSrcweir		-f - \
636cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
637cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
638cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
639cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
640cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
641cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
642cdf0e10cSrcweir	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
643cdf0e10cSrcweirendef
644cdf0e10cSrcweirelse
645cdf0e10cSrcweirgb_SrsPartTarget__command_dep =
646cdf0e10cSrcweirendif
647cdf0e10cSrcweir
648cdf0e10cSrcweir# WinResTarget class
649cdf0e10cSrcweir
650cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=_res.o
651cdf0e10cSrcweir
652cdf0e10cSrcweirdefine gb_WinResTarget__command
653cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3)
654cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
655cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
656cdf0e10cSrcweir	$(gb_RC) \
657cdf0e10cSrcweir		$(DEFS) $(FLAGS) \
658cdf0e10cSrcweir		-I$(dir $(3)) \
659cdf0e10cSrcweir		$(INCLUDE) \
660cdf0e10cSrcweir		-Fo$(patsubst %_res.o,%.res,$(1)) \
661cdf0e10cSrcweir        $(RCFILE) )
6627d9c290fSMichael Stahl$(call gb_Helper_abbreviate_dirs_native,\
6637d9c290fSMichael Stahl    windres $(patsubst %_res.o,%.res,$(1)) $(1))
664cdf0e10cSrcweir	rm $(patsubst %_res.o,%.res,$(1))
665cdf0e10cSrcweirendef
666cdf0e10cSrcweir
667cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\
668cdf0e10cSrcweir	WinResTarget \
669cdf0e10cSrcweir))
670cdf0e10cSrcweir
671cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
672cdf0e10cSrcweirdefine gb_WinResTarget__command_dep
673cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
674cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
675cdf0e10cSrcweir		$(INCLUDE) \
676cdf0e10cSrcweir		$(DEFS) \
677cdf0e10cSrcweir		$(2) \
678cdf0e10cSrcweir		-f - \
679cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
680cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \
681cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
682cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
683cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
684cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
685cdf0e10cSrcweir	> $(call gb_WinResTarget_get_dep_target,$(1)))
686cdf0e10cSrcweirendef
687cdf0e10cSrcweirelse
688cdf0e10cSrcweirgb_WinResTarget__command_dep =
689cdf0e10cSrcweirendif
690cdf0e10cSrcweir
691cdf0e10cSrcweir# ComponentTarget
692cdf0e10cSrcweir
693cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
694cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \
695*910823aeSJürgen Schmidt    OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \
696cdf0e10cSrcweir    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
697cdf0e10cSrcweir
698cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
699