xref: /aoo41x/main/solenv/gbuild/platform/os2.mk (revision f0a50dfa)
1*f0a50dfaSPedro Giffuni#*************************************************************************
2*f0a50dfaSPedro Giffuni#
3*f0a50dfaSPedro Giffuni# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*f0a50dfaSPedro Giffuni#
5*f0a50dfaSPedro Giffuni# Copyright 2000, 2011 Oracle and/or its affiliates.
6*f0a50dfaSPedro Giffuni#
7*f0a50dfaSPedro Giffuni# OpenOffice.org - a multi-platform office productivity suite
8*f0a50dfaSPedro Giffuni#
9*f0a50dfaSPedro Giffuni# This file is part of OpenOffice.org.
10*f0a50dfaSPedro Giffuni#
11*f0a50dfaSPedro Giffuni# OpenOffice.org is free software: you can redistribute it and/or modify
12*f0a50dfaSPedro Giffuni# it under the terms of the GNU Lesser General Public License version 3
13*f0a50dfaSPedro Giffuni# only, as published by the Free Software Foundation.
14*f0a50dfaSPedro Giffuni#
15*f0a50dfaSPedro Giffuni# OpenOffice.org is distributed in the hope that it will be useful,
16*f0a50dfaSPedro Giffuni# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*f0a50dfaSPedro Giffuni# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*f0a50dfaSPedro Giffuni# GNU Lesser General Public License version 3 for more details
19*f0a50dfaSPedro Giffuni# (a copy is included in the LICENSE file that accompanied this code).
20*f0a50dfaSPedro Giffuni#
21*f0a50dfaSPedro Giffuni# You should have received a copy of the GNU Lesser General Public License
22*f0a50dfaSPedro Giffuni# version 3 along with OpenOffice.org.  If not, see
23*f0a50dfaSPedro Giffuni# <http://www.openoffice.org/license.html>
24*f0a50dfaSPedro Giffuni# for a copy of the LGPLv3 License.
25*f0a50dfaSPedro Giffuni#
26*f0a50dfaSPedro Giffuni#*************************************************************************
27*f0a50dfaSPedro Giffuni
28*f0a50dfaSPedro Giffuniinclude $(GBUILDDIR)/gmsl
29*f0a50dfaSPedro Giffuni
30*f0a50dfaSPedro GiffuniGUI := OS2
31*f0a50dfaSPedro GiffuniCOM := GCC
32*f0a50dfaSPedro Giffuni
33*f0a50dfaSPedro Giffuni# set tmpdir to some mixed case path, suitable for native tools
34*f0a50dfaSPedro Giffuni#gb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp))
35*f0a50dfaSPedro Giffuni#gb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
36*f0a50dfaSPedro Giffunigb_MKTEMP := mktemp -t gbuild.XXXXXX
37*f0a50dfaSPedro Giffuni
38*f0a50dfaSPedro Giffunigb_CC := gcc
39*f0a50dfaSPedro Giffunigb_CXX := g++
40*f0a50dfaSPedro Giffunigb_GCCP := gcc
41*f0a50dfaSPedro Giffunigb_LINK := gcc
42*f0a50dfaSPedro Giffunigb_AR := emxomfar
43*f0a50dfaSPedro Giffunigb_AWK := awk
44*f0a50dfaSPedro Giffunigb_CLASSPATHSEP := ;
45*f0a50dfaSPedro Giffunigb_RC := wrc
46*f0a50dfaSPedro Giffuni
47*f0a50dfaSPedro Giffuni# use CC/CXX if they are nondefaults
48*f0a50dfaSPedro Giffuniifneq ($(origin CC),default)
49*f0a50dfaSPedro Giffunigb_CC := $(CC)
50*f0a50dfaSPedro Giffunigb_GCCP := $(CC)
51*f0a50dfaSPedro Giffuniendif
52*f0a50dfaSPedro Giffuniifneq ($(origin CXX),default)
53*f0a50dfaSPedro Giffunigb_CXX := $(CXX)
54*f0a50dfaSPedro Giffuniendif
55*f0a50dfaSPedro Giffuni
56*f0a50dfaSPedro Giffunigb_OSDEFS := \
57*f0a50dfaSPedro Giffuni	-D$(OS) \
58*f0a50dfaSPedro Giffuni	-D_PTHREADS \
59*f0a50dfaSPedro Giffuni	-DOS2 \
60*f0a50dfaSPedro Giffuni	$(PTHREAD_CFLAGS) \
61*f0a50dfaSPedro Giffuni
62*f0a50dfaSPedro Giffuniifeq ($(GXX_INCLUDE_PATH),)
63*f0a50dfaSPedro GiffuniGXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
64*f0a50dfaSPedro Giffuniendif
65*f0a50dfaSPedro Giffuni
66*f0a50dfaSPedro Giffunigb_COMPILERDEFS := \
67*f0a50dfaSPedro Giffuni	-D$(COM) \
68*f0a50dfaSPedro Giffuni	-DHAVE_GCC_VISIBILITY_FEATURE \
69*f0a50dfaSPedro Giffuni	-DCPPU_ENV=gcc3 \
70*f0a50dfaSPedro Giffuni	-DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
71*f0a50dfaSPedro Giffuni
72*f0a50dfaSPedro Giffunigb_CPUDEFS := -DINTEL -D_X86_=1 -DX86
73*f0a50dfaSPedro Giffuni
74*f0a50dfaSPedro Giffunigb_RCDEFS := \
75*f0a50dfaSPedro Giffuni	-DOS2 \
76*f0a50dfaSPedro Giffuni	-bt=os2 \
77*f0a50dfaSPedro Giffuni	-i$(PATH_EMXPGCC)\include \
78*f0a50dfaSPedro Giffuni
79*f0a50dfaSPedro Giffunigb_RCFLAGS := \
80*f0a50dfaSPedro Giffuni     -V
81*f0a50dfaSPedro Giffuni
82*f0a50dfaSPedro Giffunigb_CFLAGS := \
83*f0a50dfaSPedro Giffuni	-Zomf \
84*f0a50dfaSPedro Giffuni	-Wall \
85*f0a50dfaSPedro Giffuni	-Wendif-labels \
86*f0a50dfaSPedro Giffuni	-Wextra \
87*f0a50dfaSPedro Giffuni	-Wshadow \
88*f0a50dfaSPedro Giffuni	-fmessage-length=0 \
89*f0a50dfaSPedro Giffuni	-fno-common \
90*f0a50dfaSPedro Giffuni	-fno-strict-aliasing \
91*f0a50dfaSPedro Giffuni	-I$(JAVA_HOME)/include \
92*f0a50dfaSPedro Giffuni	-I$(JAVA_HOME)/include/os2
93*f0a50dfaSPedro Giffuni
94*f0a50dfaSPedro Giffuni
95*f0a50dfaSPedro Giffuni#	-fvisibility=hidden \
96*f0a50dfaSPedro Giffuni#
97*f0a50dfaSPedro Giffuni
98*f0a50dfaSPedro Giffunigb_CXXFLAGS := \
99*f0a50dfaSPedro Giffuni	-Zomf \
100*f0a50dfaSPedro Giffuni	-Wall \
101*f0a50dfaSPedro Giffuni	-Wendif-labels \
102*f0a50dfaSPedro Giffuni	-Wextra \
103*f0a50dfaSPedro Giffuni	-Wno-ctor-dtor-privacy \
104*f0a50dfaSPedro Giffuni	-Wno-non-virtual-dtor \
105*f0a50dfaSPedro Giffuni	-Wshadow \
106*f0a50dfaSPedro Giffuni	-fmessage-length=0 \
107*f0a50dfaSPedro Giffuni	-fno-common \
108*f0a50dfaSPedro Giffuni	-fno-strict-aliasing \
109*f0a50dfaSPedro Giffuni	-fno-use-cxa-atexit \
110*f0a50dfaSPedro Giffuni	-I$(JAVA_HOME)/include \
111*f0a50dfaSPedro Giffuni	-I$(JAVA_HOME)/include/os2
112*f0a50dfaSPedro Giffuni
113*f0a50dfaSPedro Giffuni#	-fvisibility-inlines-hidden \
114*f0a50dfaSPedro Giffuni#	-fvisibility=hidden \
115*f0a50dfaSPedro Giffuni#
116*f0a50dfaSPedro Giffuni
117*f0a50dfaSPedro Giffunigb_STDLIBS = \
118*f0a50dfaSPedro Giffuni	stdc444 \
119*f0a50dfaSPedro Giffuni
120*f0a50dfaSPedro Giffuniifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
121*f0a50dfaSPedro Giffunigb_CFLAGS_WERROR := -Werror
122*f0a50dfaSPedro Giffunigb_CXXFLAGS_WERROR := -Werror
123*f0a50dfaSPedro Giffuniendif
124*f0a50dfaSPedro Giffuni
125*f0a50dfaSPedro Giffunigb_LinkTarget_EXCEPTIONFLAGS := \
126*f0a50dfaSPedro Giffuni	-DEXCEPTIONS_ON \
127*f0a50dfaSPedro Giffuni	-fexceptions \
128*f0a50dfaSPedro Giffuni	-fno-enforce-eh-specs \
129*f0a50dfaSPedro Giffuni
130*f0a50dfaSPedro Giffunigb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
131*f0a50dfaSPedro Giffuni
132*f0a50dfaSPedro Giffunigb_LinkTarget_NOEXCEPTIONFLAGS := \
133*f0a50dfaSPedro Giffuni	-DEXCEPTIONS_OFF \
134*f0a50dfaSPedro Giffuni	-fno-exceptions \
135*f0a50dfaSPedro Giffuni
136*f0a50dfaSPedro Giffunigb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
137*f0a50dfaSPedro Giffuni
138*f0a50dfaSPedro Giffuni
139*f0a50dfaSPedro Giffunigb_LinkTarget_LDFLAGS := \
140*f0a50dfaSPedro Giffuni	-g -Zomf \
141*f0a50dfaSPedro Giffuni	-Zhigh-mem \
142*f0a50dfaSPedro Giffuni	-Zlinker "DISABLE 1121" \
143*f0a50dfaSPedro Giffuni	-Zmap \
144*f0a50dfaSPedro Giffuni	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
145*f0a50dfaSPedro Giffuni	$(subst -L../lib , ,$(SOLARLIB)) \
146*f0a50dfaSPedro Giffuni
147*f0a50dfaSPedro Giffuniifneq ($(ENABLE_CRASHDUMP),)
148*f0a50dfaSPedro Giffunigb_LinkTarget_LDFLAGS += -DEBUG
149*f0a50dfaSPedro Giffunigb_CFLAGS+=-Zi
150*f0a50dfaSPedro Giffunigb_CXXFLAGS+=-Zi
151*f0a50dfaSPedro Giffuniendif
152*f0a50dfaSPedro Giffuni
153*f0a50dfaSPedro Giffuniifeq ($(gb_DEBUGLEVEL),2)
154*f0a50dfaSPedro Giffunigb_COMPILEROPTFLAGS := -O0
155*f0a50dfaSPedro Giffuni#gb_LinkTarget_LDFLAGS += -DEBUG
156*f0a50dfaSPedro Giffunielse
157*f0a50dfaSPedro Giffunigb_COMPILEROPTFLAGS := -Os
158*f0a50dfaSPedro Giffuniendif
159*f0a50dfaSPedro Giffuni
160*f0a50dfaSPedro Giffunigb_COMPILERNOOPTFLAGS := -O0
161*f0a50dfaSPedro Giffuni
162*f0a50dfaSPedro Giffuni
163*f0a50dfaSPedro Giffuni# Helper class
164*f0a50dfaSPedro Giffuni
165*f0a50dfaSPedro Giffunigb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
166*f0a50dfaSPedro Giffuni
167*f0a50dfaSPedro Giffuni# convert parametters filesystem root to native notation
168*f0a50dfaSPedro Giffuni# does some real work only on windows, make sure not to
169*f0a50dfaSPedro Giffuni# break the dummy implementations on unx*
170*f0a50dfaSPedro Giffunidefine gb_Helper_convert_native
171*f0a50dfaSPedro Giffuni$(1)
172*f0a50dfaSPedro Giffuniendef
173*f0a50dfaSPedro Giffuni
174*f0a50dfaSPedro Giffuni
175*f0a50dfaSPedro Giffuni# CObject class
176*f0a50dfaSPedro Giffuni
177*f0a50dfaSPedro Giffunidefine gb_CObject__command
178*f0a50dfaSPedro Giffuni$(call gb_Output_announce,$(2),$(true),C  ,3)
179*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs,\
180*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(1)) && \
181*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \
182*f0a50dfaSPedro Giffuni	$(gb_CC) \
183*f0a50dfaSPedro Giffuni		$(DEFS) $(CFLAGS) \
184*f0a50dfaSPedro Giffuni		-c $(3) \
185*f0a50dfaSPedro Giffuni		-o $(1) \
186*f0a50dfaSPedro Giffuni		-MMD -MT $(call gb_CObject_get_target,$(2)) \
187*f0a50dfaSPedro Giffuni		-MF $(call gb_CObject_get_dep_target,$(2)) \
188*f0a50dfaSPedro Giffuni		-I$(dir $(3)) \
189*f0a50dfaSPedro Giffuni		$(INCLUDE))
190*f0a50dfaSPedro Giffuniendef
191*f0a50dfaSPedro Giffuni
192*f0a50dfaSPedro Giffuni
193*f0a50dfaSPedro Giffuni# CxxObject class
194*f0a50dfaSPedro Giffuni
195*f0a50dfaSPedro Giffunidefine gb_CxxObject__command
196*f0a50dfaSPedro Giffuni$(call gb_Output_announce,$(2),$(true),CXX,3)
197*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs,\
198*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(1)) && \
199*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
200*f0a50dfaSPedro Giffuni	$(gb_CXX) \
201*f0a50dfaSPedro Giffuni		$(DEFS) $(CXXFLAGS) \
202*f0a50dfaSPedro Giffuni		-c $(3) \
203*f0a50dfaSPedro Giffuni		-o $(1) \
204*f0a50dfaSPedro Giffuni		-MMD -MT $(call gb_CxxObject_get_target,$(2)) \
205*f0a50dfaSPedro Giffuni		-MF $(call gb_CxxObject_get_dep_target,$(2)) \
206*f0a50dfaSPedro Giffuni		-I$(dir $(3)) \
207*f0a50dfaSPedro Giffuni		$(INCLUDE_STL) $(INCLUDE))
208*f0a50dfaSPedro Giffuniendef
209*f0a50dfaSPedro Giffuni
210*f0a50dfaSPedro Giffuni
211*f0a50dfaSPedro Giffuni# PrecompiledHeader class
212*f0a50dfaSPedro Giffuni
213*f0a50dfaSPedro Giffunigb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \
214*f0a50dfaSPedro Giffuni									   -Fp$(call gb_PrecompiledHeader_get_target,$(1))
215*f0a50dfaSPedro Giffuni
216*f0a50dfaSPedro Giffuniifeq ($(gb_FULLDEPS),$(true))
217*f0a50dfaSPedro Giffunidefine gb_PrecompiledHeader__command_deponcompile
218*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
219*f0a50dfaSPedro Giffuni	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
220*f0a50dfaSPedro Giffuni		$(4) $(5) \
221*f0a50dfaSPedro Giffuni		-I$(dir $(3)) \
222*f0a50dfaSPedro Giffuni		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
223*f0a50dfaSPedro Giffuni		$(3) \
224*f0a50dfaSPedro Giffuni		-f - \
225*f0a50dfaSPedro Giffuni	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
226*f0a50dfaSPedro Giffuni		-v OBJECTFILE=$(1) \
227*f0a50dfaSPedro Giffuni		-v OUTDIR=$(OUTDIR)/ \
228*f0a50dfaSPedro Giffuni		-v WORKDIR=$(WORKDIR)/ \
229*f0a50dfaSPedro Giffuni		-v SRCDIR=$(SRCDIR)/ \
230*f0a50dfaSPedro Giffuni		-v REPODIR=$(REPODIR)/ \
231*f0a50dfaSPedro Giffuni	> $(call gb_PrecompiledHeader_get_dep_target,$(2)))
232*f0a50dfaSPedro Giffuniendef
233*f0a50dfaSPedro Giffunielse
234*f0a50dfaSPedro Giffunigb_PrecompiledHeader__command_deponcompile =
235*f0a50dfaSPedro Giffuniendif
236*f0a50dfaSPedro Giffuni
237*f0a50dfaSPedro Giffuni
238*f0a50dfaSPedro Giffunidefine gb_PrecompiledHeader__command
239*f0a50dfaSPedro Giffuni$(call gb_Output_announce,$(2),$(true),PCH,1)
240*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
241*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
242*f0a50dfaSPedro Giffuni	unset INCLUDE && \
243*f0a50dfaSPedro Giffuni	$(gb_CXX) \
244*f0a50dfaSPedro Giffuni		$(4) $(5) -Fd$(PDBFILE) \
245*f0a50dfaSPedro Giffuni		-I$(dir $(3)) \
246*f0a50dfaSPedro Giffuni		$(6) \
247*f0a50dfaSPedro Giffuni		-c $(3) \
248*f0a50dfaSPedro Giffuni		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
249*f0a50dfaSPedro Giffuni$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
250*f0a50dfaSPedro Giffuniendef
251*f0a50dfaSPedro Giffuni
252*f0a50dfaSPedro Giffuni# NoexPrecompiledHeader class
253*f0a50dfaSPedro Giffuni
254*f0a50dfaSPedro Giffunigb_NoexPrecompiledHeader_get_enableflags = -Yu$(1).hxx \
255*f0a50dfaSPedro Giffuni										   -Fp$(call gb_NoexPrecompiledHeader_get_target,$(1))
256*f0a50dfaSPedro Giffuni
257*f0a50dfaSPedro Giffuniifeq ($(gb_FULLDEPS),$(true))
258*f0a50dfaSPedro Giffunidefine gb_NoexPrecompiledHeader__command_deponcompile
259*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
260*f0a50dfaSPedro Giffuni	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
261*f0a50dfaSPedro Giffuni		$(4) $(5) \
262*f0a50dfaSPedro Giffuni		-I$(dir $(3)) \
263*f0a50dfaSPedro Giffuni		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
264*f0a50dfaSPedro Giffuni		$(3) \
265*f0a50dfaSPedro Giffuni		-f - \
266*f0a50dfaSPedro Giffuni	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
267*f0a50dfaSPedro Giffuni		-v OBJECTFILE=$(1) \
268*f0a50dfaSPedro Giffuni		-v OUTDIR=$(OUTDIR)/ \
269*f0a50dfaSPedro Giffuni		-v WORKDIR=$(WORKDIR)/ \
270*f0a50dfaSPedro Giffuni		-v SRCDIR=$(SRCDIR)/ \
271*f0a50dfaSPedro Giffuni		-v REPODIR=$(REPODIR)/ \
272*f0a50dfaSPedro Giffuni	> $(call gb_NoexPrecompiledHeader_get_dep_target,$(2)))
273*f0a50dfaSPedro Giffuniendef
274*f0a50dfaSPedro Giffunielse
275*f0a50dfaSPedro Giffunigb_NoexPrecompiledHeader__command_deponcompile =
276*f0a50dfaSPedro Giffuniendif
277*f0a50dfaSPedro Giffuni
278*f0a50dfaSPedro Giffuni
279*f0a50dfaSPedro Giffunidefine gb_NoexPrecompiledHeader__command
280*f0a50dfaSPedro Giffuni$(call gb_Output_announce,$(2),$(true),PCH,1)
281*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
282*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
283*f0a50dfaSPedro Giffuni	unset INCLUDE && \
284*f0a50dfaSPedro Giffuni	$(gb_CXX) \
285*f0a50dfaSPedro Giffuni		$(4) $(5) -Fd$(PDBFILE) \
286*f0a50dfaSPedro Giffuni		-I$(dir $(3)) \
287*f0a50dfaSPedro Giffuni		$(6) \
288*f0a50dfaSPedro Giffuni		-c $(3) \
289*f0a50dfaSPedro Giffuni		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
290*f0a50dfaSPedro Giffuni$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
291*f0a50dfaSPedro Giffuniendef
292*f0a50dfaSPedro Giffuni
293*f0a50dfaSPedro Giffuni# LinkTarget class
294*f0a50dfaSPedro Giffuni
295*f0a50dfaSPedro Giffunigb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
296*f0a50dfaSPedro Giffunigb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
297*f0a50dfaSPedro Giffuni
298*f0a50dfaSPedro Giffuniifeq ($(gb_DEBUGLEVEL),2)
299*f0a50dfaSPedro Giffunigb_LinkTarget_CFLAGS += -g
300*f0a50dfaSPedro Giffunigb_LinkTarget_CXXFLAGS += -g
301*f0a50dfaSPedro Giffunigb_LinkTarget_OBJCXXFLAGS += -g
302*f0a50dfaSPedro Giffuniendif
303*f0a50dfaSPedro Giffuni
304*f0a50dfaSPedro Giffunigb_LinkTarget_INCLUDE :=\
305*f0a50dfaSPedro Giffuni	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
306*f0a50dfaSPedro Giffuni	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
307*f0a50dfaSPedro Giffuni
308*f0a50dfaSPedro Giffunigb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
309*f0a50dfaSPedro Giffuni
310*f0a50dfaSPedro Giffunigb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
311*f0a50dfaSPedro Giffuni
312*f0a50dfaSPedro GiffuniDLLBASE8 = $(call substr,$(notdir $(DLLTARGET:.dll=)),1,8)
313*f0a50dfaSPedro GiffuniDLLTARGET8 = $(dir $(DLLTARGET))$(DLLBASE8)$(gb_Library_DLLEXT)
314*f0a50dfaSPedro GiffuniDLLDEF8 = $(dir $(DLLTARGET))$(DLLBASE8).def
315*f0a50dfaSPedro Giffuni
316*f0a50dfaSPedro Giffuni	#EMXEXPRSP=$(call var2filecr,$(shell $(gb_MKTEMP)),1, \
317*f0a50dfaSPedro Giffuni		$(call gb_Helper_convert_native,$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
318*f0a50dfaSPedro Giffuni		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
319*f0a50dfaSPedro Giffuni		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object)))) \
320*f0a50dfaSPedro Giffuni		) && \
321*f0a50dfaSPedro Giffuni	emxexp @$${EMXEXPRSP} >> $(DLLDEF8) && \
322*f0a50dfaSPedro Giffuni	echo EXPORTS		>> $(DLLDEF8) && \
323*f0a50dfaSPedro Giffuni
324*f0a50dfaSPedro Giffuni
325*f0a50dfaSPedro Giffunidefine gb_LinkTarget__command_dynamiclinkexecutable
326*f0a50dfaSPedro Giffuni$(call gb_Output_announce,$(2),$(true),LNK,4)
327*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
328*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(1)) && \
329*f0a50dfaSPedro Giffuni	rm -f $(1) && \
330*f0a50dfaSPedro Giffuni	$(if $(DLLTARGET), echo LIBRARY	  $(DLLBASE8) INITINSTANCE TERMINSTANCE	 > $(DLLDEF8) &&) \
331*f0a50dfaSPedro Giffuni	$(if $(DLLTARGET), echo DATA MULTIPLE	>> $(DLLDEF8) &&) \
332*f0a50dfaSPedro Giffuni	RESPONSEFILE=$(call var2filecr,$(shell $(gb_MKTEMP)),1, \
333*f0a50dfaSPedro Giffuni	    $(call gb_Helper_convert_native,$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
334*f0a50dfaSPedro Giffuni		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
335*f0a50dfaSPedro Giffuni		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
336*f0a50dfaSPedro Giffuni		$(PCHOBJS))) && \
337*f0a50dfaSPedro Giffuni	$(gb_LINK) \
338*f0a50dfaSPedro Giffuni		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
339*f0a50dfaSPedro Giffuni		$(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \
340*f0a50dfaSPedro Giffuni		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
341*f0a50dfaSPedro Giffuni		$(LDFLAGS) \
342*f0a50dfaSPedro Giffuni		@$${RESPONSEFILE} \
343*f0a50dfaSPedro Giffuni		$(if $(DLLTARGET), $(DLLDEF8)) \
344*f0a50dfaSPedro Giffuni		$(NATIVERES) \
345*f0a50dfaSPedro Giffuni		$(patsubst %.lib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
346*f0a50dfaSPedro Giffuni		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
347*f0a50dfaSPedro Giffuni		$(if $(DLLTARGET),-o $(DLLTARGET8), -o $(1) ); \
348*f0a50dfaSPedro Giffuni		RC=$$?; rm $${RESPONSEFILE} \
349*f0a50dfaSPedro Giffuni	$(if $(DLLTARGET),; emximp -p2048 -o $(1) $(DLLTARGET8) ) \
350*f0a50dfaSPedro Giffuni	$(if $(DLLTARGET),; cp -p $(DLLTARGET8) $(DLLTARGET)) \
351*f0a50dfaSPedro Giffuni	$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC)
352*f0a50dfaSPedro Giffuniendef
353*f0a50dfaSPedro Giffuni
354*f0a50dfaSPedro Giffuni
355*f0a50dfaSPedro Giffunidefine gb_LinkTarget__command_staticlinklibrary
356*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
357*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(1)) && \
358*f0a50dfaSPedro Giffuni	RESPONSEFILE=`$(gb_MKTEMP)` && \
359*f0a50dfaSPedro Giffuni	echo "$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
360*f0a50dfaSPedro Giffuni		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
361*f0a50dfaSPedro Giffuni		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
362*f0a50dfaSPedro Giffuni	$(gb_AR) cru\
363*f0a50dfaSPedro Giffuni		$(1) \
364*f0a50dfaSPedro Giffuni		@$${RESPONSEFILE})
365*f0a50dfaSPedro Giffuniendef
366*f0a50dfaSPedro Giffuni
367*f0a50dfaSPedro Giffunidefine gb_LinkTarget__command
368*f0a50dfaSPedro Giffuni$(call gb_Output_announce,$(2),$(true),LNK,4)
369*f0a50dfaSPedro Giffuni$(if $(filter Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
370*f0a50dfaSPedro Giffuni$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
371*f0a50dfaSPedro Giffuni$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1)))
372*f0a50dfaSPedro Giffuniendef
373*f0a50dfaSPedro Giffuni
374*f0a50dfaSPedro Giffuni
375*f0a50dfaSPedro Giffuni# Library class
376*f0a50dfaSPedro Giffuni
377*f0a50dfaSPedro Giffunigb_Library_DEFS := -D_DLL
378*f0a50dfaSPedro Giffunigb_Library_TARGETTYPEFLAGS := -Zdll
379*f0a50dfaSPedro Giffunigb_Library_get_rpath :=
380*f0a50dfaSPedro Giffuni
381*f0a50dfaSPedro Giffunigb_Library_SYSPRE := i
382*f0a50dfaSPedro Giffunigb_Library_PLAINEXT := .lib
383*f0a50dfaSPedro Giffuni
384*f0a50dfaSPedro Giffunigb_Library_PLAINLIBS_NONE += \
385*f0a50dfaSPedro Giffuni	$(gb_STDLIBS) \
386*f0a50dfaSPedro Giffuni	ft2lib \
387*f0a50dfaSPedro Giffuni	dl \
388*f0a50dfaSPedro Giffuni	freetype \
389*f0a50dfaSPedro Giffuni	jpeg \
390*f0a50dfaSPedro Giffuni	m \
391*f0a50dfaSPedro Giffuni	z \
392*f0a50dfaSPedro Giffuni	pthread
393*f0a50dfaSPedro Giffuni
394*f0a50dfaSPedro Giffunigb_Library_LAYER := \
395*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
396*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \
397*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \
398*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
399*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
400*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \
401*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \
402*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \
403*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
404*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
405*f0a50dfaSPedro Giffuni
406*f0a50dfaSPedro Giffunigb_Library_FILENAMES :=\
407*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
408*f0a50dfaSPedro Giffuni
409*f0a50dfaSPedro Giffunigb_Library_DLLEXT := .dll
410*f0a50dfaSPedro Giffunigb_Library_MAJORVER :=
411*f0a50dfaSPedro Giffunigb_Library_RTEXT := $(gb_Library_DLLEXT)
412*f0a50dfaSPedro Giffuniifeq ($(gb_PRODUCT),$(true))
413*f0a50dfaSPedro Giffunigb_Library_STLEXT := stlp45$(gb_Library_DLLEXT)
414*f0a50dfaSPedro Giffunielse
415*f0a50dfaSPedro Giffunigb_Library_STLEXT := stlp45_stldebug$(gb_Library_DLLEXT)
416*f0a50dfaSPedro Giffuniendif
417*f0a50dfaSPedro Giffunigb_Library_OOOEXT := $(gb_Library_DLLEXT)
418*f0a50dfaSPedro Giffunigb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
419*f0a50dfaSPedro Giffunigb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
420*f0a50dfaSPedro Giffunigb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT)
421*f0a50dfaSPedro Giffuni
422*f0a50dfaSPedro Giffunigb_Library_DLLFILENAMES :=\
423*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \
424*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
425*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
426*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
427*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \
428*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \
429*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_STLLIBS),$(lib):$(lib)$(gb_Library_STLEXT)) \
430*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
431*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
432*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \
433*f0a50dfaSPedro Giffuni
434*f0a50dfaSPedro Giffunidefine gb_Library_Library_platform
435*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
436*f0a50dfaSPedro Giffuni
437*f0a50dfaSPedro Giffuni#$(call gb_LinkTarget_set_auxtargets,$(2),\
438*f0a50dfaSPedro Giffuni	$(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \
439*f0a50dfaSPedro Giffuni	$(3).manifest \
440*f0a50dfaSPedro Giffuni	$(call gb_LinkTarget_get_pdbfile,$(2)) \
441*f0a50dfaSPedro Giffuni	$(patsubst %.dll,%.pdb,$(3)) \
442*f0a50dfaSPedro Giffuni	$(patsubst %.dll,%.ilk,$(3)) \
443*f0a50dfaSPedro Giffuni)
444*f0a50dfaSPedro Giffuni
445*f0a50dfaSPedro Giffuni$(call gb_Library_get_target,$(1)) \
446*f0a50dfaSPedro Giffuni$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
447*f0a50dfaSPedro Giffuni
448*f0a50dfaSPedro Giffuniifneq ($(ENABLE_CRASHDUMP),)
449*f0a50dfaSPedro Giffuni$(call gb_Library_get_target,$(1)) \
450*f0a50dfaSPedro Giffuni$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS +=  \
451*f0a50dfaSPedro Giffuni		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \
452*f0a50dfaSPedro Giffuni		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \
453*f0a50dfaSPedro Giffuni
454*f0a50dfaSPedro Giffuni$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))),$(patsubst %.dll,%.pdb,$(3)))
455*f0a50dfaSPedro Giffuni$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))),$(patsubst %.dll,%.ilk,$(3)))
456*f0a50dfaSPedro Giffuniendif
457*f0a50dfaSPedro Giffuni
458*f0a50dfaSPedro Giffuni$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
459*f0a50dfaSPedro Giffuni
460*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_get_target,$(2)) \
461*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
462*f0a50dfaSPedro Giffuni
463*f0a50dfaSPedro Giffuniendef
464*f0a50dfaSPedro Giffuni
465*f0a50dfaSPedro Giffunidefine gb_Library_add_default_nativeres_DISABLED
466*f0a50dfaSPedro Giffuni$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2))
467*f0a50dfaSPedro Giffuni$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo)
468*f0a50dfaSPedro Giffuni$(call gb_WinResTarget_set_defs,$(1)/$(2),\
469*f0a50dfaSPedro Giffuni        $$(DEFS) \
470*f0a50dfaSPedro Giffuni		-DADDITIONAL_VERINFO1 \
471*f0a50dfaSPedro Giffuni		-DADDITIONAL_VERINFO2 \
472*f0a50dfaSPedro Giffuni		-DADDITIONAL_VERINFO3 \
473*f0a50dfaSPedro Giffuni)
474*f0a50dfaSPedro Giffuni$(call gb_Library_add_nativeres,$(1),$(2))
475*f0a50dfaSPedro Giffuni$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2))
476*f0a50dfaSPedro Giffuni
477*f0a50dfaSPedro Giffuniendef
478*f0a50dfaSPedro Giffuni
479*f0a50dfaSPedro Giffunidefine gb_Library_add_nativeres
480*f0a50dfaSPedro Giffuni$(info info $(1)/$(2))
481*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2))
482*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2))
483*f0a50dfaSPedro Giffuni$(info NATIVERES $(NATIVERES))
484*f0a50dfaSPedro Giffuni
485*f0a50dfaSPedro Giffuniendef
486*f0a50dfaSPedro Giffuni
487*f0a50dfaSPedro Giffunidefine gb_Library_get_dllname
488*f0a50dfaSPedro Giffuni$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
489*f0a50dfaSPedro Giffuniendef
490*f0a50dfaSPedro Giffuni
491*f0a50dfaSPedro Giffuni
492*f0a50dfaSPedro Giffuni# StaticLibrary class
493*f0a50dfaSPedro Giffuni
494*f0a50dfaSPedro Giffunigb_StaticLibrary_DEFS :=
495*f0a50dfaSPedro Giffunigb_StaticLibrary_SYSPRE :=
496*f0a50dfaSPedro Giffunigb_StaticLibrary_PLAINEXT := .lib
497*f0a50dfaSPedro Giffunigb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
498*f0a50dfaSPedro Giffuni
499*f0a50dfaSPedro Giffunigb_StaticLibrary_FILENAMES := \
500*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
501*f0a50dfaSPedro Giffuni	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
502*f0a50dfaSPedro Giffuni
503*f0a50dfaSPedro Giffunigb_StaticLibrary_StaticLibrary_platform =
504*f0a50dfaSPedro Giffuni
505*f0a50dfaSPedro Giffuni
506*f0a50dfaSPedro Giffuni# Executable class
507*f0a50dfaSPedro Giffuni
508*f0a50dfaSPedro Giffunigb_Executable_EXT := .exe
509*f0a50dfaSPedro Giffunigb_Executable_TARGETTYPEFLAGS :=
510*f0a50dfaSPedro Giffuni#-RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG
511*f0a50dfaSPedro Giffunigb_Executable_get_rpath :=
512*f0a50dfaSPedro Giffuni
513*f0a50dfaSPedro Giffunidefine gb_Executable_Executable_platform
514*f0a50dfaSPedro Giffuni#$(call gb_LinkTarget_set_auxtargets,$(2),\
515*f0a50dfaSPedro Giffuni#	$(patsubst %.exe,%.pdb,$(call gb_LinkTarget_get_target,$(2))) \
516*f0a50dfaSPedro Giffuni#	$(call gb_LinkTarget_get_pdbfile,$(2)) \
517*f0a50dfaSPedro Giffuni#	$(call gb_LinkTarget_get_target,$(2)).manifest \
518*f0a50dfaSPedro Giffuni#)
519*f0a50dfaSPedro Giffuni
520*f0a50dfaSPedro Giffuni#$(call gb_Executable_get_target,$(1)) \
521*f0a50dfaSPedro Giffuni#$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_get_target,$(1)).manifest
522*f0a50dfaSPedro Giffuni#$(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest,$(call gb_LinkTarget_get_target,$(2)).manifest)
523*f0a50dfaSPedro Giffuni
524*f0a50dfaSPedro Giffuni#$(call gb_LinkTarget_get_target,$(2)) \
525*f0a50dfaSPedro Giffuni#$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
526*f0a50dfaSPedro Giffuni
527*f0a50dfaSPedro Giffuniendef
528*f0a50dfaSPedro Giffuni
529*f0a50dfaSPedro Giffuni# CppunitTest class
530*f0a50dfaSPedro Giffuni
531*f0a50dfaSPedro Giffunigb_CppunitTest_CPPTESTPRECOMMAND :=
532*f0a50dfaSPedro Giffunigb_CppunitTest_SYSPRE := itest_
533*f0a50dfaSPedro Giffunigb_CppunitTest_EXT := .lib
534*f0a50dfaSPedro Giffunigb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
535*f0a50dfaSPedro Giffunigb_CppunitTest_get_libfilename = test_$(1).dll
536*f0a50dfaSPedro Giffuni
537*f0a50dfaSPedro Giffunidefine gb_CppunitTest_CppunitTest_platform
538*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
539*f0a50dfaSPedro Giffuni
540*f0a50dfaSPedro Giffuni#$(call gb_LinkTarget_set_auxtargets,$(2),\
541*f0a50dfaSPedro Giffuni	$(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \
542*f0a50dfaSPedro Giffuni	$(3).manifest \
543*f0a50dfaSPedro Giffuni	$(patsubst %.dll,%.pdb,$(3)) \
544*f0a50dfaSPedro Giffuni	$(call gb_LinkTarget_get_pdbfile,$(2)) \
545*f0a50dfaSPedro Giffuni	$(patsubst %.dll,%.ilk,$(3)) \
546*f0a50dfaSPedro Giffuni)
547*f0a50dfaSPedro Giffuni
548*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_get_target,$(2)) \
549*f0a50dfaSPedro Giffuni$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
550*f0a50dfaSPedro Giffuni
551*f0a50dfaSPedro Giffuniendef
552*f0a50dfaSPedro Giffuni
553*f0a50dfaSPedro Giffuni# JunitTest class
554*f0a50dfaSPedro Giffuni
555*f0a50dfaSPedro Giffunigb_defaultlangiso := en-US
556*f0a50dfaSPedro Giffunigb_smoketest_instset := $(SRCDIR)/instsetoo_native/$(INPATH)/OpenOffice/archive/install/$(gb_defaultlangiso)/OOo_*_install-arc_$(gb_defaultlangiso).zip
557*f0a50dfaSPedro Giffuni
558*f0a50dfaSPedro Giffuniifeq ($(OOO_TEST_SOFFICE),)
559*f0a50dfaSPedro Giffuni
560*f0a50dfaSPedro Giffuni
561*f0a50dfaSPedro Giffuni# Work around Windows problems with long pathnames (see issue 50885) by
562*f0a50dfaSPedro Giffuni# installing into the temp directory instead of the module output tree (in which
563*f0a50dfaSPedro Giffuni# case $(target).instpath contains the path to the temp installation,
564*f0a50dfaSPedro Giffuni# which is removed after smoketest); can be removed once issue 50885 is fixed;
565*f0a50dfaSPedro Giffuni# on other platforms, a single installation to solver is created in
566*f0a50dfaSPedro Giffuni# smoketestoo_native.
567*f0a50dfaSPedro Giffuni
568*f0a50dfaSPedro Giffuni# for now, no dependency on $(shell ls $(gb_smoketest_instset))
569*f0a50dfaSPedro Giffuni# because that doesn't work before the instset is built
570*f0a50dfaSPedro Giffuni# and there is not much of a benefit anyway (gbuild not knowing about smoketest)
571*f0a50dfaSPedro Giffunidefine gb_JunitTest_JunitTest_platform_longpathname_hack
572*f0a50dfaSPedro Giffuni$(call gb_JunitTest_get_target,$(1)) : $(call gb_JunitTest_get_target,$(1)).instpath
573*f0a50dfaSPedro Giffuni$(call gb_JunitTest_get_target,$(1)) : CLEAN_CMD = $(call gb_Helper_abbreviate_dirs,rm -rf `cat $$@.instpath` $$@.instpath)
574*f0a50dfaSPedro Giffuni
575*f0a50dfaSPedro Giffuni$(call gb_JunitTest_get_target,$(1)).instpath :
576*f0a50dfaSPedro Giffuni	INST_DIR=$$$$(cygpath -m `mktemp -d -t testinst.XXXXXX`) \
577*f0a50dfaSPedro Giffuni	&& unzip -d "$$$${INST_DIR}"  $$(gb_smoketest_instset) \
578*f0a50dfaSPedro Giffuni	&& mv "$$$${INST_DIR}"/OOo_*_install-arc_$$(gb_defaultlangiso) "$$$${INST_DIR}"/opt\
579*f0a50dfaSPedro Giffuni	&& mkdir -p $$(dir $$@) \
580*f0a50dfaSPedro Giffuni	&& echo "$$$${INST_DIR}" > $$@
581*f0a50dfaSPedro Giffuni
582*f0a50dfaSPedro Giffuniendef
583*f0a50dfaSPedro Giffunielse # OOO_TEST_SOFFICE
584*f0a50dfaSPedro Giffunigb_JunitTest_JunitTest_platform_longpathname_hack =
585*f0a50dfaSPedro Giffuniendif # OOO_TEST_SOFFICE
586*f0a50dfaSPedro Giffuni
587*f0a50dfaSPedro Giffunidefine gb_JunitTest_JunitTest_platform
588*f0a50dfaSPedro Giffuni$(call gb_JunitTest_JunitTest_platform_longpathname_hack,$(1))
589*f0a50dfaSPedro Giffuni
590*f0a50dfaSPedro Giffuni$(call gb_JunitTest_get_target,$(1)) : DEFS := \
591*f0a50dfaSPedro Giffuni	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:`cat $(call gb_JunitTest_get_target,$(1)).instpath`/opt/OpenOffice.org 3/program/soffice.exe}" \
592*f0a50dfaSPedro Giffuni    -Dorg.openoffice.test.arg.env=PATH \
593*f0a50dfaSPedro Giffuni    -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \
594*f0a50dfaSPedro Giffuni
595*f0a50dfaSPedro Giffuniendef
596*f0a50dfaSPedro Giffuni
597*f0a50dfaSPedro Giffuni
598*f0a50dfaSPedro Giffuni# SdiTarget class
599*f0a50dfaSPedro Giffuni
600*f0a50dfaSPedro Giffunigb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
601*f0a50dfaSPedro Giffuni
602*f0a50dfaSPedro Giffuni# SrsPartMergeTarget
603*f0a50dfaSPedro Giffuni
604*f0a50dfaSPedro Giffunigb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
605*f0a50dfaSPedro Giffuni
606*f0a50dfaSPedro Giffuni# SrsPartTarget class
607*f0a50dfaSPedro Giffuni
608*f0a50dfaSPedro Giffunigb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
609*f0a50dfaSPedro Giffunigb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
610*f0a50dfaSPedro Giffuni
611*f0a50dfaSPedro Giffuniifeq ($(gb_FULLDEPS),$(true))
612*f0a50dfaSPedro Giffunidefine gb_SrsPartTarget__command_dep
613*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
614*f0a50dfaSPedro Giffuni	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
615*f0a50dfaSPedro Giffuni		$(INCLUDE) \
616*f0a50dfaSPedro Giffuni		$(DEFS) \
617*f0a50dfaSPedro Giffuni		$(2) \
618*f0a50dfaSPedro Giffuni		-f - \
619*f0a50dfaSPedro Giffuni	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
620*f0a50dfaSPedro Giffuni		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
621*f0a50dfaSPedro Giffuni		-v OUTDIR=$(OUTDIR)/ \
622*f0a50dfaSPedro Giffuni		-v WORKDIR=$(WORKDIR)/ \
623*f0a50dfaSPedro Giffuni		-v SRCDIR=$(SRCDIR)/ \
624*f0a50dfaSPedro Giffuni		-v REPODIR=$(REPODIR)/ \
625*f0a50dfaSPedro Giffuni	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
626*f0a50dfaSPedro Giffuniendef
627*f0a50dfaSPedro Giffunielse
628*f0a50dfaSPedro Giffunigb_SrsPartTarget__command_dep =
629*f0a50dfaSPedro Giffuniendif
630*f0a50dfaSPedro Giffuni
631*f0a50dfaSPedro Giffuni# WinResTarget class
632*f0a50dfaSPedro Giffuni
633*f0a50dfaSPedro Giffunigb_WinResTarget_POSTFIX :=.res
634*f0a50dfaSPedro Giffuni
635*f0a50dfaSPedro Giffunidefine gb_WinResTarget__command
636*f0a50dfaSPedro Giffuni$(call gb_Output_announce,$(2),$(true),RES,3)
637*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
638*f0a50dfaSPedro Giffuni	mkdir -p $(dir $(1)) && \
639*f0a50dfaSPedro Giffuni	$(gb_RC) \
640*f0a50dfaSPedro Giffuni		$(DEFS) $(FLAGS) \
641*f0a50dfaSPedro Giffuni		-I$(dir $(3)) \
642*f0a50dfaSPedro Giffuni		$(INCLUDE) \
643*f0a50dfaSPedro Giffuni		-fo=$(1) \
644*f0a50dfaSPedro Giffuni        -r $(RCFILE) )
645*f0a50dfaSPedro Giffuniendef
646*f0a50dfaSPedro Giffuni
647*f0a50dfaSPedro Giffuni$(eval $(call gb_Helper_make_dep_targets,\
648*f0a50dfaSPedro Giffuni	WinResTarget \
649*f0a50dfaSPedro Giffuni))
650*f0a50dfaSPedro Giffuni
651*f0a50dfaSPedro Giffuniifeq ($(gb_FULLDEPS),$(true))
652*f0a50dfaSPedro Giffunidefine gb_WinResTarget__command_dep
653*f0a50dfaSPedro Giffuni$(call gb_Helper_abbreviate_dirs_native,\
654*f0a50dfaSPedro Giffuni	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
655*f0a50dfaSPedro Giffuni		$(INCLUDE) \
656*f0a50dfaSPedro Giffuni		$(DEFS) \
657*f0a50dfaSPedro Giffuni		$(2) \
658*f0a50dfaSPedro Giffuni		-f - \
659*f0a50dfaSPedro Giffuni	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
660*f0a50dfaSPedro Giffuni		-v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \
661*f0a50dfaSPedro Giffuni		-v OUTDIR=$(OUTDIR)/ \
662*f0a50dfaSPedro Giffuni		-v WORKDIR=$(WORKDIR)/ \
663*f0a50dfaSPedro Giffuni		-v SRCDIR=$(SRCDIR)/ \
664*f0a50dfaSPedro Giffuni		-v REPODIR=$(REPODIR)/ \
665*f0a50dfaSPedro Giffuni	> $(call gb_WinResTarget_get_dep_target,$(1)))
666*f0a50dfaSPedro Giffuniendef
667*f0a50dfaSPedro Giffunielse
668*f0a50dfaSPedro Giffunigb_WinResTarget__command_dep =
669*f0a50dfaSPedro Giffuniendif
670*f0a50dfaSPedro Giffuni
671*f0a50dfaSPedro Giffuni# ComponentTarget
672*f0a50dfaSPedro Giffuni
673*f0a50dfaSPedro Giffunigb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
674*f0a50dfaSPedro Giffunigb_Library_COMPONENTPREFIXES := \
675*f0a50dfaSPedro Giffuni    OOO:vnd.sun.star.expand:\dBRAND_BASE_DIR/program/ \
676*f0a50dfaSPedro Giffuni    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
677*f0a50dfaSPedro Giffuni
678*f0a50dfaSPedro Giffuni# vim: set noet sw=4 ts=4:
679