xref: /aoo42x/main/solenv/gbuild/platform/windows.mk (revision 44c25570)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirGUI := WNT
25cdf0e10cSrcweirCOM := MSC
26cdf0e10cSrcweir
27cdf0e10cSrcweir# set tmpdir to some mixed case path, suitable for native tools
28cdf0e10cSrcweirgb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp))
29cdf0e10cSrcweirgb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
30cdf0e10cSrcweir
31cdf0e10cSrcweirgb_CC := cl
32cdf0e10cSrcweirgb_CXX := cl
33cdf0e10cSrcweirgb_LINK := link
34cdf0e10cSrcweirgb_AWK := awk
35cdf0e10cSrcweirgb_CLASSPATHSEP := ;
36cdf0e10cSrcweirgb_RC := rc
37cdf0e10cSrcweir
38cdf0e10cSrcweir# use CC/CXX if they are nondefaults
39cdf0e10cSrcweirifneq ($(origin CC),default)
40cdf0e10cSrcweirgb_CC := $(CC)
41cdf0e10cSrcweirgb_GCCP := $(CC)
42cdf0e10cSrcweirendif
43cdf0e10cSrcweirifneq ($(origin CXX),default)
44cdf0e10cSrcweirgb_CXX := $(CXX)
45cdf0e10cSrcweirendif
46cdf0e10cSrcweir
47cdf0e10cSrcweirgb_OSDEFS := \
48cdf0e10cSrcweir	-DWINVER=0x0500 \
49cdf0e10cSrcweir	-D_WIN32_IE=0x0500 \
50cdf0e10cSrcweir	-DNT351 \
51cdf0e10cSrcweir	-DWIN32 \
52cdf0e10cSrcweir	-DWNT \
53cdf0e10cSrcweir
54cdf0e10cSrcweirgb_COMPILERDEFS := \
55cdf0e10cSrcweir	-DMSC \
56cdf0e10cSrcweir	-D_CRT_NON_CONFORMING_SWPRINTFS \
57cdf0e10cSrcweir	-D_CRT_NONSTDC_NO_DEPRECATE \
58cdf0e10cSrcweir	-D_CRT_SECURE_NO_DEPRECATE \
59cdf0e10cSrcweir	-D_MT \
60cdf0e10cSrcweir	-DBOOST_MEM_FN_ENABLE_CDECL \
61cdf0e10cSrcweir	-DCPPU_ENV=msci \
62cdf0e10cSrcweir	-DFULL_DESK \
63cdf0e10cSrcweir	-DM1500 \
64cdf0e10cSrcweir
65cdf0e10cSrcweirgb_CPUDEFS := -DINTEL -D_X86_=1
66cdf0e10cSrcweir
67cdf0e10cSrcweirgb_RCDEFS := \
68cdf0e10cSrcweir     -DWINVER=0x0400 \
69cdf0e10cSrcweir	 -DWIN32 \
70cdf0e10cSrcweir
71cdf0e10cSrcweirgb_RCFLAGS := \
72cdf0e10cSrcweir     -V
73cdf0e10cSrcweir
74cdf0e10cSrcweirgb_CFLAGS := \
75cdf0e10cSrcweir	-Gd \
76cdf0e10cSrcweir	-GR \
77cdf0e10cSrcweir	-Gs \
78cdf0e10cSrcweir	-GS \
79cdf0e10cSrcweir	-Gy \
80cdf0e10cSrcweir	-nologo \
81cdf0e10cSrcweir	-Wall \
82cdf0e10cSrcweir	-wd4005 \
83cdf0e10cSrcweir	-wd4061 \
84cdf0e10cSrcweir	-wd4127 \
85cdf0e10cSrcweir	-wd4180 \
86cdf0e10cSrcweir	-wd4189 \
87cdf0e10cSrcweir	-wd4191 \
88cdf0e10cSrcweir	-wd4217 \
89cdf0e10cSrcweir	-wd4250 \
90cdf0e10cSrcweir	-wd4251 \
91cdf0e10cSrcweir	-wd4255 \
92cdf0e10cSrcweir	-wd4275 \
93cdf0e10cSrcweir	-wd4290 \
94cdf0e10cSrcweir	-wd4294 \
95cdf0e10cSrcweir	-wd4350 \
96cdf0e10cSrcweir	-wd4355 \
97cdf0e10cSrcweir	-wd4365 \
98cdf0e10cSrcweir	-wd4503 \
99cdf0e10cSrcweir	-wd4505 \
100cdf0e10cSrcweir	-wd4511 \
101cdf0e10cSrcweir	-wd4512 \
102cdf0e10cSrcweir	-wd4514 \
103cdf0e10cSrcweir	-wd4611 \
104cdf0e10cSrcweir	-wd4619 \
105cdf0e10cSrcweir	-wd4625 \
106cdf0e10cSrcweir	-wd4626 \
107cdf0e10cSrcweir	-wd4640 \
108cdf0e10cSrcweir	-wd4668 \
109cdf0e10cSrcweir	-wd4675 \
110cdf0e10cSrcweir	-wd4692 \
111cdf0e10cSrcweir	-wd4710 \
112cdf0e10cSrcweir	-wd4711 \
113cdf0e10cSrcweir	-wd4738 \
114cdf0e10cSrcweir	-wd4786 \
115cdf0e10cSrcweir	-wd4800 \
116cdf0e10cSrcweir	-wd4820 \
117cdf0e10cSrcweir	-wd4826 \
118cdf0e10cSrcweir	-Zc:forScope,wchar_t- \
119cdf0e10cSrcweir	-Zm500 \
120cdf0e10cSrcweir
121cdf0e10cSrcweirgb_CXXFLAGS := \
122cdf0e10cSrcweir	-Gd \
123cdf0e10cSrcweir	-GR \
124cdf0e10cSrcweir	-Gs \
125cdf0e10cSrcweir	-GS \
126cdf0e10cSrcweir	-Gy \
127cdf0e10cSrcweir	-nologo \
128cdf0e10cSrcweir	-Wall \
129cdf0e10cSrcweir	-wd4005 \
130cdf0e10cSrcweir	-wd4061 \
131cdf0e10cSrcweir	-wd4127 \
132cdf0e10cSrcweir	-wd4180 \
133cdf0e10cSrcweir	-wd4189 \
134cdf0e10cSrcweir	-wd4191 \
135cdf0e10cSrcweir	-wd4217 \
136cdf0e10cSrcweir	-wd4250 \
137cdf0e10cSrcweir	-wd4251 \
138cdf0e10cSrcweir	-wd4275 \
139cdf0e10cSrcweir	-wd4290 \
140cdf0e10cSrcweir	-wd4294 \
141cdf0e10cSrcweir	-wd4350 \
142cdf0e10cSrcweir	-wd4355 \
143cdf0e10cSrcweir	-wd4365 \
144cdf0e10cSrcweir	-wd4503 \
145cdf0e10cSrcweir	-wd4505 \
146cdf0e10cSrcweir	-wd4511 \
147cdf0e10cSrcweir	-wd4512 \
148cdf0e10cSrcweir	-wd4514 \
149cdf0e10cSrcweir	-wd4611 \
150cdf0e10cSrcweir	-wd4619 \
151cdf0e10cSrcweir	-wd4625 \
152cdf0e10cSrcweir	-wd4626 \
153cdf0e10cSrcweir	-wd4640 \
154cdf0e10cSrcweir	-wd4668 \
155cdf0e10cSrcweir	-wd4675 \
156cdf0e10cSrcweir	-wd4692 \
157cdf0e10cSrcweir	-wd4710 \
158cdf0e10cSrcweir	-wd4711 \
159cdf0e10cSrcweir	-wd4738 \
160cdf0e10cSrcweir	-wd4786 \
161cdf0e10cSrcweir	-wd4800 \
162cdf0e10cSrcweir	-wd4820 \
163cdf0e10cSrcweir	-wd4826 \
164cdf0e10cSrcweir	-Zc:forScope,wchar_t- \
165cdf0e10cSrcweir	-Zm500 \
166cdf0e10cSrcweir
167cdf0e10cSrcweirgb_STDLIBS := \
168cdf0e10cSrcweir    uwinapi \
169cdf0e10cSrcweir    kernel32 \
170cdf0e10cSrcweir    msvcrt \
171cdf0e10cSrcweir    oldnames \
172cdf0e10cSrcweir
173cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
174cdf0e10cSrcweirgb_CFLAGS_WERROR := -WX
175cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -WX
176cdf0e10cSrcweirendif
177cdf0e10cSrcweir
178cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \
179cdf0e10cSrcweir	-DEXCEPTIONS_ON \
180cdf0e10cSrcweir	-EHa \
181cdf0e10cSrcweir
182cdf0e10cSrcweirgb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
183cdf0e10cSrcweir
184cdf0e10cSrcweir
185cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \
186cdf0e10cSrcweir	-DEXCEPTIONS_OFF \
187cdf0e10cSrcweir
188cdf0e10cSrcweirgb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
189cdf0e10cSrcweir
190cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \
191cdf0e10cSrcweir	-MACHINE:IX86 \
192cdf0e10cSrcweir	-NODEFAULTLIB \
193cdf0e10cSrcweir	-OPT:NOREF \
194cdf0e10cSrcweir	-SUBSYSTEM:CONSOLE \
195cdf0e10cSrcweir	-safeseh \
196cdf0e10cSrcweir	-nxcompat \
197cdf0e10cSrcweir	-dynamicbase \
198cdf0e10cSrcweir	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
199cdf0e10cSrcweir
200cdf0e10cSrcweirifneq ($(ENABLE_CRASHDUMP),)
201cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -DEBUG
202cdf0e10cSrcweirgb_CFLAGS+=-Zi
203cdf0e10cSrcweirgb_CXXFLAGS+=-Zi
204cdf0e10cSrcweirendif
205cdf0e10cSrcweir
206cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
207cdf0e10cSrcweirgb_CXXFLAGS +=-Zi
208cdf0e10cSrcweirgb_CFLAGS +=-Zi
209cdf0e10cSrcweirgb_COMPILEROPTFLAGS :=
210cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += -DEBUG
211cdf0e10cSrcweirelse
212cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy-
213cdf0e10cSrcweirendif
214cdf0e10cSrcweir
215cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -Od
216cdf0e10cSrcweir
217cdf0e10cSrcweir
218cdf0e10cSrcweir# Helper class
219cdf0e10cSrcweirgb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
220cdf0e10cSrcweirgb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
221cdf0e10cSrcweirgb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
222cdf0e10cSrcweirgb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
223cdf0e10cSrcweir
224cdf0e10cSrcweirdefine gb_Helper_abbreviate_dirs_native
225cdf0e10cSrcweirR=$(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))) && \
226cdf0e10cSrcweir$(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)))))))))
227cdf0e10cSrcweirendef
228cdf0e10cSrcweir
229cdf0e10cSrcweir# convert parametters filesystem root to native notation
230cdf0e10cSrcweir# does some real work only on windows, make sure not to
231cdf0e10cSrcweir# break the dummy implementations on unx*
232cdf0e10cSrcweirdefine gb_Helper_convert_native
233cdf0e10cSrcweir$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \
234cdf0e10cSrcweir$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \
235cdf0e10cSrcweir$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \
236cdf0e10cSrcweir$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
237cdf0e10cSrcweir$(1)))))
238cdf0e10cSrcweirendef
239cdf0e10cSrcweir
240cdf0e10cSrcweir
241cdf0e10cSrcweir# CObject class
242cdf0e10cSrcweir
243cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
244cdf0e10cSrcweirdefine gb_CObject__command_deponcompile
245cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
246cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
247cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
248cdf0e10cSrcweir		-I$(dir $(3)) \
249cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME)%,$(6)) \
250cdf0e10cSrcweir		$(3) \
251cdf0e10cSrcweir		-f - \
252cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
253cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
254cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
255cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
256cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
257cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
258cdf0e10cSrcweir	> $(call gb_CObject_get_dep_target,$(2)))
259cdf0e10cSrcweirendef
260cdf0e10cSrcweirelse
261cdf0e10cSrcweirCObject__command_deponcompile =
262cdf0e10cSrcweirendif
263cdf0e10cSrcweir
264cdf0e10cSrcweirdefine gb_CObject__command
265cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C  ,3)
266cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
267cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
268cdf0e10cSrcweir	unset INCLUDE && \
269cdf0e10cSrcweir	$(gb_CC) \
270cdf0e10cSrcweir		$(DEFS) $(CFLAGS)  -Fd$(PDBFILE) \
271cdf0e10cSrcweir        $(PCHFLAGS) \
272cdf0e10cSrcweir		-I$(dir $(3)) \
273cdf0e10cSrcweir		$(INCLUDE) \
274cdf0e10cSrcweir		-c $(3) \
275cdf0e10cSrcweir		-Fo$(1))
276cdf0e10cSrcweir$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE))
277cdf0e10cSrcweirendef
278cdf0e10cSrcweir
279cdf0e10cSrcweir
280cdf0e10cSrcweir# CxxObject class
281cdf0e10cSrcweir
282cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
283cdf0e10cSrcweirdefine gb_CxxObject__command_deponcompile
284cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
285cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
286cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
287cdf0e10cSrcweir		-I$(dir $(3)) \
288cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME)%,$(6)) \
289cdf0e10cSrcweir		$(3) \
290cdf0e10cSrcweir		-f - \
291cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
292cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
293cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
294cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
295cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
296cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
297cdf0e10cSrcweir	> $(call gb_CxxObject_get_dep_target,$(2)))
298cdf0e10cSrcweir endef
299cdf0e10cSrcweirelse
300cdf0e10cSrcweirgb_CxxObject__command_deponcompile =
301cdf0e10cSrcweirendif
302cdf0e10cSrcweir
303cdf0e10cSrcweirdefine gb_CxxObject__command
304cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3)
305cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
306cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
307cdf0e10cSrcweir	unset INCLUDE && \
308cdf0e10cSrcweir	$(gb_CXX) \
309cdf0e10cSrcweir		$(DEFS) $(CXXFLAGS) -Fd$(PDBFILE)\
310cdf0e10cSrcweir        $(PCHFLAGS) \
311cdf0e10cSrcweir		-I$(dir $(3)) \
312cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE) \
313cdf0e10cSrcweir		-c $(3) \
314cdf0e10cSrcweir		-Fo$(1))
315cdf0e10cSrcweir$(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE))
316cdf0e10cSrcweirendef
317cdf0e10cSrcweir
318cdf0e10cSrcweir
319cdf0e10cSrcweir# PrecompiledHeader class
320cdf0e10cSrcweir
321cdf0e10cSrcweirgb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \
322cdf0e10cSrcweir									   -Fp$(call gb_PrecompiledHeader_get_target,$(1))
323cdf0e10cSrcweir
324cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
325cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile
326cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
327cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
328cdf0e10cSrcweir		$(4) $(5) \
329cdf0e10cSrcweir		-I$(dir $(3)) \
330cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
331cdf0e10cSrcweir		$(3) \
332cdf0e10cSrcweir		-f - \
333cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
334cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
335cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
336cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
337cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
338cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
339cdf0e10cSrcweir	> $(call gb_PrecompiledHeader_get_dep_target,$(2)))
340cdf0e10cSrcweirendef
341cdf0e10cSrcweirelse
342cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile =
343cdf0e10cSrcweirendif
344cdf0e10cSrcweir
345cdf0e10cSrcweir
346cdf0e10cSrcweirdefine gb_PrecompiledHeader__command
347cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
348cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
349cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
350cdf0e10cSrcweir	unset INCLUDE && \
351cdf0e10cSrcweir	$(gb_CXX) \
352cdf0e10cSrcweir		$(4) $(5) -Fd$(PDBFILE) \
353cdf0e10cSrcweir		-I$(dir $(3)) \
354cdf0e10cSrcweir		$(6) \
355cdf0e10cSrcweir		-c $(3) \
356cdf0e10cSrcweir		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
357cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
358cdf0e10cSrcweirendef
359cdf0e10cSrcweir
360cdf0e10cSrcweir# NoexPrecompiledHeader class
361cdf0e10cSrcweir
362cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -Yu$(1).hxx \
363cdf0e10cSrcweir										   -Fp$(call gb_NoexPrecompiledHeader_get_target,$(1))
364cdf0e10cSrcweir
365cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
366cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile
367cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
368cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
369cdf0e10cSrcweir		$(4) $(5) \
370cdf0e10cSrcweir		-I$(dir $(3)) \
371cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
372cdf0e10cSrcweir		$(3) \
373cdf0e10cSrcweir		-f - \
374cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
375cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
376cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
377cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
378cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
379cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
380cdf0e10cSrcweir	> $(call gb_NoexPrecompiledHeader_get_dep_target,$(2)))
381cdf0e10cSrcweirendef
382cdf0e10cSrcweirelse
383cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile =
384cdf0e10cSrcweirendif
385cdf0e10cSrcweir
386cdf0e10cSrcweir
387cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command
388cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
389cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
390cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
391cdf0e10cSrcweir	unset INCLUDE && \
392cdf0e10cSrcweir	$(gb_CXX) \
393cdf0e10cSrcweir		$(4) $(5) -Fd$(PDBFILE) \
394cdf0e10cSrcweir		-I$(dir $(3)) \
395cdf0e10cSrcweir		$(6) \
396cdf0e10cSrcweir		-c $(3) \
397cdf0e10cSrcweir		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
398cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
399cdf0e10cSrcweirendef
400cdf0e10cSrcweir
401cdf0e10cSrcweir# LinkTarget class
402cdf0e10cSrcweir
403cdf0e10cSrcweirgb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
404cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
405cdf0e10cSrcweir
406cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\
407cdf0e10cSrcweir	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
408cdf0e10cSrcweir	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
409cdf0e10cSrcweir
410cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
411cdf0e10cSrcweir
412cdf0e10cSrcweirgb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
413cdf0e10cSrcweir
414cdf0e10cSrcweirdefine gb_LinkTarget__command
415cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
416cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
417cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
418cdf0e10cSrcweir	rm -f $(1) && \
419cdf0e10cSrcweir	RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100, \
420cdf0e10cSrcweir	    $(call gb_Helper_convert_native,$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
421cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
422cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
423cdf0e10cSrcweir		$(PCHOBJS) $(NATIVERES))) && \
424cdf0e10cSrcweir	$(gb_LINK) \
425cdf0e10cSrcweir		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
426cdf0e10cSrcweir		$(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \
427cdf0e10cSrcweir		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
428cdf0e10cSrcweir		$(LDFLAGS) \
429cdf0e10cSrcweir		@$${RESPONSEFILE} \
430cdf0e10cSrcweir		$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \
431*44c25570SAndre Fischer		$(patsubst %,%.lib,$(EXTERNAL_LIBS)) \
432cdf0e10cSrcweir		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \
433cdf0e10cSrcweir		$(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); RC=$$?; rm $${RESPONSEFILE} \
434cdf0e10cSrcweir	$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC)
435cdf0e10cSrcweirendef
436cdf0e10cSrcweir
437cdf0e10cSrcweir
438cdf0e10cSrcweir# Library class
439cdf0e10cSrcweir
440cdf0e10cSrcweirgb_Library_DEFS := -D_DLL
441cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -DLL
442cdf0e10cSrcweirgb_Library_get_rpath :=
443cdf0e10cSrcweir
444cdf0e10cSrcweirgb_Library_SYSPRE := i
445cdf0e10cSrcweirgb_Library_PLAINEXT := .lib
446cdf0e10cSrcweir
447cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \
448cdf0e10cSrcweir	advapi32 \
449cdf0e10cSrcweir	gdi32 \
450cdf0e10cSrcweir	gdiplus \
451cdf0e10cSrcweir	gnu_getopt \
452cdf0e10cSrcweir	imm32\
453cdf0e10cSrcweir	kernel32 \
454cdf0e10cSrcweir	msimg32 \
455cdf0e10cSrcweir	msvcrt \
456cdf0e10cSrcweir	mpr \
457cdf0e10cSrcweir	oldnames \
458cdf0e10cSrcweir	ole32 \
459cdf0e10cSrcweir	oleaut32 \
460cdf0e10cSrcweir	shell32 \
461cdf0e10cSrcweir	user32 \
462cdf0e10cSrcweir	uuid \
463cdf0e10cSrcweir	uwinapi \
464cdf0e10cSrcweir	winspool \
465cdf0e10cSrcweir	z \
466828da808SPedro Giffuni	cppunit
467cdf0e10cSrcweir
468cdf0e10cSrcweirgb_Library_LAYER := \
469cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
470cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \
471cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \
472cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
473cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
474cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \
475cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \
476cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \
477cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
478cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
479cdf0e10cSrcweir
480cdf0e10cSrcweirgb_Library_FILENAMES :=\
481cdf0e10cSrcweir	$(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
482cdf0e10cSrcweir
483cdf0e10cSrcweirgb_Library_DLLEXT := .dll
484cdf0e10cSrcweirgb_Library_MAJORVER := 3
485cdf0e10cSrcweirgb_Library_RTEXT := MSC$(gb_Library_DLLEXT)
486cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true))
487cdf0e10cSrcweirgb_Library_STLEXT := port_vc7145$(gb_Library_DLLEXT)
488cdf0e10cSrcweirelse
489cdf0e10cSrcweirgb_Library_STLEXT := port_vc7145_stldebug$(gb_Library_DLLEXT)
490cdf0e10cSrcweirendif
4915f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_DLLEXT)
492cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
493cdf0e10cSrcweirgb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
494cdf0e10cSrcweirgb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT)
495cdf0e10cSrcweir
496cdf0e10cSrcweirgb_Library_DLLFILENAMES :=\
497cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \
498cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
499cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
500cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
501cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \
502cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \
503cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):$(lib)$(gb_Library_STLEXT)) \
504cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
505cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
506cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \
507cdf0e10cSrcweir
508cdf0e10cSrcweirdefine gb_Library_Library_platform
509cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
510cdf0e10cSrcweir
511cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
512cdf0e10cSrcweir	$(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \
513cdf0e10cSrcweir	$(3).manifest \
514cdf0e10cSrcweir	$(call gb_LinkTarget_get_pdbfile,$(2)) \
515cdf0e10cSrcweir	$(patsubst %.dll,%.pdb,$(3)) \
516cdf0e10cSrcweir	$(patsubst %.dll,%.ilk,$(3)) \
517cdf0e10cSrcweir)
518cdf0e10cSrcweir
519cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \
520cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
521cdf0e10cSrcweir
522cdf0e10cSrcweirifneq ($(ENABLE_CRASHDUMP),)
523cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \
524cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS +=  \
525cdf0e10cSrcweir		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \
526cdf0e10cSrcweir		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \
527cdf0e10cSrcweir
528cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))),$(patsubst %.dll,%.pdb,$(3)))
529cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))),$(patsubst %.dll,%.ilk,$(3)))
530cdf0e10cSrcweirendif
531cdf0e10cSrcweir
532cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
533cdf0e10cSrcweir
534cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \
535cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
536cdf0e10cSrcweir
537cdf0e10cSrcweirendef
538cdf0e10cSrcweir
539cdf0e10cSrcweirdefine gb_Library_add_default_nativeres
540cdf0e10cSrcweir$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2))
541cdf0e10cSrcweir$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo)
542cdf0e10cSrcweir$(call gb_WinResTarget_set_defs,$(1)/$(2),\
543cdf0e10cSrcweir        $$(DEFS) \
544cdf0e10cSrcweir		-DADDITIONAL_VERINFO1 \
545cdf0e10cSrcweir		-DADDITIONAL_VERINFO2 \
546cdf0e10cSrcweir		-DADDITIONAL_VERINFO3 \
547cdf0e10cSrcweir)
548cdf0e10cSrcweir$(call gb_Library_add_nativeres,$(1),$(2))
549cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2))
550cdf0e10cSrcweir
551cdf0e10cSrcweirendef
552cdf0e10cSrcweir
553cdf0e10cSrcweirdefine gb_Library_add_nativeres
554cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2))
555cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2))
556cdf0e10cSrcweir
557cdf0e10cSrcweirendef
558cdf0e10cSrcweir
559cdf0e10cSrcweirdefine gb_Library_get_dllname
560cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
561cdf0e10cSrcweirendef
562cdf0e10cSrcweir
563cdf0e10cSrcweir
564cdf0e10cSrcweir# StaticLibrary class
565cdf0e10cSrcweir
566cdf0e10cSrcweirgb_StaticLibrary_DEFS :=
567cdf0e10cSrcweirgb_StaticLibrary_TARGETTYPEFLAGS := -LIB
568cdf0e10cSrcweirgb_StaticLibrary_SYSPRE :=
569cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .lib
570cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
571cdf0e10cSrcweir
572cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \
573cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
574cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
575cdf0e10cSrcweir
576cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES))
577cdf0e10cSrcweir
578cdf0e10cSrcweirdefine gb_StaticLibrary_StaticLibrary_platform
579cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \
580cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
581cdf0e10cSrcweir
582cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
583cdf0e10cSrcweir	$(call gb_LinkTarget_get_pdbfile,$(2)) \
584cdf0e10cSrcweir)
585cdf0e10cSrcweir
586cdf0e10cSrcweirendef
587cdf0e10cSrcweir
588cdf0e10cSrcweir# Executable class
589cdf0e10cSrcweir
590cdf0e10cSrcweirgb_Executable_EXT := .exe
591cdf0e10cSrcweirgb_Executable_TARGETTYPEFLAGS := -RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG
592cdf0e10cSrcweirgb_Executable_get_rpath :=
593cdf0e10cSrcweir
594cdf0e10cSrcweirdefine gb_Executable_Executable_platform
595cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
596cdf0e10cSrcweir	$(patsubst %.exe,%.pdb,$(call gb_LinkTarget_get_target,$(2))) \
597cdf0e10cSrcweir	$(call gb_LinkTarget_get_pdbfile,$(2)) \
598cdf0e10cSrcweir	$(call gb_LinkTarget_get_target,$(2)).manifest \
599cdf0e10cSrcweir)
600cdf0e10cSrcweir
601cdf0e10cSrcweir$(call gb_Executable_get_target,$(1)) \
602cdf0e10cSrcweir$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_get_target,$(1)).manifest
603cdf0e10cSrcweir$(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest,$(call gb_LinkTarget_get_target,$(2)).manifest)
604cdf0e10cSrcweir
605cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \
606cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
607cdf0e10cSrcweir
608cdf0e10cSrcweirendef
609cdf0e10cSrcweir
610cdf0e10cSrcweir# CppunitTest class
611cdf0e10cSrcweir
612cdf0e10cSrcweirgb_CppunitTest_CPPTESTPRECOMMAND :=
613cdf0e10cSrcweirgb_CppunitTest_SYSPRE := itest_
614cdf0e10cSrcweirgb_CppunitTest_EXT := .lib
615cdf0e10cSrcweirgb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
616cdf0e10cSrcweirgb_CppunitTest_get_libfilename = test_$(1).dll
617cdf0e10cSrcweir
618cdf0e10cSrcweirdefine gb_CppunitTest_CppunitTest_platform
619cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
620cdf0e10cSrcweir
621cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
622cdf0e10cSrcweir	$(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \
623cdf0e10cSrcweir	$(3).manifest \
624cdf0e10cSrcweir	$(patsubst %.dll,%.pdb,$(3)) \
625cdf0e10cSrcweir	$(call gb_LinkTarget_get_pdbfile,$(2)) \
626cdf0e10cSrcweir	$(patsubst %.dll,%.ilk,$(3)) \
627cdf0e10cSrcweir)
628cdf0e10cSrcweir
629cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \
630cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
631cdf0e10cSrcweir
632cdf0e10cSrcweirendef
633cdf0e10cSrcweir
634cdf0e10cSrcweir# JunitTest class
635cdf0e10cSrcweir
636cdf0e10cSrcweirgb_defaultlangiso := en-US
637cdf0e10cSrcweirgb_smoketest_instset := $(SRCDIR)/instsetoo_native/$(INPATH)/OpenOffice/archive/install/$(gb_defaultlangiso)/OOo_*_install-arc_$(gb_defaultlangiso).zip
638cdf0e10cSrcweir
639cdf0e10cSrcweirifeq ($(OOO_TEST_SOFFICE),)
640cdf0e10cSrcweir
641cdf0e10cSrcweir
642cdf0e10cSrcweir# Work around Windows problems with long pathnames (see issue 50885) by
643cdf0e10cSrcweir# installing into the temp directory instead of the module output tree (in which
644cdf0e10cSrcweir# case $(target).instpath contains the path to the temp installation,
645cdf0e10cSrcweir# which is removed after smoketest); can be removed once issue 50885 is fixed;
646cdf0e10cSrcweir# on other platforms, a single installation to solver is created in
647cdf0e10cSrcweir# smoketestoo_native.
648cdf0e10cSrcweir
649cdf0e10cSrcweir# for now, no dependency on $(shell ls $(gb_smoketest_instset))
650cdf0e10cSrcweir# because that doesn't work before the instset is built
651cdf0e10cSrcweir# and there is not much of a benefit anyway (gbuild not knowing about smoketest)
652cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform_longpathname_hack
653cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : $(call gb_JunitTest_get_target,$(1)).instpath
654cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : CLEAN_CMD = $(call gb_Helper_abbreviate_dirs,rm -rf `cat $$@.instpath` $$@.instpath)
655cdf0e10cSrcweir
656cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)).instpath :
657cdf0e10cSrcweir	INST_DIR=$$$$(cygpath -m `mktemp -d -t testinst.XXXXXX`) \
658cdf0e10cSrcweir	&& unzip -d "$$$${INST_DIR}"  $$(gb_smoketest_instset) \
659cdf0e10cSrcweir	&& mv "$$$${INST_DIR}"/OOo_*_install-arc_$$(gb_defaultlangiso) "$$$${INST_DIR}"/opt\
660cdf0e10cSrcweir	&& mkdir -p $$(dir $$@) \
661cdf0e10cSrcweir	&& echo "$$$${INST_DIR}" > $$@
662cdf0e10cSrcweir
663cdf0e10cSrcweirendef
664cdf0e10cSrcweirelse # OOO_TEST_SOFFICE
665cdf0e10cSrcweirgb_JunitTest_JunitTest_platform_longpathname_hack =
666cdf0e10cSrcweirendif # OOO_TEST_SOFFICE
667cdf0e10cSrcweir
668cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform
669cdf0e10cSrcweir$(call gb_JunitTest_JunitTest_platform_longpathname_hack,$(1))
670cdf0e10cSrcweir
671cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : DEFS := \
672cdf0e10cSrcweir	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:`cat $(call gb_JunitTest_get_target,$(1)).instpath`/opt/OpenOffice.org 3/program/soffice.exe}" \
673cdf0e10cSrcweir    -Dorg.openoffice.test.arg.env=PATH \
674cdf0e10cSrcweir    -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \
675cdf0e10cSrcweir
676cdf0e10cSrcweirendef
677cdf0e10cSrcweir
678cdf0e10cSrcweir
679cdf0e10cSrcweir# SdiTarget class
680cdf0e10cSrcweir
681cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
682cdf0e10cSrcweir
683cdf0e10cSrcweir# SrsPartMergeTarget
684cdf0e10cSrcweir
685cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
686cdf0e10cSrcweir
687cdf0e10cSrcweir# SrsPartTarget class
688cdf0e10cSrcweir
689cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
690cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
691cdf0e10cSrcweir
692cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
693cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep
694cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
695cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
696cdf0e10cSrcweir		$(INCLUDE) \
697cdf0e10cSrcweir		$(DEFS) \
698cdf0e10cSrcweir		$(2) \
699cdf0e10cSrcweir		-f - \
700cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
701cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
702cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
703cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
704cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
705cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
706cdf0e10cSrcweir	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
707cdf0e10cSrcweirendef
708cdf0e10cSrcweirelse
709cdf0e10cSrcweirgb_SrsPartTarget__command_dep =
710cdf0e10cSrcweirendif
711cdf0e10cSrcweir
712cdf0e10cSrcweir# WinResTarget class
713cdf0e10cSrcweir
714cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=.res
715cdf0e10cSrcweir
716cdf0e10cSrcweirdefine gb_WinResTarget__command
717cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3)
718cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
719cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
720cdf0e10cSrcweir	$(gb_RC) \
721cdf0e10cSrcweir		$(DEFS) $(FLAGS) \
722cdf0e10cSrcweir		-I$(dir $(3)) \
723cdf0e10cSrcweir		$(INCLUDE) \
724cdf0e10cSrcweir		-Fo$(1) \
725cdf0e10cSrcweir        $(RCFILE) )
726cdf0e10cSrcweirendef
727cdf0e10cSrcweir
728cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\
729cdf0e10cSrcweir	WinResTarget \
730cdf0e10cSrcweir))
731cdf0e10cSrcweir
732cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
733cdf0e10cSrcweirdefine gb_WinResTarget__command_dep
734cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
735cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
736cdf0e10cSrcweir		$(INCLUDE) \
737cdf0e10cSrcweir		$(DEFS) \
738cdf0e10cSrcweir		$(2) \
739cdf0e10cSrcweir		-f - \
740cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
741cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \
742cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
743cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
744cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
745cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
746cdf0e10cSrcweir	> $(call gb_WinResTarget_get_dep_target,$(1)))
747cdf0e10cSrcweirendef
748cdf0e10cSrcweirelse
749cdf0e10cSrcweirgb_WinResTarget__command_dep =
750cdf0e10cSrcweirendif
751cdf0e10cSrcweir
752cdf0e10cSrcweir# ComponentTarget
753cdf0e10cSrcweir
754cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
755cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \
756cdf0e10cSrcweir    OOO:vnd.sun.star.expand:\dBRAND_BASE_DIR/program/ \
757cdf0e10cSrcweir    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
758cdf0e10cSrcweir
759cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
760