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