xref: /aoo41x/main/solenv/gbuild/platform/winmingw.mk (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2009 by Sun Microsystems, Inc.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.	If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweirGUI := WNT
29*cdf0e10cSrcweirCOM := GCC
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir# set tmpdir to some mixed case path, suitable for native tools
32*cdf0e10cSrcweirgb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp))
33*cdf0e10cSrcweirgb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
34*cdf0e10cSrcweir
35*cdf0e10cSrcweirgb_CC := $(CC)
36*cdf0e10cSrcweirgb_CXX := $(CXX)
37*cdf0e10cSrcweirgb_LINK := $(shell $(CC) -print-prog-name=ld)
38*cdf0e10cSrcweirgb_AR := $(shell $(CC) -print-prog-name=ar)
39*cdf0e10cSrcweirgb_AWK := awk
40*cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin)
41*cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/lib/mingw
42*cdf0e10cSrcweirelse
43*cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin-w64-mingw32)
44*cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/usr/i686-w64-mingw32/sys-root/mingw/lib
45*cdf0e10cSrcweirelse
46*cdf0e10cSrcweirgb_MINGWLIBDIR := $(COMPATH)/lib
47*cdf0e10cSrcweirendif
48*cdf0e10cSrcweirendif
49*cdf0e10cSrcweirifeq ($(MINGW_SHARED_GXXLIB),YES)
50*cdf0e10cSrcweirgb_MINGW_LIBSTDCPP := $(subst -l,,$(MINGW_SHARED_LIBSTDCPP))
51*cdf0e10cSrcweirelse
52*cdf0e10cSrcweirgb_MINGW_LIBSTDCPP := \
53*cdf0e10cSrcweir		stdc++ \
54*cdf0e10cSrcweir		moldname
55*cdf0e10cSrcweirendif
56*cdf0e10cSrcweirifeq ($(MINGW_SHARED_GCCLIB),YES)
57*cdf0e10cSrcweirgb_MINGW_LIBGCC := \
58*cdf0e10cSrcweir		gcc_s \
59*cdf0e10cSrcweir		gcc
60*cdf0e10cSrcweirelse
61*cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES)
62*cdf0e10cSrcweirgb_MINGW_LIBGCC := \
63*cdf0e10cSrcweir		gcc \
64*cdf0e10cSrcweir		gcc_eh
65*cdf0e10cSrcweirelse
66*cdf0e10cSrcweirgb_MINGW_LIBGCC := gcc
67*cdf0e10cSrcweirendif
68*cdf0e10cSrcweirendif
69*cdf0e10cSrcweir
70*cdf0e10cSrcweirgb_OSDEFS := \
71*cdf0e10cSrcweir	-DWINVER=0x0500 \
72*cdf0e10cSrcweir	-D_WIN32_IE=0x0500 \
73*cdf0e10cSrcweir	-DNT351 \
74*cdf0e10cSrcweir	-DWIN32 \
75*cdf0e10cSrcweir	-DWNT \
76*cdf0e10cSrcweir
77*cdf0e10cSrcweirifeq ($(GXX_INCLUDE_PATH),)
78*cdf0e10cSrcweirGXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
79*cdf0e10cSrcweirendif
80*cdf0e10cSrcweir
81*cdf0e10cSrcweirgb_COMPILERDEFS := \
82*cdf0e10cSrcweir	-DGCC \
83*cdf0e10cSrcweir	-D$(CVER) \
84*cdf0e10cSrcweir	-DCVER=$(CVER) \
85*cdf0e10cSrcweir	-DGLIBC=2 \
86*cdf0e10cSrcweir	-DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
87*cdf0e10cSrcweir	-DCPPU_ENV=gcc3 \
88*cdf0e10cSrcweir	-D_MT \
89*cdf0e10cSrcweir	-D_NATIVE_WCHAR_T_DEFINED \
90*cdf0e10cSrcweir	-D_MSC_EXTENSIONS \
91*cdf0e10cSrcweir	-D_FORCENAMELESSUNION \
92*cdf0e10cSrcweir
93*cdf0e10cSrcweirifeq ($(USE_MINGW),cygwin-w64-mingw32)
94*cdf0e10cSrcweirgb_COMPILERDEFS +=-D_declspec=__declspec
95*cdf0e10cSrcweirendif
96*cdf0e10cSrcweir
97*cdf0e10cSrcweirgb_CPUDEFS := \
98*cdf0e10cSrcweir	-DINTEL \
99*cdf0e10cSrcweir	-D_M_IX86 \
100*cdf0e10cSrcweir
101*cdf0e10cSrcweirgb_RCDEFS := \
102*cdf0e10cSrcweir     -DWINVER=0x0400 \
103*cdf0e10cSrcweir	 -DWIN32 \
104*cdf0e10cSrcweir
105*cdf0e10cSrcweirgb_RCFLAGS := \
106*cdf0e10cSrcweir     -V
107*cdf0e10cSrcweir
108*cdf0e10cSrcweirgb_CFLAGS := \
109*cdf0e10cSrcweir	-Wall \
110*cdf0e10cSrcweir	-Wendif-labels \
111*cdf0e10cSrcweir	-Wextra \
112*cdf0e10cSrcweir	-fmessage-length=0 \
113*cdf0e10cSrcweir	-fno-strict-aliasing \
114*cdf0e10cSrcweir	-pipe \
115*cdf0e10cSrcweir	-nostdinc \
116*cdf0e10cSrcweir
117*cdf0e10cSrcweirgb_CXXFLAGS := \
118*cdf0e10cSrcweir	-Wall \
119*cdf0e10cSrcweir	-Wendif-labels \
120*cdf0e10cSrcweir	-Wextra \
121*cdf0e10cSrcweir	-Wno-ctor-dtor-privacy \
122*cdf0e10cSrcweir	-Wno-non-virtual-dtor \
123*cdf0e10cSrcweir	-Wreturn-type \
124*cdf0e10cSrcweir	-Wshadow \
125*cdf0e10cSrcweir	-Wuninitialized \
126*cdf0e10cSrcweir	-fmessage-length=0 \
127*cdf0e10cSrcweir	-fno-strict-aliasing \
128*cdf0e10cSrcweir	-fno-use-cxa-atexit \
129*cdf0e10cSrcweir	-pipe \
130*cdf0e10cSrcweir	-nostdinc \
131*cdf0e10cSrcweir
132*cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
133*cdf0e10cSrcweirgb_CFLAGS_WERROR := -Werror
134*cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -Werror
135*cdf0e10cSrcweirendif
136*cdf0e10cSrcweir
137*cdf0e10cSrcweirifneq ($(SYSBASE),)
138*cdf0e10cSrcweirgb_CXXFLAGS += --sysroot=$(SYSBASE)
139*cdf0e10cSrcweirgb_CFLAGS += --sysroot=$(SYSBASE)
140*cdf0e10cSrcweirendif
141*cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \
142*cdf0e10cSrcweir	-DEXCEPTIONS_ON \
143*cdf0e10cSrcweir	-fexceptions \
144*cdf0e10cSrcweir	-fno-enforce-eh-specs \
145*cdf0e10cSrcweir
146*cdf0e10cSrcweirgb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir
149*cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \
150*cdf0e10cSrcweir	-DEXCEPTIONS_OFF \
151*cdf0e10cSrcweir	-fno-exceptions \
152*cdf0e10cSrcweir
153*cdf0e10cSrcweirgb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
154*cdf0e10cSrcweir
155*cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \
156*cdf0e10cSrcweir	--export-all-symbols \
157*cdf0e10cSrcweir	--kill-at \
158*cdf0e10cSrcweir	--subsystem console \
159*cdf0e10cSrcweir	--exclude-libs ALL \
160*cdf0e10cSrcweir	--enable-stdcall-fixup \
161*cdf0e10cSrcweir	--enable-runtime-pseudo-reloc-v2 \
162*cdf0e10cSrcweir	-L$(gb_Library_DLLDIR) \
163*cdf0e10cSrcweir	$(patsubst %,-L%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
164*cdf0e10cSrcweir
165*cdf0e10cSrcweirifeq ($(MINGW_GCCLIB_EH),YES)
166*cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -shared-libgcc
167*cdf0e10cSrcweirendif
168*cdf0e10cSrcweir
169*cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
170*cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -O0
171*cdf0e10cSrcweirelse
172*cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Os
173*cdf0e10cSrcweirendif
174*cdf0e10cSrcweir
175*cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -O0
176*cdf0e10cSrcweir
177*cdf0e10cSrcweirgb_STDLIBS := \
178*cdf0e10cSrcweir	mingwthrd \
179*cdf0e10cSrcweir	$(gb_MINGW_LIBSTDCPP) \
180*cdf0e10cSrcweir	mingw32 \
181*cdf0e10cSrcweir	$(gb_MINGW_LIBGCC) \
182*cdf0e10cSrcweir	uwinapi \
183*cdf0e10cSrcweir	moldname \
184*cdf0e10cSrcweir	mingwex \
185*cdf0e10cSrcweir    kernel32 \
186*cdf0e10cSrcweir	msvcrt \
187*cdf0e10cSrcweir
188*cdf0e10cSrcweir
189*cdf0e10cSrcweir# Helper class
190*cdf0e10cSrcweir
191*cdf0e10cSrcweirgb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
192*cdf0e10cSrcweirgb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
193*cdf0e10cSrcweirgb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
194*cdf0e10cSrcweirgb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
195*cdf0e10cSrcweir
196*cdf0e10cSrcweirdefine gb_Helper_abbreviate_dirs_native
197*cdf0e10cSrcweirR=$(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))) && \
198*cdf0e10cSrcweir$(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)))))))))
199*cdf0e10cSrcweirendef
200*cdf0e10cSrcweir
201*cdf0e10cSrcweir# convert parametters filesystem root to native notation
202*cdf0e10cSrcweir# does some real work only on windows, make sure not to
203*cdf0e10cSrcweir# break the dummy implementations on unx*
204*cdf0e10cSrcweirdefine gb_Helper_convert_native
205*cdf0e10cSrcweir$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \
206*cdf0e10cSrcweir$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \
207*cdf0e10cSrcweir$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \
208*cdf0e10cSrcweir$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
209*cdf0e10cSrcweir$(1)))))
210*cdf0e10cSrcweirendef
211*cdf0e10cSrcweir
212*cdf0e10cSrcweir# CObject class
213*cdf0e10cSrcweir
214*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
215*cdf0e10cSrcweirdefine gb_CObject__command_deponcompile
216*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
217*cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
218*cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
219*cdf0e10cSrcweir		-I$(dir $(3)) \
220*cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
221*cdf0e10cSrcweir		$(3) \
222*cdf0e10cSrcweir		-f - \
223*cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
224*cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
225*cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
226*cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
227*cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
228*cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
229*cdf0e10cSrcweir	> $(call gb_CObject_get_dep_target,$(2)))
230*cdf0e10cSrcweirendef
231*cdf0e10cSrcweirelse
232*cdf0e10cSrcweirCObject__command_deponcompile =
233*cdf0e10cSrcweirendif
234*cdf0e10cSrcweir
235*cdf0e10cSrcweirdefine gb_CObject__command
236*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C  ,3)
237*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
238*cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
239*cdf0e10cSrcweir	$(gb_CC) \
240*cdf0e10cSrcweir		$(DEFS) $(CFLAGS) \
241*cdf0e10cSrcweir		-c $(3) \
242*cdf0e10cSrcweir		-o $(1) \
243*cdf0e10cSrcweir		-I$(dir $(3)) \
244*cdf0e10cSrcweir		$(INCLUDE))
245*cdf0e10cSrcweir$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE))
246*cdf0e10cSrcweirendef
247*cdf0e10cSrcweir
248*cdf0e10cSrcweir
249*cdf0e10cSrcweir
250*cdf0e10cSrcweir# CxxObject class
251*cdf0e10cSrcweir
252*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
253*cdf0e10cSrcweirdefine gb_CxxObject__command_deponcompile
254*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
255*cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
256*cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
257*cdf0e10cSrcweir		-I$(dir $(3)) \
258*cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
259*cdf0e10cSrcweir		$(3) \
260*cdf0e10cSrcweir		-f - \
261*cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
262*cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
263*cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
264*cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
265*cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
266*cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
267*cdf0e10cSrcweir	> $(call gb_CxxObject_get_dep_target,$(2)))
268*cdf0e10cSrcweirendef
269*cdf0e10cSrcweirelse
270*cdf0e10cSrcweirgb_CxxObject__command_deponcompile =
271*cdf0e10cSrcweirendif
272*cdf0e10cSrcweir
273*cdf0e10cSrcweirdefine gb_CxxObject__command
274*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3)
275*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
276*cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
277*cdf0e10cSrcweir	$(gb_CXX) \
278*cdf0e10cSrcweir		$(DEFS) $(CXXFLAGS) \
279*cdf0e10cSrcweir		-c $(3) \
280*cdf0e10cSrcweir		-o $(1) \
281*cdf0e10cSrcweir		-I$(dir $(3)) \
282*cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE))
283*cdf0e10cSrcweir$(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CXXFLAGS),$(INCLUDE_STL) $(INCLUDE))
284*cdf0e10cSrcweirendef
285*cdf0e10cSrcweir
286*cdf0e10cSrcweir
287*cdf0e10cSrcweir# PrecompiledHeader class
288*cdf0e10cSrcweir
289*cdf0e10cSrcweirgb_PrecompiledHeader_EXT := .gch
290*cdf0e10cSrcweir
291*cdf0e10cSrcweirgb_PrecompiledHeader_get_enableflags = -I$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR) \
292*cdf0e10cSrcweir					-DPRECOMPILED_HEADERS \
293*cdf0e10cSrcweir					-Winvalid-pch \
294*cdf0e10cSrcweir
295*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
296*cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile
297*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
298*cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
299*cdf0e10cSrcweir		$(4) $(5) \
300*cdf0e10cSrcweir		-I$(dir $(3)) \
301*cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
302*cdf0e10cSrcweir		$(3) \
303*cdf0e10cSrcweir		-f - \
304*cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
305*cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
306*cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
307*cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
308*cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
309*cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
310*cdf0e10cSrcweir	> $(call gb_PrecompiledHeader_get_dep_target,$(2)))
311*cdf0e10cSrcweirendef
312*cdf0e10cSrcweirelse
313*cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile =
314*cdf0e10cSrcweirendif
315*cdf0e10cSrcweir
316*cdf0e10cSrcweirdefine gb_PrecompiledHeader__command
317*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
318*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
319*cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
320*cdf0e10cSrcweir	$(gb_CXX) \
321*cdf0e10cSrcweir		-x c++-header \
322*cdf0e10cSrcweir		$(4) $(5) \
323*cdf0e10cSrcweir		-I$(dir $(3)) \
324*cdf0e10cSrcweir		$(6) \
325*cdf0e10cSrcweir		-c $(3) \
326*cdf0e10cSrcweir		-o$(1))
327*cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
328*cdf0e10cSrcweir
329*cdf0e10cSrcweirendef
330*cdf0e10cSrcweir
331*cdf0e10cSrcweir# NoexPrecompiledHeader class
332*cdf0e10cSrcweir
333*cdf0e10cSrcweirgb_NoexPrecompiledHeader_EXT := .gch
334*cdf0e10cSrcweir
335*cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -I$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR) \
336*cdf0e10cSrcweir					-Winvalid-pch \
337*cdf0e10cSrcweir
338*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
339*cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile
340*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
341*cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
342*cdf0e10cSrcweir		$(4) $(5) \
343*cdf0e10cSrcweir		-I$(dir $(3)) \
344*cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
345*cdf0e10cSrcweir		$(3) \
346*cdf0e10cSrcweir		-f - \
347*cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
348*cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
349*cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
350*cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
351*cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
352*cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
353*cdf0e10cSrcweir	> $(call gb_NoexPrecompiledHeader_get_dep_target,$(2)))
354*cdf0e10cSrcweirendef
355*cdf0e10cSrcweirelse
356*cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile =
357*cdf0e10cSrcweirendif
358*cdf0e10cSrcweir
359*cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command
360*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
361*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
362*cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
363*cdf0e10cSrcweir	$(gb_CXX) \
364*cdf0e10cSrcweir		-x c++-header \
365*cdf0e10cSrcweir		$(4) $(5) \
366*cdf0e10cSrcweir		-I$(dir $(3)) \
367*cdf0e10cSrcweir		$(6) \
368*cdf0e10cSrcweir		-c $(3) \
369*cdf0e10cSrcweir		-o$(1))
370*cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
371*cdf0e10cSrcweir
372*cdf0e10cSrcweirendef
373*cdf0e10cSrcweir
374*cdf0e10cSrcweir
375*cdf0e10cSrcweir# LinkTarget class
376*cdf0e10cSrcweir
377*cdf0e10cSrcweirgb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
378*cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
379*cdf0e10cSrcweir
380*cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
381*cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
382*cdf0e10cSrcweirgb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
383*cdf0e10cSrcweir
384*cdf0e10cSrcweirendif
385*cdf0e10cSrcweir
386*cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\
387*cdf0e10cSrcweir	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
388*cdf0e10cSrcweir	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
389*cdf0e10cSrcweir
390*cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
391*cdf0e10cSrcweir
392*cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinkexecutable
393*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
394*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
395*cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
396*cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
397*cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
398*cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
399*cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
400*cdf0e10cSrcweir	$(gb_LINK) \
401*cdf0e10cSrcweir		$(gb_Executable_TARGETTYPEFLAGS) \
402*cdf0e10cSrcweir		$(LDFLAGS) \
403*cdf0e10cSrcweir		$(gb_MINGWLIBDIR)/crt2.o \
404*cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtbegin.o \
405*cdf0e10cSrcweir		@$${RESPONSEFILE} \
406*cdf0e10cSrcweir		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
407*cdf0e10cSrcweir		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
408*cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtend.o \
409*cdf0e10cSrcweir		-Map $(basename $(1)).map \
410*cdf0e10cSrcweir		-o $(1))
411*cdf0e10cSrcweirendef
412*cdf0e10cSrcweir
413*cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclinklibrary
414*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
415*cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
416*cdf0e10cSrcweir	rm -f $(1) && \
417*cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
418*cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
419*cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
420*cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
421*cdf0e10cSrcweir	$(gb_LINK) \
422*cdf0e10cSrcweir		$(gb_Library_TARGETTYPEFLAGS) \
423*cdf0e10cSrcweir		$(LDFLAGS) \
424*cdf0e10cSrcweir		--enable-auto-image-base \
425*cdf0e10cSrcweir		-e _DllMainCRTStartup@12 \
426*cdf0e10cSrcweir		$(gb_MINGWLIBDIR)/dllcrt2.o \
427*cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtbegin.o \
428*cdf0e10cSrcweir		@$${RESPONSEFILE} \
429*cdf0e10cSrcweir		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
430*cdf0e10cSrcweir		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
431*cdf0e10cSrcweir		$(MINGW_CLIB_DIR)/crtend.o \
432*cdf0e10cSrcweir		-Map $(basename $(DLLTARGET)).map \
433*cdf0e10cSrcweir		-o $(DLLTARGET) && touch $(1))
434*cdf0e10cSrcweirendef
435*cdf0e10cSrcweir
436*cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlinklibrary
437*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
438*cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
439*cdf0e10cSrcweir	RESPONSEFILE=`$(gb_MKTEMP)` && \
440*cdf0e10cSrcweir	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
441*cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
442*cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
443*cdf0e10cSrcweir	$(gb_AR) -rsu\
444*cdf0e10cSrcweir		$(1) \
445*cdf0e10cSrcweir		@$${RESPONSEFILE})
446*cdf0e10cSrcweirendef
447*cdf0e10cSrcweir
448*cdf0e10cSrcweirdefine gb_LinkTarget__command
449*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
450*cdf0e10cSrcweir$(if $(filter Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
451*cdf0e10cSrcweir$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinklibrary,$(1),$(2)))
452*cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1)))
453*cdf0e10cSrcweirendef
454*cdf0e10cSrcweir
455*cdf0e10cSrcweir
456*cdf0e10cSrcweir# Library class
457*cdf0e10cSrcweir
458*cdf0e10cSrcweirgb_Library_DEFS := -D_DLL
459*cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -shared
460*cdf0e10cSrcweirgb_Library_get_rpath :=
461*cdf0e10cSrcweir
462*cdf0e10cSrcweirgb_Library_SYSPRE := i
463*cdf0e10cSrcweirgb_Library_PLAINEXT := .lib
464*cdf0e10cSrcweir
465*cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \
466*cdf0e10cSrcweir	mingwthrd \
467*cdf0e10cSrcweir	mingw32 \
468*cdf0e10cSrcweir	mingwex \
469*cdf0e10cSrcweir	$(gb_MINGW_LIBSTDCPP) \
470*cdf0e10cSrcweir	$(gb_MINGW_LIBGCC) \
471*cdf0e10cSrcweir	advapi32 \
472*cdf0e10cSrcweir	gdi32 \
473*cdf0e10cSrcweir	kernel32 \
474*cdf0e10cSrcweir	msvcrt \
475*cdf0e10cSrcweir	mpr \
476*cdf0e10cSrcweir	moldname \
477*cdf0e10cSrcweir	ole32 \
478*cdf0e10cSrcweir	oleaut32 \
479*cdf0e10cSrcweir	shell32 \
480*cdf0e10cSrcweir	unicows \
481*cdf0e10cSrcweir	user32 \
482*cdf0e10cSrcweir	uuid \
483*cdf0e10cSrcweir	uwinapi \
484*cdf0e10cSrcweir	z \
485*cdf0e10cSrcweir
486*cdf0e10cSrcweirgb_Library_LAYER := \
487*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
488*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \
489*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \
490*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
491*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
492*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \
493*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \
494*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \
495*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
496*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
497*cdf0e10cSrcweir
498*cdf0e10cSrcweirgb_Library_FILENAMES :=\
499*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
500*cdf0e10cSrcweir
501*cdf0e10cSrcweirgb_Library_DLLEXT := .dll
502*cdf0e10cSrcweirgb_Library_MAJORVER := 3
503*cdf0e10cSrcweirgb_Library_RTEXT := gcc3$(gb_Library_DLLEXT)
504*cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true))
505*cdf0e10cSrcweirgb_Library_STLEXT := port_gcc$(gb_Library_DLLEXT)
506*cdf0e10cSrcweirelse
507*cdf0e10cSrcweirgb_Library_STLEXT := port_gcc_stldebug$(gb_Library_DLLEXT)
508*cdf0e10cSrcweirendif
509*cdf0e10cSrcweirgb_Library_OOOEXT := gi$(gb_Library_DLLEXT)
510*cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
511*cdf0e10cSrcweirgb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
512*cdf0e10cSrcweirgb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT)
513*cdf0e10cSrcweir
514*cdf0e10cSrcweirgb_Library_DLLFILENAMES := \
515*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \
516*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
517*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
518*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
519*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \
520*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \
521*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
522*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
523*cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \
524*cdf0e10cSrcweir
525*cdf0e10cSrcweirgb_Library_IARCSYSPRE := lib
526*cdf0e10cSrcweirgb_Library_IARCEXT := .a
527*cdf0e10cSrcweir
528*cdf0e10cSrcweirgb_Library_ILIBEXT := .lib
529*cdf0e10cSrcweir
530*cdf0e10cSrcweirdefine gb_Library_Library_platform
531*cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
532*cdf0e10cSrcweir
533*cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
534*cdf0e10cSrcweir	$(patsubst %.dll,%.map,$(3)) \
535*cdf0e10cSrcweir)
536*cdf0e10cSrcweir
537*cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \
538*cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
539*cdf0e10cSrcweir
540*cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
541*cdf0e10cSrcweir
542*cdf0e10cSrcweirendef
543*cdf0e10cSrcweir
544*cdf0e10cSrcweirdefine gb_Library_add_default_nativeres
545*cdf0e10cSrcweir$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2))
546*cdf0e10cSrcweir$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo)
547*cdf0e10cSrcweir$(call gb_WinResTarget_set_defs,$(1)/$(2),\
548*cdf0e10cSrcweir        $$(DEFS) \
549*cdf0e10cSrcweir		-DADDITIONAL_VERINFO1 \
550*cdf0e10cSrcweir		-DADDITIONAL_VERINFO2 \
551*cdf0e10cSrcweir		-DADDITIONAL_VERINFO3 \
552*cdf0e10cSrcweir)
553*cdf0e10cSrcweir$(call gb_Library_add_nativeres,$(1),$(2))
554*cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2))
555*cdf0e10cSrcweir
556*cdf0e10cSrcweirendef
557*cdf0e10cSrcweir
558*cdf0e10cSrcweirdefine gb_Library_add_nativeres
559*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2))
560*cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2))
561*cdf0e10cSrcweir
562*cdf0e10cSrcweirendef
563*cdf0e10cSrcweir
564*cdf0e10cSrcweirdefine gb_Library_get_dllname
565*cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
566*cdf0e10cSrcweirendef
567*cdf0e10cSrcweir
568*cdf0e10cSrcweir
569*cdf0e10cSrcweir# StaticLibrary class
570*cdf0e10cSrcweir
571*cdf0e10cSrcweirgb_StaticLibrary_DEFS :=
572*cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := lib
573*cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .a
574*cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
575*cdf0e10cSrcweir
576*cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \
577*cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
578*cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
579*cdf0e10cSrcweir
580*cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES))
581*cdf0e10cSrcweir
582*cdf0e10cSrcweirgb_StaticLibrary_StaticLibrary_platform =
583*cdf0e10cSrcweir
584*cdf0e10cSrcweir# Executable class
585*cdf0e10cSrcweir
586*cdf0e10cSrcweirgb_Executable_EXT := .exe
587*cdf0e10cSrcweirgb_Executable_TARGETTYPEFLAGS :=
588*cdf0e10cSrcweirgb_Executable_get_rpath :=
589*cdf0e10cSrcweirgb_Executable_Executable_platform =
590*cdf0e10cSrcweir
591*cdf0e10cSrcweir
592*cdf0e10cSrcweir# CppunitTest class
593*cdf0e10cSrcweir
594*cdf0e10cSrcweirgb_CppunitTest_CPPTESTPRECOMMAND :=
595*cdf0e10cSrcweirgb_CppunitTest_SYSPRE := itest_
596*cdf0e10cSrcweirgb_CppunitTest_EXT := .lib
597*cdf0e10cSrcweirgb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
598*cdf0e10cSrcweirgb_CppunitTest_get_libfilename = test_$(1).dll
599*cdf0e10cSrcweir
600*cdf0e10cSrcweirdefine gb_CppunitTest_CppunitTest_platform
601*cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
602*cdf0e10cSrcweir
603*cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
604*cdf0e10cSrcweir	$(patsubst %.dll,%.map,$(3)) \
605*cdf0e10cSrcweir)
606*cdf0e10cSrcweir
607*cdf0e10cSrcweirendef
608*cdf0e10cSrcweir
609*cdf0e10cSrcweir# SdiTarget class
610*cdf0e10cSrcweir
611*cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
612*cdf0e10cSrcweir
613*cdf0e10cSrcweir# SrsPartMergeTarget
614*cdf0e10cSrcweir
615*cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
616*cdf0e10cSrcweir
617*cdf0e10cSrcweir# SrsPartTarget class
618*cdf0e10cSrcweir
619*cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
620*cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
621*cdf0e10cSrcweir
622*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
623*cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep
624*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
625*cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
626*cdf0e10cSrcweir		$(INCLUDE) \
627*cdf0e10cSrcweir		$(DEFS) \
628*cdf0e10cSrcweir		$(2) \
629*cdf0e10cSrcweir		-f - \
630*cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
631*cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
632*cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
633*cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
634*cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
635*cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
636*cdf0e10cSrcweir	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
637*cdf0e10cSrcweirendef
638*cdf0e10cSrcweirelse
639*cdf0e10cSrcweirgb_SrsPartTarget__command_dep =
640*cdf0e10cSrcweirendif
641*cdf0e10cSrcweir
642*cdf0e10cSrcweir# WinResTarget class
643*cdf0e10cSrcweir
644*cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=_res.o
645*cdf0e10cSrcweir
646*cdf0e10cSrcweirdefine gb_WinResTarget__command
647*cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3)
648*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
649*cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
650*cdf0e10cSrcweir	$(gb_RC) \
651*cdf0e10cSrcweir		$(DEFS) $(FLAGS) \
652*cdf0e10cSrcweir		-I$(dir $(3)) \
653*cdf0e10cSrcweir		$(INCLUDE) \
654*cdf0e10cSrcweir		-Fo$(patsubst %_res.o,%.res,$(1)) \
655*cdf0e10cSrcweir        $(RCFILE) )
656*cdf0e10cSrcweir    windres $(patsubst %_res.o,%.res,$(1)) $(1)
657*cdf0e10cSrcweir	rm $(patsubst %_res.o,%.res,$(1))
658*cdf0e10cSrcweirendef
659*cdf0e10cSrcweir
660*cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\
661*cdf0e10cSrcweir	WinResTarget \
662*cdf0e10cSrcweir))
663*cdf0e10cSrcweir
664*cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
665*cdf0e10cSrcweirdefine gb_WinResTarget__command_dep
666*cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
667*cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
668*cdf0e10cSrcweir		$(INCLUDE) \
669*cdf0e10cSrcweir		$(DEFS) \
670*cdf0e10cSrcweir		$(2) \
671*cdf0e10cSrcweir		-f - \
672*cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
673*cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \
674*cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
675*cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
676*cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
677*cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
678*cdf0e10cSrcweir	> $(call gb_WinResTarget_get_dep_target,$(1)))
679*cdf0e10cSrcweirendef
680*cdf0e10cSrcweirelse
681*cdf0e10cSrcweirgb_WinResTarget__command_dep =
682*cdf0e10cSrcweirendif
683*cdf0e10cSrcweir
684*cdf0e10cSrcweir# ComponentTarget
685*cdf0e10cSrcweir
686*cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
687*cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \
688*cdf0e10cSrcweir    OOO:vnd.sun.star.expand:\dBRAND_BASE_DIR/program/ \
689*cdf0e10cSrcweir    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
690*cdf0e10cSrcweir
691*cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
692