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