xref: /aoo42x/main/solenv/gbuild/platform/winmingw.mk (revision 386ca866)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirGUI := WNT
25cdf0e10cSrcweirCOM := GCC
26cdf0e10cSrcweir
27cdf0e10cSrcweir# set tmpdir to some mixed case path, suitable for native tools
28cdf0e10cSrcweirgb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp))
29cdf0e10cSrcweirgb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
30cdf0e10cSrcweir
31cdf0e10cSrcweirgb_CC := $(CC)
32cdf0e10cSrcweirgb_CXX := $(CXX)
33cdf0e10cSrcweirgb_LINK := $(shell $(CC) -print-prog-name=ld)
34cdf0e10cSrcweirgb_AR := $(shell $(CC) -print-prog-name=ar)
35cdf0e10cSrcweirgb_AWK := awk
367d9c290fSMichael Stahlgb_RC := rc
37cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin)
38cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/lib/mingw
39cdf0e10cSrcweirelse
40cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin-w64-mingw32)
41cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/usr/i686-w64-mingw32/sys-root/mingw/lib
42cdf0e10cSrcweirelse
43cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/lib
44cdf0e10cSrcweirendif
45cdf0e10cSrcweirendif
46cdf0e10cSrcweirifeq ($(MINGW_SHARED_GXXLIB),YES)
47cdf0e10cSrcweirgb_MINGW_LIBSTDCPP := $(subst -l,,$(MINGW_SHARED_LIBSTDCPP))
48cdf0e10cSrcweirelse
49cdf0e10cSrcweirgb_MINGW_LIBSTDCPP := \
50cdf0e10cSrcweir		stdc++ \
51cdf0e10cSrcweir		moldname
52cdf0e10cSrcweirendif
53cdf0e10cSrcweirifeq ($(MINGW_SHARED_GCCLIB),YES)
54cdf0e10cSrcweirgb_MINGW_LIBGCC := \
55cdf0e10cSrcweir		gcc_s \
56cdf0e10cSrcweir		gcc
57cdf0e10cSrcweirelse
58cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES)
59cdf0e10cSrcweirgb_MINGW_LIBGCC := \
60cdf0e10cSrcweir		gcc \
61cdf0e10cSrcweir		gcc_eh
62cdf0e10cSrcweirelse
63cdf0e10cSrcweirgb_MINGW_LIBGCC := gcc
64cdf0e10cSrcweirendif
65cdf0e10cSrcweirendif
66cdf0e10cSrcweir
67cdf0e10cSrcweirgb_OSDEFS := \
68cdf0e10cSrcweir	-DWINVER=0x0500 \
69cdf0e10cSrcweir	-D_WIN32_IE=0x0500 \
707d9c290fSMichael Stahl	-D_WIN32_WINNT=0x0600 \
71cdf0e10cSrcweir	-DNT351 \
72cdf0e10cSrcweir	-DWIN32 \
73cdf0e10cSrcweir	-DWNT \
74cdf0e10cSrcweir
75cdf0e10cSrcweirgb_COMPILERDEFS := \
76cdf0e10cSrcweir	-DGCC \
77cdf0e10cSrcweir	-D$(CVER) \
78cdf0e10cSrcweir	-DCVER=$(CVER) \
79cdf0e10cSrcweir	-DGLIBC=2 \
80*386ca866SDon Lewis	-DCPPU_ENV=$(COMNAME) \
81cdf0e10cSrcweir	-D_MT \
82cdf0e10cSrcweir	-D_NATIVE_WCHAR_T_DEFINED \
83cdf0e10cSrcweir	-D_MSC_EXTENSIONS \
84cdf0e10cSrcweir	-D_FORCENAMELESSUNION \
85cdf0e10cSrcweir
86cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin-w64-mingw32)
87cdf0e10cSrcweirgb_COMPILERDEFS +=-D_declspec=__declspec
88cdf0e10cSrcweirendif
89cdf0e10cSrcweir
90cdf0e10cSrcweirgb_CPUDEFS := \
91cdf0e10cSrcweir	-DINTEL \
92cdf0e10cSrcweir	-D_M_IX86 \
93cdf0e10cSrcweir
94cdf0e10cSrcweirgb_RCDEFS := \
957d9c290fSMichael Stahl     -DWIN32 \
967d9c290fSMichael Stahl     -D__GNUC__ \
97cdf0e10cSrcweir
98cdf0e10cSrcweirgb_RCFLAGS := \
99cdf0e10cSrcweir     -V
100cdf0e10cSrcweir
101cdf0e10cSrcweirgb_CFLAGS := \
102cdf0e10cSrcweir	-Wall \
103cdf0e10cSrcweir	-Wendif-labels \
104cdf0e10cSrcweir	-Wextra \
105cdf0e10cSrcweir	-fmessage-length=0 \
106cdf0e10cSrcweir	-fno-strict-aliasing \
107cdf0e10cSrcweir	-pipe \
108cdf0e10cSrcweir	-nostdinc \
109cdf0e10cSrcweir
110cdf0e10cSrcweirgb_CXXFLAGS := \
111cdf0e10cSrcweir	-Wall \
112cdf0e10cSrcweir	-Wendif-labels \
113cdf0e10cSrcweir	-Wextra \
114cdf0e10cSrcweir	-Wno-ctor-dtor-privacy \
115cdf0e10cSrcweir	-Wno-non-virtual-dtor \
116cdf0e10cSrcweir	-Wreturn-type \
117cdf0e10cSrcweir	-Wshadow \
118cdf0e10cSrcweir	-Wuninitialized \
119cdf0e10cSrcweir	-fmessage-length=0 \
120cdf0e10cSrcweir	-fno-strict-aliasing \
121cdf0e10cSrcweir	-fno-use-cxa-atexit \
122cdf0e10cSrcweir	-pipe \
123cdf0e10cSrcweir	-nostdinc \
124cdf0e10cSrcweir
125cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
126cdf0e10cSrcweirgb_CFLAGS_WERROR := -Werror
127cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -Werror
128cdf0e10cSrcweirendif
129cdf0e10cSrcweir
130cdf0e10cSrcweirifneq ($(SYSBASE),)
131cdf0e10cSrcweirgb_CXXFLAGS += --sysroot=$(SYSBASE)
132cdf0e10cSrcweirgb_CFLAGS += --sysroot=$(SYSBASE)
133cdf0e10cSrcweirendif
134cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \
135cdf0e10cSrcweir	-DEXCEPTIONS_ON \
136cdf0e10cSrcweir	-fexceptions \
137cdf0e10cSrcweir	-fno-enforce-eh-specs \
138cdf0e10cSrcweir
139cdf0e10cSrcweirgb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
140cdf0e10cSrcweir
141cdf0e10cSrcweir
142cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \
143cdf0e10cSrcweir	-DEXCEPTIONS_OFF \
144cdf0e10cSrcweir	-fno-exceptions \
145828da808SPedro Giffuni
146cdf0e10cSrcweirgb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
147cdf0e10cSrcweir
148cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \
149cdf0e10cSrcweir	--export-all-symbols \
150cdf0e10cSrcweir	--kill-at \
151cdf0e10cSrcweir	--exclude-libs ALL \
152cdf0e10cSrcweir	--enable-stdcall-fixup \
153cdf0e10cSrcweir	--enable-runtime-pseudo-reloc-v2 \
154cdf0e10cSrcweir	-L$(gb_Library_DLLDIR) \
155cdf0e10cSrcweir	$(patsubst %,-L%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
156cdf0e10cSrcweir
157cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES)
158cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -shared-libgcc
159cdf0e10cSrcweirendif
160cdf0e10cSrcweir
1619e1b801eSDamjan Jovanovicifeq ($(ENABLE_SYMBOLS),SMALL)
1629e1b801eSDamjan Jovanovicgb_DEBUG_CFLAGS := -ggdb1 -finline-limit=0 -fno-inline -fno-default-inline
1639e1b801eSDamjan Jovanovicelse
164b63233d8Sdamjangb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
1659e1b801eSDamjan Jovanovicendif
166b63233d8Sdamjan
167cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
168cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -O0
169cdf0e10cSrcweirelse
170cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Os
171cdf0e10cSrcweirendif
172cdf0e10cSrcweir
173cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -O0
174cdf0e10cSrcweir
175cdf0e10cSrcweirgb_STDLIBS := \
176cdf0e10cSrcweir	mingwthrd \
177cdf0e10cSrcweir	$(gb_MINGW_LIBSTDCPP) \
178cdf0e10cSrcweir	mingw32 \
179cdf0e10cSrcweir	$(gb_MINGW_LIBGCC) \
180cdf0e10cSrcweir	uwinapi \
181cdf0e10cSrcweir	moldname \
182cdf0e10cSrcweir	mingwex \
183cdf0e10cSrcweir    kernel32 \
184cdf0e10cSrcweir	msvcrt \
185cdf0e10cSrcweir
186cdf0e10cSrcweir
187cdf0e10cSrcweir# Helper class
188cdf0e10cSrcweir
189cdf0e10cSrcweirgb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
190cdf0e10cSrcweirgb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
191cdf0e10cSrcweirgb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
192cdf0e10cSrcweirgb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
193cdf0e10cSrcweir
194cdf0e10cSrcweirdefine gb_Helper_abbreviate_dirs_native
195cdf0e10cSrcweirR=$(gb_Helper_REPODIR_NATIVE) && $(subst $(REPODIR)/,$$R/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,O=$(gb_Helper_OUTDIR_NATIVE) && W=$(gb_Helper_WORKDIR_NATIVE) && S=$(gb_Helper_SRCDIR_NATIVE))) && \
196cdf0e10cSrcweir$(subst $(REPODIR)/,$$R/,$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,$(subst $(WORKDIR)/,$$W/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,$(subst $(gb_Helper_SRCDIR_NATIVE)/,$$S/,$(subst $(gb_Helper_OUTDIR_NATIVE)/,$$O/,$(subst $(gb_Helper_WORKDIR_NATIVE)/,$$W/,$(1)))))))))
197cdf0e10cSrcweirendef
198cdf0e10cSrcweir
199cdf0e10cSrcweir# convert parametters filesystem root to native notation
200cdf0e10cSrcweir# does some real work only on windows, make sure not to
201cdf0e10cSrcweir# break the dummy implementations on unx*
202cdf0e10cSrcweirdefine gb_Helper_convert_native
203cdf0e10cSrcweir$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \
204cdf0e10cSrcweir$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \
205cdf0e10cSrcweir$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \
206cdf0e10cSrcweir$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
207cdf0e10cSrcweir$(1)))))
208cdf0e10cSrcweirendef
209cdf0e10cSrcweir
210b63233d8Sdamjan# convert parametters filesystem root to native notation
211b63233d8Sdamjan# does some real work only on windows, make sure not to
212b63233d8Sdamjan# break the dummy implementations on unx*
213b63233d8Sdamjandefine gb_Helper_convert_native
214b63233d8Sdamjan$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \
215b63233d8Sdamjan$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \
216b63233d8Sdamjan$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \
217b63233d8Sdamjan$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
218b63233d8Sdamjan$(1)))))
219b63233d8Sdamjanendef
220b63233d8Sdamjan
221cdf0e10cSrcweir# CObject class
222cdf0e10cSrcweir
223cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
224b63233d8Sdamjandefine gb_Object__command_deponcompile
225cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
226cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
227cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
228cdf0e10cSrcweir		-I$(dir $(3)) \
229cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
230cdf0e10cSrcweir		$(3) \
231cdf0e10cSrcweir		-f - \
232cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
233cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
234cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
235cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
236cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
237cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
238b63233d8Sdamjan	> $(2))
239cdf0e10cSrcweirendef
240cdf0e10cSrcweirelse
241b63233d8Sdamjangb_Object__command_deponcompile =
242cdf0e10cSrcweirendif
243cdf0e10cSrcweir
244cdf0e10cSrcweirdefine gb_CObject__command
245cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C  ,3)
246cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
247cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
248cdf0e10cSrcweir	$(gb_CC) \
249b63233d8Sdamjan		$(DEFS) \
250b63233d8Sdamjan		$(T_CFLAGS) \
251cdf0e10cSrcweir		-c $(3) \
252cdf0e10cSrcweir		-o $(1) \
253cdf0e10cSrcweir		-I$(dir $(3)) \
254cdf0e10cSrcweir		$(INCLUDE))
255b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CFLAGS),$(INCLUDE))
256cdf0e10cSrcweirendef
257cdf0e10cSrcweir
258cdf0e10cSrcweir
259cdf0e10cSrcweir
260cdf0e10cSrcweir# CxxObject class
261cdf0e10cSrcweir
262cdf0e10cSrcweirdefine gb_CxxObject__command
263cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3)
264cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
265cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
266cdf0e10cSrcweir	$(gb_CXX) \
267b63233d8Sdamjan		$(DEFS) \
268b63233d8Sdamjan		$(T_CXXFLAGS) \
269cdf0e10cSrcweir		-c $(3) \
270cdf0e10cSrcweir		-o $(1) \
271cdf0e10cSrcweir		-I$(dir $(3)) \
272cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE))
273b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CXXFLAGS),$(INCLUDE_STL) $(INCLUDE))
274cdf0e10cSrcweirendef
275cdf0e10cSrcweir
276cdf0e10cSrcweir
277cdf0e10cSrcweir# PrecompiledHeader class
278cdf0e10cSrcweir
279cdf0e10cSrcweirgb_PrecompiledHeader_EXT := .gch
280cdf0e10cSrcweir
281cdf0e10cSrcweirgb_PrecompiledHeader_get_enableflags = -I$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR) \
282cdf0e10cSrcweir					-DPRECOMPILED_HEADERS \
283cdf0e10cSrcweir					-Winvalid-pch \
284cdf0e10cSrcweir
285cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
286cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile
287cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
288cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
289cdf0e10cSrcweir		$(4) $(5) \
290cdf0e10cSrcweir		-I$(dir $(3)) \
291cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
292cdf0e10cSrcweir		$(3) \
293cdf0e10cSrcweir		-f - \
294cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
295cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
296cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
297cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
298cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
299cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
300cdf0e10cSrcweir	> $(call gb_PrecompiledHeader_get_dep_target,$(2)))
301cdf0e10cSrcweirendef
302cdf0e10cSrcweirelse
303cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile =
304cdf0e10cSrcweirendif
305cdf0e10cSrcweir
306cdf0e10cSrcweirdefine gb_PrecompiledHeader__command
307cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
308cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
309cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
310cdf0e10cSrcweir	$(gb_CXX) \
311cdf0e10cSrcweir		-x c++-header \
312cdf0e10cSrcweir		$(4) $(5) \
313cdf0e10cSrcweir		-I$(dir $(3)) \
314e6091915Struckman		-DPRECOMPILED_HEADERS \
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)) \
358e6091915Struckman		-DPRECOMPILED_HEADERS \
359cdf0e10cSrcweir		$(6) \
360cdf0e10cSrcweir		-c $(3) \
361cdf0e10cSrcweir		-o$(1))
362cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
363cdf0e10cSrcweir
364cdf0e10cSrcweirendef
365cdf0e10cSrcweir
366cdf0e10cSrcweir
367cdf0e10cSrcweir# LinkTarget class
368cdf0e10cSrcweir
369b63233d8Sdamjangb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
370cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
371cdf0e10cSrcweir
372cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\
373cdf0e10cSrcweir	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
374cdf0e10cSrcweir	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
375cdf0e10cSrcweir
376cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
377cdf0e10cSrcweir
378cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinkexecutable
379cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
380cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
381cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
382cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
383cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
384cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
3857d9c290fSMichael Stahl		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
3867d9c290fSMichael Stahl		$(NATIVERES) " > $${RESPONSEFILE} && \
387cdf0e10cSrcweir	$(gb_LINK) \
388cdf0e10cSrcweir		$(gb_Executable_TARGETTYPEFLAGS) \
389b63233d8Sdamjan		$(if $(filter YES,$(gb_Executable_TARGETGUI)), --subsystem windows, --subsystem console) \
390b63233d8Sdamjan		$(T_LDFLAGS) \
391cdf0e10cSrcweir		$(gb_MINGWLIBDIR)/crt2.o \
392cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtbegin.o \
393cdf0e10cSrcweir		@$${RESPONSEFILE} \
394cdf0e10cSrcweir		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
395cdf0e10cSrcweir		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
39644c25570SAndre Fischer		--start-group $(patsubst %,-l%,$(EXTERNAL_LIBS)) --end-group \
397b63233d8Sdamjan		$(LIBS) \
398cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtend.o \
399cdf0e10cSrcweir		-Map $(basename $(1)).map \
400cdf0e10cSrcweir		-o $(1))
401cdf0e10cSrcweirendef
402cdf0e10cSrcweir
403cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinklibrary
404cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
405cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
406cdf0e10cSrcweir	rm -f $(1) && \
407cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
408cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
409cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
4107d9c290fSMichael Stahl		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
4117d9c290fSMichael Stahl		$(NATIVERES) " > $${RESPONSEFILE} && \
412cdf0e10cSrcweir	$(gb_LINK) \
413cdf0e10cSrcweir		$(gb_Library_TARGETTYPEFLAGS) \
414b63233d8Sdamjan		$(T_LDFLAGS) \
415cdf0e10cSrcweir		--enable-auto-image-base \
416cdf0e10cSrcweir		-e _DllMainCRTStartup@12 \
417cdf0e10cSrcweir		$(gb_MINGWLIBDIR)/dllcrt2.o \
418cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtbegin.o \
419cdf0e10cSrcweir		@$${RESPONSEFILE} \
420cdf0e10cSrcweir		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
421cdf0e10cSrcweir		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
422b63233d8Sdamjan		$(LIBS) \
423cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtend.o \
424cdf0e10cSrcweir		-Map $(basename $(DLLTARGET)).map \
425cdf0e10cSrcweir		-o $(DLLTARGET) && touch $(1))
426cdf0e10cSrcweirendef
427cdf0e10cSrcweir
428cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlinklibrary
429cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
430cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
431cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
432cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
433cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
434cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
435cdf0e10cSrcweir	$(gb_AR) -rsu\
436cdf0e10cSrcweir		$(1) \
437cdf0e10cSrcweir		@$${RESPONSEFILE})
438cdf0e10cSrcweirendef
439cdf0e10cSrcweir
440cdf0e10cSrcweirdefine gb_LinkTarget__command
441cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
442e75d772dSDamjan Jovanovic$(if $(filter GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
443dfce871fSDamjan Jovanovic$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinklibrary,$(1),$(2)))
444cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1)))
445cdf0e10cSrcweirendef
446cdf0e10cSrcweir
447cdf0e10cSrcweir
448cdf0e10cSrcweir# Library class
449cdf0e10cSrcweir
450b63233d8Sdamjangb_Library_DEFS := -D_DLL_
451cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -shared
452cdf0e10cSrcweirgb_Library_get_rpath :=
453cdf0e10cSrcweir
454cdf0e10cSrcweirgb_Library_SYSPRE := i
455cdf0e10cSrcweirgb_Library_PLAINEXT := .lib
456cdf0e10cSrcweir
457cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \
458cdf0e10cSrcweir	mingwthrd \
459cdf0e10cSrcweir	mingw32 \
460cdf0e10cSrcweir	mingwex \
461cdf0e10cSrcweir	$(gb_MINGW_LIBSTDCPP) \
462cdf0e10cSrcweir	$(gb_MINGW_LIBGCC) \
463cdf0e10cSrcweir	advapi32 \
4646ecc4615Sdamjan	comdlg32 \
465b63233d8Sdamjan	d3d9 \
466b63233d8Sdamjan	d3dx \
467b63233d8Sdamjan	ddraw \
468cdf0e10cSrcweir	gdi32 \
4697d9c290fSMichael Stahl	gdiplus \
470df3f5cbcSdamjan	glu32 \
4717d9c290fSMichael Stahl	gnu_getopt \
4727d9c290fSMichael Stahl	imm32\
473cdf0e10cSrcweir	kernel32 \
4747d9c290fSMichael Stahl	msimg32 \
475cdf0e10cSrcweir	msvcrt \
476cdf0e10cSrcweir	mpr \
477cdf0e10cSrcweir	moldname \
478cdf0e10cSrcweir	ole32 \
479cdf0e10cSrcweir	oleaut32 \
480df3f5cbcSdamjan	opengl32 \
481cdf0e10cSrcweir	shell32 \
482b1d3b18cSdamjan	shlwapi \
4835a41b379Sdamjan	strmiids \
484cdf0e10cSrcweir	user32 \
485cdf0e10cSrcweir	uuid \
486cdf0e10cSrcweir	uwinapi \
487b63233d8Sdamjan	winmm \
48842aba0ceSdamjan	winspool \
489ad2376c3Sdamjan	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
60664c5c8b7SDamjan Jovanovic# JunitTest class
60764c5c8b7SDamjan Jovanovic
60864c5c8b7SDamjan Jovanovicdefine gb_JunitTest_JunitTest_platform
60964c5c8b7SDamjan Jovanovic$(call gb_JunitTest_get_target,$(1)) : DEFS := \
61064c5c8b7SDamjan Jovanovic	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(SRCDIR)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/OpenOffice 4/program/soffice.exe}" \
61164c5c8b7SDamjan Jovanovic    -Dorg.openoffice.test.arg.env=PATH \
61264c5c8b7SDamjan Jovanovic    -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \
61364c5c8b7SDamjan Jovanovic
61464c5c8b7SDamjan Jovanovicendef
61564c5c8b7SDamjan Jovanovic
61664c5c8b7SDamjan Jovanovic
617cdf0e10cSrcweir# SdiTarget class
618cdf0e10cSrcweir
619cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
620cdf0e10cSrcweir
621cdf0e10cSrcweir# SrsPartMergeTarget
622cdf0e10cSrcweir
623cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
624cdf0e10cSrcweir
625cdf0e10cSrcweir# SrsPartTarget class
626cdf0e10cSrcweir
627cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
628cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
629cdf0e10cSrcweir
630cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
631cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep
632cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
633cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
634cdf0e10cSrcweir		$(INCLUDE) \
635cdf0e10cSrcweir		$(DEFS) \
636cdf0e10cSrcweir		$(2) \
637cdf0e10cSrcweir		-f - \
638cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
639cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
640cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
641cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
642cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
643cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
644cdf0e10cSrcweir	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
645cdf0e10cSrcweirendef
646cdf0e10cSrcweirelse
647cdf0e10cSrcweirgb_SrsPartTarget__command_dep =
648cdf0e10cSrcweirendif
649cdf0e10cSrcweir
650cdf0e10cSrcweir# WinResTarget class
651cdf0e10cSrcweir
652cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=_res.o
653cdf0e10cSrcweir
654cdf0e10cSrcweirdefine gb_WinResTarget__command
655cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3)
656cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
657cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
658cdf0e10cSrcweir	$(gb_RC) \
659cdf0e10cSrcweir		$(DEFS) $(FLAGS) \
660cdf0e10cSrcweir		-I$(dir $(3)) \
661cdf0e10cSrcweir		$(INCLUDE) \
662cdf0e10cSrcweir		-Fo$(patsubst %_res.o,%.res,$(1)) \
663cdf0e10cSrcweir        $(RCFILE) )
6647d9c290fSMichael Stahl$(call gb_Helper_abbreviate_dirs_native,\
6657d9c290fSMichael Stahl    windres $(patsubst %_res.o,%.res,$(1)) $(1))
666cdf0e10cSrcweir	rm $(patsubst %_res.o,%.res,$(1))
667cdf0e10cSrcweirendef
668cdf0e10cSrcweir
669cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\
670cdf0e10cSrcweir	WinResTarget \
671cdf0e10cSrcweir))
672cdf0e10cSrcweir
673cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
674cdf0e10cSrcweirdefine gb_WinResTarget__command_dep
675cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
676cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
677cdf0e10cSrcweir		$(INCLUDE) \
678cdf0e10cSrcweir		$(DEFS) \
679cdf0e10cSrcweir		$(2) \
680cdf0e10cSrcweir		-f - \
681cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
682cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \
683cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
684cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
685cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
686cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
687cdf0e10cSrcweir	> $(call gb_WinResTarget_get_dep_target,$(1)))
688cdf0e10cSrcweirendef
689cdf0e10cSrcweirelse
690cdf0e10cSrcweirgb_WinResTarget__command_dep =
691cdf0e10cSrcweirendif
692cdf0e10cSrcweir
693cdf0e10cSrcweir# ComponentTarget
694cdf0e10cSrcweir
695cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
696cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \
697910823aeSJürgen Schmidt    OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \
698cdf0e10cSrcweir    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
699b63233d8Sdamjan    NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \
700b63233d8Sdamjan
701b63233d8Sdamjan# UnoApiTarget
702b63233d8Sdamjan
703b63233d8Sdamjangb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe
704b63233d8Sdamjangb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET)
705b63233d8Sdamjangb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe
706b63233d8Sdamjangb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET)
707b63233d8Sdamjangb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe
708b63233d8Sdamjangb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
709b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe
710b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
711b63233d8Sdamjangb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe
712b63233d8Sdamjangb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
713cdf0e10cSrcweir
714cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
715