xref: /aoo42x/main/solenv/gbuild/platform/windows.mk (revision 01ab31f5)
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
316bf52fdaSDamjan Jovanovicgb_AS := ml
32cdf0e10cSrcweirgb_CC := cl
33cdf0e10cSrcweirgb_CXX := cl
34cdf0e10cSrcweirgb_LINK := link
35cdf0e10cSrcweirgb_AWK := awk
36cdf0e10cSrcweirgb_CLASSPATHSEP := ;
37cdf0e10cSrcweirgb_RC := rc
38cdf0e10cSrcweir
39cdf0e10cSrcweir# use CC/CXX if they are nondefaults
406bf52fdaSDamjan Jovanovicifneq ($(origin AS),default)
416bf52fdaSDamjan Jovanovicgb_AS := $(AS)
426bf52fdaSDamjan Jovanovicendif
43cdf0e10cSrcweirifneq ($(origin CC),default)
44cdf0e10cSrcweirgb_CC := $(CC)
45cdf0e10cSrcweirgb_GCCP := $(CC)
46cdf0e10cSrcweirendif
47cdf0e10cSrcweirifneq ($(origin CXX),default)
48cdf0e10cSrcweirgb_CXX := $(CXX)
49cdf0e10cSrcweirendif
50cdf0e10cSrcweir
51cdf0e10cSrcweirgb_OSDEFS := \
52cdf0e10cSrcweir	-DWINVER=0x0500 \
53cdf0e10cSrcweir	-D_WIN32_IE=0x0500 \
54cdf0e10cSrcweir	-DNT351 \
55cdf0e10cSrcweir	-DWIN32 \
56cdf0e10cSrcweir	-DWNT \
57cdf0e10cSrcweir
58cdf0e10cSrcweirgb_COMPILERDEFS := \
59cdf0e10cSrcweir	-DMSC \
60cdf0e10cSrcweir	-D_CRT_NON_CONFORMING_SWPRINTFS \
61cdf0e10cSrcweir	-D_CRT_NONSTDC_NO_DEPRECATE \
62cdf0e10cSrcweir	-D_CRT_SECURE_NO_DEPRECATE \
63cdf0e10cSrcweir	-D_MT \
64b63233d8Sdamjan	-D_DLL \
65386ca866SDon Lewis	-DCPPU_ENV=$(COMNAME) \
66cdf0e10cSrcweir	-DFULL_DESK \
67cdf0e10cSrcweir	-DM1500 \
68cdf0e10cSrcweir
69787e1130SDon Lewisgb_CPUDEFS := -D$(ALIGN) -D$(CPUNAME)
70edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),INTEL)
718cb913c4SDamjan Jovanovicgb_CPUDEFS += -D_X86_=1
72edd74ba5SDamjan Jovanovicendif
73edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),X86_64)
748cb913c4SDamjan Jovanovicgb_CPUDEFS += -D_AMD64_=1
75edd74ba5SDamjan Jovanovicendif
76cdf0e10cSrcweir
77*01ab31f5SDamjan Jovanovicifeq ($(CPUNAME),INTEL)
78*01ab31f5SDamjan Jovanovicgb_COMPILERDEFS += -DBOOST_MEM_FN_ENABLE_CDECL
79*01ab31f5SDamjan Jovanovicendif
80*01ab31f5SDamjan Jovanovic
81cdf0e10cSrcweirgb_RCDEFS := \
82cdf0e10cSrcweir     -DWINVER=0x0400 \
83cdf0e10cSrcweir	 -DWIN32 \
84cdf0e10cSrcweir
85cdf0e10cSrcweirgb_RCFLAGS := \
86cdf0e10cSrcweir     -V
87cdf0e10cSrcweir
88cdf0e10cSrcweirgb_CFLAGS := \
89cdf0e10cSrcweir	-Gd \
90cdf0e10cSrcweir	-GR \
91cdf0e10cSrcweir	-Gs \
92cdf0e10cSrcweir	-GS \
93cdf0e10cSrcweir	-nologo \
94cdf0e10cSrcweir	-Wall \
95cdf0e10cSrcweir	-wd4005 \
96cdf0e10cSrcweir	-wd4061 \
97cdf0e10cSrcweir	-wd4127 \
98cdf0e10cSrcweir	-wd4180 \
99cdf0e10cSrcweir	-wd4189 \
100cdf0e10cSrcweir	-wd4191 \
101cdf0e10cSrcweir	-wd4217 \
102cdf0e10cSrcweir	-wd4250 \
103cdf0e10cSrcweir	-wd4251 \
104cdf0e10cSrcweir	-wd4255 \
105cdf0e10cSrcweir	-wd4275 \
106cdf0e10cSrcweir	-wd4290 \
107cdf0e10cSrcweir	-wd4294 \
108cdf0e10cSrcweir	-wd4350 \
109cdf0e10cSrcweir	-wd4355 \
110cdf0e10cSrcweir	-wd4365 \
111cdf0e10cSrcweir	-wd4503 \
112cdf0e10cSrcweir	-wd4505 \
113cdf0e10cSrcweir	-wd4511 \
114cdf0e10cSrcweir	-wd4512 \
115cdf0e10cSrcweir	-wd4514 \
116cdf0e10cSrcweir	-wd4611 \
117cdf0e10cSrcweir	-wd4619 \
118cdf0e10cSrcweir	-wd4625 \
119cdf0e10cSrcweir	-wd4626 \
120cdf0e10cSrcweir	-wd4640 \
121cdf0e10cSrcweir	-wd4668 \
122cdf0e10cSrcweir	-wd4675 \
123cdf0e10cSrcweir	-wd4692 \
124cdf0e10cSrcweir	-wd4710 \
125cdf0e10cSrcweir	-wd4711 \
126cdf0e10cSrcweir	-wd4738 \
127cdf0e10cSrcweir	-wd4786 \
128cdf0e10cSrcweir	-wd4800 \
129cdf0e10cSrcweir	-wd4820 \
130cdf0e10cSrcweir	-wd4826 \
131e5a7b9b2SHerbert Dürr	-Zc:wchar_t- \
132cdf0e10cSrcweir	-Zm500 \
133cdf0e10cSrcweir
134cdf0e10cSrcweirgb_CXXFLAGS := \
135cdf0e10cSrcweir	-Gd \
136cdf0e10cSrcweir	-GR \
137cdf0e10cSrcweir	-Gs \
138cdf0e10cSrcweir	-GS \
139cdf0e10cSrcweir	-Gy \
140cdf0e10cSrcweir	-nologo \
141cdf0e10cSrcweir	-Wall \
142cdf0e10cSrcweir	-wd4005 \
143cdf0e10cSrcweir	-wd4061 \
144cdf0e10cSrcweir	-wd4127 \
145cdf0e10cSrcweir	-wd4180 \
146cdf0e10cSrcweir	-wd4189 \
147cdf0e10cSrcweir	-wd4191 \
148cdf0e10cSrcweir	-wd4217 \
149cdf0e10cSrcweir	-wd4250 \
150cdf0e10cSrcweir	-wd4251 \
151cdf0e10cSrcweir	-wd4275 \
152cdf0e10cSrcweir	-wd4290 \
153cdf0e10cSrcweir	-wd4294 \
154cdf0e10cSrcweir	-wd4350 \
155cdf0e10cSrcweir	-wd4355 \
156cdf0e10cSrcweir	-wd4365 \
157cdf0e10cSrcweir	-wd4503 \
158cdf0e10cSrcweir	-wd4505 \
159cdf0e10cSrcweir	-wd4511 \
160cdf0e10cSrcweir	-wd4512 \
161cdf0e10cSrcweir	-wd4514 \
162cdf0e10cSrcweir	-wd4611 \
163cdf0e10cSrcweir	-wd4619 \
164cdf0e10cSrcweir	-wd4625 \
165cdf0e10cSrcweir	-wd4626 \
166cdf0e10cSrcweir	-wd4640 \
167cdf0e10cSrcweir	-wd4668 \
168cdf0e10cSrcweir	-wd4675 \
169cdf0e10cSrcweir	-wd4692 \
170cdf0e10cSrcweir	-wd4710 \
171cdf0e10cSrcweir	-wd4711 \
172cdf0e10cSrcweir	-wd4738 \
173cdf0e10cSrcweir	-wd4786 \
174cdf0e10cSrcweir	-wd4800 \
175cdf0e10cSrcweir	-wd4820 \
176cdf0e10cSrcweir	-wd4826 \
177e5a7b9b2SHerbert Dürr	-Zc:wchar_t- \
178cdf0e10cSrcweir	-Zm500 \
179cdf0e10cSrcweir
180cdf0e10cSrcweirgb_STDLIBS := \
181cdf0e10cSrcweir    uwinapi \
182cdf0e10cSrcweir    kernel32 \
183cdf0e10cSrcweir    msvcrt \
184cdf0e10cSrcweir    oldnames \
185cdf0e10cSrcweir
186cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
187cdf0e10cSrcweirgb_CFLAGS_WERROR := -WX
188cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -WX
189cdf0e10cSrcweirendif
190cdf0e10cSrcweir
191cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \
192cdf0e10cSrcweir	-DEXCEPTIONS_ON \
193cdf0e10cSrcweir	-EHa \
194cdf0e10cSrcweir
195cdf0e10cSrcweirgb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
196cdf0e10cSrcweir
197cdf0e10cSrcweir
198cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \
199cdf0e10cSrcweir	-DEXCEPTIONS_OFF \
200cdf0e10cSrcweir
201cdf0e10cSrcweirgb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
202cdf0e10cSrcweir
203edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),INTEL)
204cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \
205cdf0e10cSrcweir	-MACHINE:IX86 \
206cdf0e10cSrcweir	-NODEFAULTLIB \
207cdf0e10cSrcweir	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
208edd74ba5SDamjan Jovanovic
209edd74ba5SDamjan Jovanovicendif
210edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),X86_64)
211edd74ba5SDamjan Jovanovicgb_LinkTarget_LDFLAGS := \
212edd74ba5SDamjan Jovanovic	-MACHINE:X64 \
213edd74ba5SDamjan Jovanovic	-NODEFAULTLIB \
214edd74ba5SDamjan Jovanovic	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
215edd74ba5SDamjan Jovanovic
216edd74ba5SDamjan Jovanovicendif
217b63233d8Sdamjan
218b63233d8Sdamjangb_DEBUG_CFLAGS := -Zi
219cdf0e10cSrcweir
220cf91f1aeSDamjan Jovanovicifeq ($(gb_DEBUGGING),TRUE)
221cf91f1aeSDamjan Jovanovicgb_LinkTarget_LDFLAGS += -DEBUG
222cf91f1aeSDamjan Jovanovicendif
223cf91f1aeSDamjan Jovanovic
224b63233d8Sdamjan# this does not use CFLAGS so it is not overridable
225cdf0e10cSrcweirifneq ($(ENABLE_CRASHDUMP),)
226cdf0e10cSrcweirgb_CFLAGS+=-Zi
227cdf0e10cSrcweirgb_CXXFLAGS+=-Zi
228cdf0e10cSrcweirendif
229cdf0e10cSrcweir
230cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
231b63233d8Sdamjangb_COMPILEROPTFLAGS :=
232cdf0e10cSrcweirelse
233cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy-
234cdf0e10cSrcweirendif
235cdf0e10cSrcweir
236cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -Od
237cdf0e10cSrcweir
238cdf0e10cSrcweir
239cdf0e10cSrcweir# Helper class
240cdf0e10cSrcweirgb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
241cdf0e10cSrcweirgb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
242cdf0e10cSrcweirgb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
243cdf0e10cSrcweirgb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
244cdf0e10cSrcweir
245cdf0e10cSrcweirdefine gb_Helper_abbreviate_dirs_native
246cdf0e10cSrcweirR=$(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))) && \
247cdf0e10cSrcweir$(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)))))))))
248cdf0e10cSrcweirendef
249cdf0e10cSrcweir
250cdf0e10cSrcweir# convert parametters filesystem root to native notation
251cdf0e10cSrcweir# does some real work only on windows, make sure not to
252cdf0e10cSrcweir# break the dummy implementations on unx*
253cdf0e10cSrcweirdefine gb_Helper_convert_native
254cdf0e10cSrcweir$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \
255cdf0e10cSrcweir$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \
256cdf0e10cSrcweir$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \
257cdf0e10cSrcweir$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
258cdf0e10cSrcweir$(1)))))
259cdf0e10cSrcweirendef
260cdf0e10cSrcweir
261b63233d8Sdamjan# convert parametters filesystem root to native notation
262b63233d8Sdamjan# does some real work only on windows, make sure not to
263b63233d8Sdamjan# break the dummy implementations on unx*
264b63233d8Sdamjandefine gb_Helper_convert_native
265b63233d8Sdamjan$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \
266b63233d8Sdamjan$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \
267b63233d8Sdamjan$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \
268b63233d8Sdamjan$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
269b63233d8Sdamjan$(1)))))
270b63233d8Sdamjanendef
271b63233d8Sdamjan
272cdf0e10cSrcweir
2731bb309c6SDamjan Jovanovic# AsmObject class
2741bb309c6SDamjan Jovanovic
2751bb309c6SDamjan Jovanovicgb_AsmObject_EXT := .asm
2761bb309c6SDamjan Jovanovic
2771bb309c6SDamjan Jovanovicdefine gb_AsmObject__command
2781bb309c6SDamjan Jovanovic$(call gb_Output_announce,$(2),$(true),ASM,3)
2791bb309c6SDamjan Jovanovic$(call gb_Helper_abbreviate_dirs_native,\
2801bb309c6SDamjan Jovanovic	mkdir -p $(dir $(1)) && \
2811bb309c6SDamjan Jovanovic	unset INCLUDE && \
2826bf52fdaSDamjan Jovanovic	$(gb_AS) \
2831bb309c6SDamjan Jovanovic		$(DEFS) \
2846bf52fdaSDamjan Jovanovic		-safeseh \
2856bf52fdaSDamjan Jovanovic		-Cp \
2866bf52fdaSDamjan Jovanovic		-coff \
2876bf52fdaSDamjan Jovanovic		-Fo$(1) \
2886bf52fdaSDamjan Jovanovic		-c $(3))
2891bb309c6SDamjan Jovanovicendef
2901bb309c6SDamjan Jovanovic
291cdf0e10cSrcweir# CObject class
292cdf0e10cSrcweir
293cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
294b63233d8Sdamjandefine gb_Object__command_deponcompile
295cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
296cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
297cdf0e10cSrcweir		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
298cdf0e10cSrcweir		-I$(dir $(3)) \
299cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME)%,$(6)) \
300cdf0e10cSrcweir		$(3) \
301cdf0e10cSrcweir		-f - \
302cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
303cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
304cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
305cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
306cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
307cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
308b63233d8Sdamjan	> $(2))
309cdf0e10cSrcweirendef
310cdf0e10cSrcweirelse
311b63233d8Sdamjangb_Object__command_deponcompile =
312cdf0e10cSrcweirendif
313cdf0e10cSrcweir
314cdf0e10cSrcweirdefine gb_CObject__command
315cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C  ,3)
316cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
317b63233d8Sdamjan	mkdir -p $(dir $(1)) $(dir $(4)) && \
318cdf0e10cSrcweir	unset INCLUDE && \
319cdf0e10cSrcweir	$(gb_CC) \
320b63233d8Sdamjan		$(DEFS) \
321b63233d8Sdamjan		$(T_CFLAGS) \
322b63233d8Sdamjan		-Fd$(PDBFILE) \
3238e6bd3e9SDon Lewis		$(CFLAGS) \
324cdf0e10cSrcweir        $(PCHFLAGS) \
325cdf0e10cSrcweir		-I$(dir $(3)) \
326cdf0e10cSrcweir		$(INCLUDE) \
327cdf0e10cSrcweir		-c $(3) \
328cdf0e10cSrcweir		-Fo$(1))
329b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CFLAGS),$(INCLUDE))
330cdf0e10cSrcweirendef
331cdf0e10cSrcweir
332cdf0e10cSrcweir
333cdf0e10cSrcweir# CxxObject class
334cdf0e10cSrcweir
335cdf0e10cSrcweirdefine gb_CxxObject__command
336cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3)
337cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
338b63233d8Sdamjan	mkdir -p $(dir $(1)) $(dir $(4)) && \
339cdf0e10cSrcweir	unset INCLUDE && \
340cdf0e10cSrcweir	$(gb_CXX) \
341b63233d8Sdamjan		$(DEFS) \
342b63233d8Sdamjan		$(T_CXXFLAGS) \
343b63233d8Sdamjan		-Fd$(PDBFILE) \
3448e6bd3e9SDon Lewis		$(CXXFLAGS) \
345cdf0e10cSrcweir        $(PCHFLAGS) \
346cdf0e10cSrcweir		-I$(dir $(3)) \
347cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE) \
348cdf0e10cSrcweir		-c $(3) \
349cdf0e10cSrcweir		-Fo$(1))
350b63233d8Sdamjan$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CXXFLAGS),$(INCLUDE))
351cdf0e10cSrcweirendef
352cdf0e10cSrcweir
353cdf0e10cSrcweir
354cdf0e10cSrcweir# PrecompiledHeader class
355cdf0e10cSrcweir
356e6091915Struckmangb_PrecompiledHeader_get_enableflags = -DPRECOMPILED_HEADERS -Yu$(1).hxx \
357cdf0e10cSrcweir									   -Fp$(call gb_PrecompiledHeader_get_target,$(1))
358cdf0e10cSrcweir
359cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
360cdf0e10cSrcweirdefine gb_PrecompiledHeader__command_deponcompile
361cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
362cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
363cdf0e10cSrcweir		$(4) $(5) \
364cdf0e10cSrcweir		-I$(dir $(3)) \
365cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
366cdf0e10cSrcweir		$(3) \
367cdf0e10cSrcweir		-f - \
368cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
369cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
370cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
371cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
372cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
373cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
374cdf0e10cSrcweir	> $(call gb_PrecompiledHeader_get_dep_target,$(2)))
375cdf0e10cSrcweirendef
376cdf0e10cSrcweirelse
377cdf0e10cSrcweirgb_PrecompiledHeader__command_deponcompile =
378cdf0e10cSrcweirendif
379cdf0e10cSrcweir
380cdf0e10cSrcweir
381cdf0e10cSrcweirdefine gb_PrecompiledHeader__command
382cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
383cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
384cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
385cdf0e10cSrcweir	unset INCLUDE && \
386cdf0e10cSrcweir	$(gb_CXX) \
387cdf0e10cSrcweir		$(4) $(5) -Fd$(PDBFILE) \
388cdf0e10cSrcweir		-I$(dir $(3)) \
389cdf0e10cSrcweir		$(6) \
390cdf0e10cSrcweir		-c $(3) \
391e6091915Struckman		-DPRECOMPILED_HEADERS \
392cdf0e10cSrcweir		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
393cdf0e10cSrcweir$(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
394cdf0e10cSrcweirendef
395cdf0e10cSrcweir
396cdf0e10cSrcweir# NoexPrecompiledHeader class
397cdf0e10cSrcweir
398cdf0e10cSrcweirgb_NoexPrecompiledHeader_get_enableflags = -Yu$(1).hxx \
399cdf0e10cSrcweir										   -Fp$(call gb_NoexPrecompiledHeader_get_target,$(1))
400cdf0e10cSrcweir
401cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
402cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command_deponcompile
403cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
404cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
405cdf0e10cSrcweir		$(4) $(5) \
406cdf0e10cSrcweir		-I$(dir $(3)) \
407cdf0e10cSrcweir		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME)%,$(6)) \
408cdf0e10cSrcweir		$(3) \
409cdf0e10cSrcweir		-f - \
410cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
411cdf0e10cSrcweir		-v OBJECTFILE=$(1) \
412cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
413cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
414cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
415cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
416cdf0e10cSrcweir	> $(call gb_NoexPrecompiledHeader_get_dep_target,$(2)))
417cdf0e10cSrcweirendef
418cdf0e10cSrcweirelse
419cdf0e10cSrcweirgb_NoexPrecompiledHeader__command_deponcompile =
420cdf0e10cSrcweirendif
421cdf0e10cSrcweir
422cdf0e10cSrcweir
423cdf0e10cSrcweirdefine gb_NoexPrecompiledHeader__command
424cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),PCH,1)
425cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
426cdf0e10cSrcweir	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
427cdf0e10cSrcweir	unset INCLUDE && \
428cdf0e10cSrcweir	$(gb_CXX) \
429cdf0e10cSrcweir		$(4) $(5) -Fd$(PDBFILE) \
430cdf0e10cSrcweir		-I$(dir $(3)) \
431cdf0e10cSrcweir		$(6) \
432cdf0e10cSrcweir		-c $(3) \
433e6091915Struckman		-DPRECOMPILED_HEADERS \
434cdf0e10cSrcweir		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
435cdf0e10cSrcweir$(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
436cdf0e10cSrcweirendef
437cdf0e10cSrcweir
438cdf0e10cSrcweir# LinkTarget class
439cdf0e10cSrcweir
440b63233d8Sdamjangb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
441cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
442cdf0e10cSrcweir
443cdf0e10cSrcweirgb_LinkTarget_INCLUDE :=\
444cdf0e10cSrcweir	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
445cdf0e10cSrcweir	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
446cdf0e10cSrcweir
447cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
448cdf0e10cSrcweir
449cdf0e10cSrcweirgb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
450cdf0e10cSrcweir
451cdf0e10cSrcweirdefine gb_LinkTarget__command
452cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
453cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
454cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
455cdf0e10cSrcweir	rm -f $(1) && \
456cdf0e10cSrcweir	RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100, \
4576bf52fdaSDamjan Jovanovic	    $(call gb_Helper_convert_native,\
4586bf52fdaSDamjan Jovanovic		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
4596bf52fdaSDamjan Jovanovic		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
460cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
461cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
462cdf0e10cSrcweir		$(PCHOBJS) $(NATIVERES))) && \
463cdf0e10cSrcweir	$(gb_LINK) \
464dfce871fSDamjan Jovanovic		$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
465cdf0e10cSrcweir		$(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \
466e75d772dSDamjan Jovanovic		$(if $(filter GoogleTest Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
467b63233d8Sdamjan		$(if $(filter YES,$(gb_Executable_TARGETGUI)), -SUBSYSTEM:WINDOWS, -SUBSYSTEM:CONSOLE) \
468b63233d8Sdamjan		$(T_LDFLAGS) \
469cdf0e10cSrcweir		@$${RESPONSEFILE} \
470cdf0e10cSrcweir		$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \
47144c25570SAndre Fischer		$(patsubst %,%.lib,$(EXTERNAL_LIBS)) \
472cdf0e10cSrcweir		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \
473b63233d8Sdamjan		$(LIBS) \
474cdf0e10cSrcweir		$(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); RC=$$?; rm $${RESPONSEFILE} \
475cdf0e10cSrcweir	$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC)
476cdf0e10cSrcweirendef
477cdf0e10cSrcweir
478cdf0e10cSrcweir
479cdf0e10cSrcweir# Library class
480cdf0e10cSrcweir
481b63233d8Sdamjangb_Library_DEFS := -D_DLL_
482edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),INTEL)
48364f1f997SHerbert Dürrgb_Library_TARGETTYPEFLAGS := -DLL -OPT:NOREF -SAFESEH -NXCOMPAT -DYNAMICBASE
484edd74ba5SDamjan Jovanovicendif
485edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),X86_64)
486edd74ba5SDamjan Jovanovicgb_Library_TARGETTYPEFLAGS := -DLL -OPT:NOREF -NXCOMPAT -DYNAMICBASE
487edd74ba5SDamjan Jovanovicendif
488cdf0e10cSrcweirgb_Library_get_rpath :=
489cdf0e10cSrcweir
490cdf0e10cSrcweirgb_Library_SYSPRE := i
491cdf0e10cSrcweirgb_Library_PLAINEXT := .lib
492cdf0e10cSrcweir
493cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \
494cdf0e10cSrcweir	advapi32 \
4956ecc4615Sdamjan	comdlg32 \
496b63233d8Sdamjan	d3d9 \
497b63233d8Sdamjan	d3dx \
498b63233d8Sdamjan	ddraw \
499cdf0e10cSrcweir	gdi32 \
500cdf0e10cSrcweir	gdiplus \
501df3f5cbcSdamjan	glu32 \
502cdf0e10cSrcweir	gnu_getopt \
503cdf0e10cSrcweir	imm32\
504cdf0e10cSrcweir	kernel32 \
505cdf0e10cSrcweir	msimg32 \
506cdf0e10cSrcweir	msvcrt \
507cdf0e10cSrcweir	mpr \
508cdf0e10cSrcweir	oldnames \
509cdf0e10cSrcweir	ole32 \
510cdf0e10cSrcweir	oleaut32 \
511df3f5cbcSdamjan	opengl32 \
512cdf0e10cSrcweir	shell32 \
513b1d3b18cSdamjan	shlwapi \
5145a41b379Sdamjan	strmiids \
515cdf0e10cSrcweir	user32 \
516cdf0e10cSrcweir	uuid \
517cdf0e10cSrcweir	uwinapi \
518b63233d8Sdamjan	winmm \
51942aba0ceSdamjan	winspool \
520ad2376c3Sdamjan	ws2_32 \
52142aba0ceSdamjan	wsock32
522cdf0e10cSrcweir
523cdf0e10cSrcweirgb_Library_LAYER := \
524cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
525cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):OOO) \
526cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \
527cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
528cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
529cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \
530cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):OOO) \
531cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \
532cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
533cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
534cdf0e10cSrcweir
535cdf0e10cSrcweirgb_Library_FILENAMES :=\
536cdf0e10cSrcweir	$(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
537cdf0e10cSrcweir
538cdf0e10cSrcweirgb_Library_DLLEXT := .dll
539cdf0e10cSrcweirgb_Library_MAJORVER := 3
540cdf0e10cSrcweirgb_Library_RTEXT := MSC$(gb_Library_DLLEXT)
5413d2a2350SHerbert Dürr
5423d2a2350SHerbert Dürrifeq ($(USE_SYSTEM_STL),YES)
5433d2a2350SHerbert Dürrifeq ($(gb_PRODUCT),$(true))
5443d2a2350SHerbert Dürrgb_Library_STLEXT := msvcprt.lib
5453d2a2350SHerbert Dürrelse
54623f1be86SHerbert Dürrgb_Library_STLEXT := msvcprt.lib
5473d2a2350SHerbert Dürrendif
5483d2a2350SHerbert Dürrelse
549cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true))
550cdf0e10cSrcweirgb_Library_STLEXT := port_vc7145$(gb_Library_DLLEXT)
551cdf0e10cSrcweirelse
552cdf0e10cSrcweirgb_Library_STLEXT := port_vc7145_stldebug$(gb_Library_DLLEXT)
553cdf0e10cSrcweirendif
5543d2a2350SHerbert Dürrendif
5553d2a2350SHerbert Dürr
5565f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_DLLEXT)
557cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
558cdf0e10cSrcweirgb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
559cdf0e10cSrcweirgb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT)
560cdf0e10cSrcweir
561cdf0e10cSrcweirgb_Library_DLLFILENAMES :=\
562cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \
563cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
564cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
565cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
566cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \
567cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \
568cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):$(lib)$(gb_Library_STLEXT)) \
569cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
570cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
571cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \
572cdf0e10cSrcweir
573cdf0e10cSrcweirdefine gb_Library_Library_platform
574cdf0e10cSrcweir$(call gb_LinkTarget_set_dlltarget,$(2),$(3))
575cdf0e10cSrcweir
576cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
577cdf0e10cSrcweir	$(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \
578cdf0e10cSrcweir	$(3).manifest \
579cdf0e10cSrcweir	$(call gb_LinkTarget_get_pdbfile,$(2)) \
580cdf0e10cSrcweir	$(patsubst %.dll,%.pdb,$(3)) \
581cdf0e10cSrcweir	$(patsubst %.dll,%.ilk,$(3)) \
582cdf0e10cSrcweir)
583cdf0e10cSrcweir
584cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \
585cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
586cdf0e10cSrcweir
587cdf0e10cSrcweirifneq ($(ENABLE_CRASHDUMP),)
588cdf0e10cSrcweir$(call gb_Library_get_target,$(1)) \
589cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS +=  \
590cdf0e10cSrcweir		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \
591cdf0e10cSrcweir		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \
592cdf0e10cSrcweir
593b63233d8Sdamjan$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))),$(patsubst %.dll,%.pdb,$(3)),$(1))
594b63233d8Sdamjan$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))),$(patsubst %.dll,%.ilk,$(3)),$(1))
595cdf0e10cSrcweirendif
596cdf0e10cSrcweir
597b63233d8Sdamjan$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3),$(1))
598cdf0e10cSrcweir
599cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \
600cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
6018e6bd3e9SDon Lewisifeq ($(gb_FULLDEPS),$(true))
6028e6bd3e9SDon Lewis$(call gb_LinkTarget_get_dep_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
6038e6bd3e9SDon Lewisendif
604cdf0e10cSrcweirendef
605cdf0e10cSrcweir
606cdf0e10cSrcweirdefine gb_Library_add_default_nativeres
607cdf0e10cSrcweir$(call gb_WinResTarget_WinResTarget_init,$(1)/$(2))
608cdf0e10cSrcweir$(call gb_WinResTarget_add_file,$(1)/$(2),solenv/inc/shlinfo)
609cdf0e10cSrcweir$(call gb_WinResTarget_set_defs,$(1)/$(2),\
610cdf0e10cSrcweir        $$(DEFS) \
611cdf0e10cSrcweir		-DADDITIONAL_VERINFO1 \
612cdf0e10cSrcweir		-DADDITIONAL_VERINFO2 \
613cdf0e10cSrcweir		-DADDITIONAL_VERINFO3 \
614cdf0e10cSrcweir)
615cdf0e10cSrcweir$(call gb_Library_add_nativeres,$(1),$(2))
616cdf0e10cSrcweir$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/$(2))
617cdf0e10cSrcweir
618cdf0e10cSrcweirendef
619cdf0e10cSrcweir
620cdf0e10cSrcweirdefine gb_Library_add_nativeres
621cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2))
622cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2))
623cdf0e10cSrcweir
624cdf0e10cSrcweirendef
625cdf0e10cSrcweir
626cdf0e10cSrcweirdefine gb_Library_get_dllname
627cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
628cdf0e10cSrcweirendef
629cdf0e10cSrcweir
630cdf0e10cSrcweir
631cdf0e10cSrcweir# StaticLibrary class
632cdf0e10cSrcweir
633cdf0e10cSrcweirgb_StaticLibrary_DEFS :=
634cdf0e10cSrcweirgb_StaticLibrary_TARGETTYPEFLAGS := -LIB
635cdf0e10cSrcweirgb_StaticLibrary_SYSPRE :=
636cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .lib
637cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
638cdf0e10cSrcweir
639cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \
640cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
641cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
642cdf0e10cSrcweir
643cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES))
644cdf0e10cSrcweir
645cdf0e10cSrcweirdefine gb_StaticLibrary_StaticLibrary_platform
646cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \
647cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
648cdf0e10cSrcweir
649cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
650cdf0e10cSrcweir	$(call gb_LinkTarget_get_pdbfile,$(2)) \
651cdf0e10cSrcweir)
652cdf0e10cSrcweir
653cdf0e10cSrcweirendef
654cdf0e10cSrcweir
655cdf0e10cSrcweir# Executable class
656cdf0e10cSrcweir
657cdf0e10cSrcweirgb_Executable_EXT := .exe
658edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),INTEL)
65964f1f997SHerbert Dürrgb_Executable_TARGETTYPEFLAGS := -RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG -SAFESEH -NXCOMPAT -DYNAMICBASE
660edd74ba5SDamjan Jovanovicendif
661edd74ba5SDamjan Jovanovicifeq ($(CPUNAME),X86_64)
662edd74ba5SDamjan Jovanovicgb_Executable_TARGETTYPEFLAGS := -RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG -NXCOMPAT -DYNAMICBASE
663edd74ba5SDamjan Jovanovicendif
664cdf0e10cSrcweirgb_Executable_get_rpath :=
665b63233d8Sdamjangb_Executable_TARGETGUI :=
666cdf0e10cSrcweir
667cdf0e10cSrcweirdefine gb_Executable_Executable_platform
668cdf0e10cSrcweir$(call gb_LinkTarget_set_auxtargets,$(2),\
669cdf0e10cSrcweir	$(patsubst %.exe,%.pdb,$(call gb_LinkTarget_get_target,$(2))) \
670cdf0e10cSrcweir	$(call gb_LinkTarget_get_pdbfile,$(2)) \
671cdf0e10cSrcweir	$(call gb_LinkTarget_get_target,$(2)).manifest \
672cdf0e10cSrcweir)
673cdf0e10cSrcweir
674cdf0e10cSrcweir$(call gb_Executable_get_target,$(1)) \
675cdf0e10cSrcweir$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_get_target,$(1)).manifest
676b63233d8Sdamjan$(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest,$(call gb_LinkTarget_get_target,$(2)).manifest,$(1))
677cdf0e10cSrcweir
678cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) \
679cdf0e10cSrcweir$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2))
680cdf0e10cSrcweir
681cdf0e10cSrcweirendef
682cdf0e10cSrcweir
683e75d772dSDamjan Jovanovic# GoogleTest class
684e75d772dSDamjan Jovanovic
685e75d772dSDamjan Jovanovicgb_GoogleTest_GTESTPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
686e75d772dSDamjan Jovanovicgb_GoogleTest_get_filename = $(1)$(gb_Executable_EXT)
687e75d772dSDamjan Jovanovic
688e75d772dSDamjan Jovanovicdefine gb_GoogleTest_GoogleTest_platform
689e75d772dSDamjan Jovanovicendef
690e75d772dSDamjan Jovanovic
691cdf0e10cSrcweir# JunitTest class
692cdf0e10cSrcweir
693cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform
694cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : DEFS := \
69564c5c8b7SDamjan Jovanovic	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(SRCDIR)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/OpenOffice 4/program/soffice.exe}" \
696cdf0e10cSrcweir    -Dorg.openoffice.test.arg.env=PATH \
697cdf0e10cSrcweir    -Dorg.openoffice.test.arg.user=file:///$(call gb_JunitTest_get_userdir,$(1)) \
698cdf0e10cSrcweir
699cdf0e10cSrcweirendef
700cdf0e10cSrcweir
701cdf0e10cSrcweir
702d6a83b31SDamjan Jovanovic# Ant class
703d6a83b31SDamjan Jovanovic
704d6a83b31SDamjan Jovanovicdefine gb_Ant_add_dependencies
705d6a83b31SDamjan Jovanovic__ant_out:=$(shell $(gb_Ant_ANTCOMMAND) -Ddependencies.outfile=`cygpath -m $(WORKDIR)/Ant/$(1)/deps` -f `cygpath -m $(2)` dependencies)
706d6a83b31SDamjan Jovanovic$$(eval $(foreach dep,$(shell cat $(WORKDIR)/Ant/$(1)/deps),$$(call gb_Ant_add_dependency,$(call gb_Ant_get_target,$(1)),$(shell cygpath -u $(dep)))))
707d6a83b31SDamjan Jovanovic
708d6a83b31SDamjan Jovanovicendef
709d6a83b31SDamjan Jovanovic
710d6a83b31SDamjan Jovanovic
711d6a83b31SDamjan Jovanovic
712cdf0e10cSrcweir# SdiTarget class
713cdf0e10cSrcweir
714cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
715cdf0e10cSrcweir
716cdf0e10cSrcweir# SrsPartMergeTarget
717cdf0e10cSrcweir
718cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
719cdf0e10cSrcweir
720cdf0e10cSrcweir# SrsPartTarget class
721cdf0e10cSrcweir
722cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
723cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
724cdf0e10cSrcweir
725cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
726cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep
727cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
728cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
729cdf0e10cSrcweir		$(INCLUDE) \
730cdf0e10cSrcweir		$(DEFS) \
731cdf0e10cSrcweir		$(2) \
732cdf0e10cSrcweir		-f - \
733cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
734cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
735cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
736cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
737cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
738cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
739cdf0e10cSrcweir	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
740cdf0e10cSrcweirendef
741cdf0e10cSrcweirelse
742cdf0e10cSrcweirgb_SrsPartTarget__command_dep =
743cdf0e10cSrcweirendif
744cdf0e10cSrcweir
745cdf0e10cSrcweir# WinResTarget class
746cdf0e10cSrcweir
747cdf0e10cSrcweirgb_WinResTarget_POSTFIX :=.res
748cdf0e10cSrcweir
749cdf0e10cSrcweirdefine gb_WinResTarget__command
750cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),RES,3)
751cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
752cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
753cdf0e10cSrcweir	$(gb_RC) \
754cdf0e10cSrcweir		$(DEFS) $(FLAGS) \
755cdf0e10cSrcweir		-I$(dir $(3)) \
756cdf0e10cSrcweir		$(INCLUDE) \
757cdf0e10cSrcweir		-Fo$(1) \
758cdf0e10cSrcweir        $(RCFILE) )
759cdf0e10cSrcweirendef
760cdf0e10cSrcweir
761cdf0e10cSrcweir$(eval $(call gb_Helper_make_dep_targets,\
762cdf0e10cSrcweir	WinResTarget \
763cdf0e10cSrcweir))
764cdf0e10cSrcweir
765cdf0e10cSrcweirifeq ($(gb_FULLDEPS),$(true))
766cdf0e10cSrcweirdefine gb_WinResTarget__command_dep
767cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\
768cdf0e10cSrcweir	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
769cdf0e10cSrcweir		$(INCLUDE) \
770cdf0e10cSrcweir		$(DEFS) \
771cdf0e10cSrcweir		$(2) \
772cdf0e10cSrcweir		-f - \
773cdf0e10cSrcweir	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
774cdf0e10cSrcweir		-v OBJECTFILE=$(call gb_WinResTarget_get_target,$(1)) \
775cdf0e10cSrcweir		-v OUTDIR=$(OUTDIR)/ \
776cdf0e10cSrcweir		-v WORKDIR=$(WORKDIR)/ \
777cdf0e10cSrcweir		-v SRCDIR=$(SRCDIR)/ \
778cdf0e10cSrcweir		-v REPODIR=$(REPODIR)/ \
779cdf0e10cSrcweir	> $(call gb_WinResTarget_get_dep_target,$(1)))
780cdf0e10cSrcweirendef
781cdf0e10cSrcweirelse
782cdf0e10cSrcweirgb_WinResTarget__command_dep =
783cdf0e10cSrcweirendif
784cdf0e10cSrcweir
785cdf0e10cSrcweir# ComponentTarget
786cdf0e10cSrcweir
787cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin"
788cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \
789910823aeSJürgen Schmidt    OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \
790cdf0e10cSrcweir    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
791b63233d8Sdamjan    NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \
792b63233d8Sdamjan
793b63233d8Sdamjan# UnoApiTarget
794b63233d8Sdamjan
795b63233d8Sdamjangb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe
796b63233d8Sdamjangb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET)
797b63233d8Sdamjangb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe
798b63233d8Sdamjangb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET)
799b63233d8Sdamjangb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe
800b63233d8Sdamjangb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
801b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe
802b63233d8Sdamjangb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
803b63233d8Sdamjangb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe
804b63233d8Sdamjangb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
805cdf0e10cSrcweir
806cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
807