1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 gb_DEVINSTALLROOT
:= $(DEVINSTALLDIR
)/opt
22 gb_PROGRAMDIRNAME
:= program
24 # Convert path to file URL.
25 define gb_Helper_make_url
31 define gb_YaccTarget__command
32 $(call gb_Output_announce
,$(2),$(true
),YAC
,3)
33 $(call gb_Helper_abbreviate_dirs
,\
34 mkdir
-p
$(dir $(3)) && \
35 $(gb_YACC
) $(T_YACCFLAGS
) --defines
=$(4) -o
$(5) $(1) && touch
$(3) )
41 # $(call gb_CObject__command,object,relative-source,source,dep-file)
42 define gb_CObject__command
43 $(call gb_Output_announce
,$(2).c
,$(true
),C
,3)
44 $(call gb_Helper_abbreviate_dirs
,\
45 mkdir
-p
$(dir $(1)) $(dir $(4)) && \
47 $(if
$(filter YES
,$(COBJECT_X64
)), $(CXX_X64_BINARY
), $(gb_CC
)) \
50 $(T_CFLAGS
) $(T_CFLAGS_APPEND
) \
51 $(if
$(WARNINGS_NOT_ERRORS
),,$(gb_CFLAGS_WERROR
)) \
53 $(gb_COMPILERDEPFLAGS
) \
56 $(if
$(filter YES
,$(COBJECT_X64
)), -U_X86_
-D_AMD64_
,) \
58 -Fo
$(1)) $(call gb_create_deps
,$(4),$(1),$(3))
64 # $(call gb_CxxObject__command,object,relative-source,source,dep-file)
65 define gb_CxxObject__command
66 $(call gb_Output_announce
,$(2).
cxx,$(true
),CXX
,3)
67 $(call gb_Helper_abbreviate_dirs
,\
68 mkdir
-p
$(dir $(1)) $(dir $(4)) && \
70 $(if
$(filter YES
,$(CXXOBJECT_X64
)), $(CXX_X64_BINARY
), $(gb_CXX
)) \
73 $(T_CXXFLAGS
) $(T_CXXFLAGS_APPEND
) \
74 $(if
$(WARNINGS_NOT_ERRORS
),,$(gb_CXXFLAGS_WERROR
)) \
77 $(gb_COMPILERDEPFLAGS
) \
80 $(if
$(filter YES
,$(CXXOBJECT_X64
)), -U_X86_
-D_AMD64_
,) \
82 -Fo
$(1)) $(call gb_create_deps
,$(4),$(1),$(3))
86 # PrecompiledHeader class
88 # Note: MSVC has a race condition when dealing with .pdb files, that can result in error C1033 when
89 # the .pdb file already exists and two cl.exe invocations try to modify it at the same time (which
90 # is apparently most likely when generating both .pch files). The no-exceptions variant should be
91 # rarely needed now, but in case this turns out to be a problem in practice, this will need to
92 # be handled somehow (such as order-dependency of one on another).
94 gb_PrecompiledHeader_get_enableflags
= -Yu
$(1).hxx \
96 -Fp
$(call gb_PrecompiledHeader_get_target
,$(1)) \
99 # MSVC PCH needs extra .obj created during the creation of the PCH file
100 gb_PrecompiledHeader_get_objectfile
= $(1).obj
102 define gb_PrecompiledHeader__command
103 $(call gb_Output_announce
,$(2),$(true
),PCH
,1)
104 $(call gb_Helper_abbreviate_dirs
,\
105 mkdir
-p
$(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target
,$(2))) && \
108 $(4) $(5) -Fd
$(PDBFILE
) \
109 $(gb_COMPILERDEPFLAGS
) \
113 -Yc
$(notdir $(patsubst %.
cxx,%.hxx
,$(3))) -Fp
$(1) -Fo
$(1).obj
) $(call gb_create_deps
,$(call gb_PrecompiledHeader_get_dep_target
,$(2)),$(1),$(3))
116 # NoexPrecompiledHeader class
118 gb_NoexPrecompiledHeader_get_enableflags
= -Yu
$(1).hxx \
120 -Fp
$(call gb_NoexPrecompiledHeader_get_target
,$(1)) \
123 gb_NoexPrecompiledHeader_get_objectfile
= $(1).obj
125 define gb_NoexPrecompiledHeader__command
126 $(call gb_Output_announce
,$(2),$(true
),PCH
,1)
127 $(call gb_Helper_abbreviate_dirs
,\
128 mkdir
-p
$(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target
,$(2))) && \
131 $(4) $(5) -Fd
$(PDBFILE
) \
132 $(gb_COMPILERDEPFLAGS
) \
136 -Yc
$(notdir $(patsubst %.
cxx,%.hxx
,$(3))) -Fp
$(1) -Fo
$(1).obj
) $(call gb_create_deps
,$(call gb_NoexPrecompiledHeader_get_dep_target
,$(2)),$(1),$(3))
141 gb_AsmObject_get_source
= $(1)/$(2).asm
143 define gb_AsmObject__command
144 $(call gb_Output_announce
,$(2),$(true
),ASM
,3)
145 $(call gb_Helper_abbreviate_dirs
,\
146 mkdir
-p
$(dir $(1)) $(dir $(4)) && \
147 "$(ML_EXE)" /c
/Cp
$(gb_AFLAGS
) -D
$(COM
) /Fo
$(1) $(3)) && \
148 echo
"$(1) : $(3)" > $(4)
154 gb_LinkTarget_CFLAGS
:= $(gb_CFLAGS
)
155 gb_LinkTarget_CXXFLAGS
:= $(gb_CXXFLAGS
)
157 gb_LinkTarget_INCLUDE
:=\
158 $(subst -I.
, ,$(SOLARINC
)) \
159 $(foreach inc
,$(subst ;, ,$(JDKINC
)),-I
$(inc
)) \
160 -I
$(BUILDDIR
)/config_
$(gb_Side
) \
162 gb_LinkTarget_get_pdbfile
= $(call gb_LinkTarget_get_target
,)pdb
/$(1).pdb
164 # avoid fatal error LNK1170 for Library_merged
165 define gb_LinkTarget_MergedResponseFile
166 cut
-f
-1000 -d
' ' $${RESPONSEFILE} > $${RESPONSEFILE}.1 && \
167 cut
-f
1001- -d
' ' $${RESPONSEFILE} >> $${RESPONSEFILE}.1 && \
168 mv
$${RESPONSEFILE}.1 $${RESPONSEFILE} &&
171 ifeq ($(CPUNAME
),X86_64
)
172 MSC_SUBSYSTEM_VERSION
=$(COMMA
)5.02
174 MSC_SUBSYSTEM_VERSION
=$(COMMA
)5.01
177 define gb_LinkTarget__command
178 $(call gb_Output_announce
,$(2),$(true
),LNK
,4)
179 $(call gb_Helper_abbreviate_dirs
,\
180 mkdir
-p
$(dir $(1)) && \
182 RESPONSEFILE
=$(call var2file
,$(shell $(gb_MKTEMP
)),100, \
183 $(foreach object
,$(CXXOBJECTS
),$(call gb_CxxObject_get_target
,$(object
))) \
184 $(foreach object
,$(GENCXXOBJECTS
),$(call gb_GenCxxObject_get_target
,$(object
))) \
185 $(foreach object
,$(COBJECTS
),$(call gb_CObject_get_target
,$(object
))) \
186 $(foreach object
,$(GENCOBJECTS
),$(call gb_GenCObject_get_target
,$(object
))) \
187 $(foreach object
,$(ASMOBJECTS
),$(call gb_AsmObject_get_target
,$(object
))) \
188 $(foreach extraobjectlist
,$(EXTRAOBJECTLISTS
),$(shell cat
$(extraobjectlist
))) \
189 $(PCHOBJS
) $(NATIVERES
)) && \
190 $(if
$(filter $(call gb_Library_get_linktargetname
,merged
),$(2)),$(call gb_LinkTarget_MergedResponseFile
)) \
192 $(if
$(filter YES
,$(LIBRARY_X64
)), $(LINK_X64_BINARY
), $(gb_LINK
)) \
193 $(if
$(filter Library CppunitTest
,$(TARGETTYPE
)),$(gb_Library_TARGETTYPEFLAGS
)) \
194 $(if
$(filter StaticLibrary
,$(TARGETTYPE
)),$(gb_StaticLibrary_TARGETTYPEFLAGS
)) \
195 $(if
$(filter Executable
,$(TARGETTYPE
)),$(gb_Executable_TARGETTYPEFLAGS
)) \
196 $(if
$(filter YES
,$(LIBRARY_X64
)),,$(if
$(filter YES
,$(TARGETGUI
)), -SUBSYSTEM
:WINDOWS
$(MSC_SUBSYSTEM_VERSION
), -SUBSYSTEM
:CONSOLE
$(MSC_SUBSYSTEM_VERSION
))) \
197 $(if
$(filter YES
,$(LIBRARY_X64
)), -MACHINE
:X64
) \
198 $(if
$(filter YES
,$(LIBRARY_X64
)), \
199 -LIBPATH
:$(OUTDIR
)/lib
/x64 \
200 -LIBPATH
:$(COMPATH
)/lib
/amd64 \
201 -LIBPATH
:$(WINDOWS_SDK_HOME
)/lib
/x64 \
202 $(if
$(filter 80,$(WINDOWS_SDK_VERSION
)),-LIBPATH
:$(WINDOWS_SDK_HOME
)/lib
/win8
/um
/x64
)) \
205 $(foreach lib
,$(LINKED_LIBS
),$(call gb_Library_get_filename
,$(lib
))) \
206 $(foreach lib
,$(LINKED_STATIC_LIBS
),$(call gb_StaticLibrary_get_filename
,$(lib
))) \
208 $(if
$(filter-out StaticLibrary
,$(TARGETTYPE
)),user32.lib
) \
209 $(if
$(DLLTARGET
),-out
:$(DLLTARGET
) -implib
:$(1),-out
:$(1)); RC
=$$?
; rm $${RESPONSEFILE} \
210 $(if
$(DLLTARGET
),; if
[ ! -f
$(DLLTARGET
) ]; then
rm -f
$(1) && false
; fi
) \
211 $(if
$(filter Library
,$(TARGETTYPE
)),&& if
[ -f
$(DLLTARGET
).manifest
]; then mt.exe
$(MTFLAGS
) -nologo
-manifest
$(DLLTARGET
).manifest
-outputresource
:$(DLLTARGET
)\
;2 && touch
-r
$(1) $(DLLTARGET
).manifest
$(DLLTARGET
); fi
) \
212 $(if
$(filter Executable
,$(TARGETTYPE
)),&& if
[ -f
$(1).manifest
]; then mt.exe
$(MTFLAGS
) -nologo
-manifest
$(1).manifest
-outputresource
:$(1)\
;1 && touch
-r
$(1) $(1).manifest
; fi
) \
213 $(if
$(filter YES
,$(TARGETGUI
)),&& if
[ -f
$(SRCDIR
)/solenv
/inc
/DeclareDPIAware.manifest
]; then mt.exe
$(MTFLAGS
) -nologo
-manifest
$(SRCDIR
)/solenv
/inc
/DeclareDPIAware.manifest
-updateresource
:$(1)\
;1 ; fi
) \
214 $(if
$(filter Library
,$(TARGETTYPE
)),&& \
215 echo
$(notdir $(DLLTARGET
)) > $(1).exports.tmp
&& \
216 $(if
$(filter YES
,$(LIBRARY_X64
)),$(LINK_X64_BINARY
),$(gb_LINK
)) \
217 -dump
-exports
$(1) >> $(1).exports.tmp
&& \
218 if cmp
-s
$(1).exports.tmp
$(1).exports
; \
219 then
rm $(1).exports.tmp
; \
220 else mv
$(1).exports.tmp
$(1).exports
; touch
-r
$(1) $(1).exports
; \
225 define gb_MSVCRT_subst
226 $(if
$(MSVC_USE_DEBUG_RUNTIME
),$(subst msvcrt
,msvcrtd
,$(subst msvcprt
,msvcprtd
,$(subst libcmt
,libcmtd
,$(subst libcpmt
,libcpmtd
,$(subst msvcmrt
,msvcmrtd
,$(1)))))),$(1))
229 define gb_LinkTarget_use_system_win32_libs
230 $(call gb_LinkTarget_add_libs
,$(1),$(foreach lib
,$(2),$(call gb_MSVCRT_subst
,$(lib
)).lib
))
233 # Flags common for PE executables (EXEs and DLLs)
234 gb_Windows_PE_TARGETTYPEFLAGS
:= \
246 gb_Library_DEFS
:= -D_DLL
247 gb_Library_TARGETTYPEFLAGS
:= \
249 $(gb_Windows_PE_TARGETTYPEFLAGS
)
251 ifeq ($(ENABLE_LTO
),TRUE
)
252 gb_Library_TARGETTYPEFLAGS
+= -LTCG
255 gb_Library_get_rpath
:=
257 gb_Library_SYSPRE
:= i
258 gb_Library_PLAINEXT
:= .lib
260 gb_Library_LAYER
:= \
261 $(foreach lib
,$(gb_Library_OOOLIBS
),$(lib
):OOO
) \
262 $(foreach lib
,$(gb_Library_PLAINLIBS_NONE
),$(lib
):OOO
) \
263 $(foreach lib
,$(gb_Library_PLAINLIBS_URE
),$(lib
):URELIB
) \
264 $(foreach lib
,$(gb_Library_PLAINLIBS_OOO
),$(lib
):OOO
) \
265 $(foreach lib
,$(gb_Library_PRIVATELIBS_URE
),$(lib
):URELIB
) \
266 $(foreach lib
,$(gb_Library_RTVERLIBS
),$(lib
):URELIB
) \
267 $(foreach lib
,$(gb_Library_UNOLIBS_URE
),$(lib
):URELIB
) \
268 $(foreach lib
,$(gb_Library_UNOVERLIBS
),$(lib
):URELIB
) \
269 $(foreach lib
,$(gb_Library_EXTENSIONLIBS
),$(lib
):OXT
) \
271 gb_Library_FILENAMES
:=\
272 $(foreach lib
,$(gb_Library_KNOWNLIBS
),$(lib
):$(gb_Library_SYSPRE
)$(lib
)$(gb_Library_PLAINEXT
)) \
274 gb_Library_DLLEXT
:= .dll
275 gb_Library_MAJORVER
:= 3
276 gb_Library_RTEXT
:= MSC
$(gb_Library_DLLEXT
)
277 gb_Library_OOOEXT
:= $(gb_Library_DLLPOSTFIX
)$(gb_Library_DLLEXT
)
278 gb_Library_UNOEXT
:= .uno
$(gb_Library_DLLEXT
)
279 gb_Library_UNOVEREXT
:= $(gb_Library_MAJORVER
)$(gb_Library_DLLEXT
)
280 gb_Library_RTVEREXT
:= $(gb_Library_MAJORVER
)$(gb_Library_RTEXT
)
282 gb_Library_DLLFILENAMES
:=\
283 $(foreach lib
,$(gb_Library_OOOLIBS
),$(lib
):$(lib
)$(gb_Library_OOOEXT
)) \
284 $(foreach lib
,$(gb_Library_PLAINLIBS_NONE
),$(lib
):$(lib
)$(gb_Library_DLLEXT
)) \
285 $(foreach lib
,$(gb_Library_PLAINLIBS_URE
),$(lib
):$(lib
)$(gb_Library_DLLEXT
)) \
286 $(foreach lib
,$(gb_Library_PLAINLIBS_OOO
),$(lib
):$(lib
)$(gb_Library_DLLEXT
)) \
287 $(foreach lib
,$(gb_Library_PRIVATELIBS_URE
),$(lib
):$(lib
)$(gb_Library_OOOEXT
)) \
288 $(foreach lib
,$(gb_Library_RTVERLIBS
),$(lib
):$(lib
)$(gb_Library_RTVEREXT
)) \
289 $(foreach lib
,$(gb_Library_UNOLIBS_URE
),$(lib
):$(lib
)$(gb_Library_UNOEXT
)) \
290 $(foreach lib
,$(gb_Library_UNOVERLIBS
),$(lib
):$(lib
)$(gb_Library_UNOVEREXT
)) \
291 $(foreach lib
,$(gb_Library_EXTENSIONLIBS
),$(lib
):$(lib
)$(gb_Library_UNOEXT
)) \
293 # An assembly is a special kind of library for CLI
294 define gb_Library_Assembly
295 $(call gb_Library_Library
,$(1))
296 $(call gb_LinkTarget_get_target
,$(call gb_Library_get_linktargetname
,$(1))) : NATIVERES
:=
300 define gb_Library_Library_platform
301 $(call gb_LinkTarget_set_dlltarget
,$(2),$(3))
303 $(call gb_LinkTarget_add_auxtargets
,$(2),\
304 $(patsubst %.lib
,%.exp
,$(call gb_LinkTarget_get_target
,$(2))) \
306 $(call gb_LinkTarget_get_pdbfile
,$(2)) \
309 $(if
$(filter $(gb_MERGEDLIBS
),$(1)),,\
310 $(call gb_Library_add_auxtarget
,$(1),$(OUTDIR
)/bin
/$(notdir $(3))))
312 # substitute .pyd here because pyuno has to follow python's crazy conventions
313 ifneq ($(ENABLE_CRASHDUMP
),)
314 $(call gb_Library_add_auxtargets
,$(1),\
315 $(OUTDIR
)/bin
/$(notdir $(patsubst %.dll
,%.pdb
,$(patsubst %.pyd
,%.dll
,$(3)))) \
316 $(OUTDIR
)/bin
/$(notdir $(patsubst %.dll
,%.ilk
,$(patsubst %.pyd
,%.dll
,$(3)))) \
319 $(call gb_LinkTarget_add_auxtargets
,$(2),\
320 $(patsubst %.dll
,%.pdb
,$(patsubst %.pyd
,%.dll
,$(3))) \
321 $(patsubst %.dll
,%.ilk
,$(patsubst %.pyd
,%.dll
,$(3))) \
325 $(call gb_Library_add_default_nativeres
,$(1),$(1)/default
)
327 $(if
$(filter $(gb_MERGEDLIBS
),$(1)),,$(call gb_Deliver_add_deliverable
,$(OUTDIR
)/bin
/$(notdir $(3)),$(3),$(1)))
329 $(call gb_LinkTarget_get_target
,$(2)) \
330 $(call gb_LinkTarget_get_headers_target
,$(2)) : PDBFILE
= $(call gb_LinkTarget_get_pdbfile
,$(2))
334 define gb_Library_add_default_nativeres
335 $(call gb_WinResTarget_WinResTarget_init
,$(2))
336 $(call gb_WinResTarget_set_rcfile
,$(2),include/default
)
337 $(call gb_WinResTarget_add_defs
,$(2),\
338 -DVERVARIANT
="$(LIBO_VERSION_PATCH)" \
339 -DRES_APP_VENDOR
="$(OOO_VENDOR)" \
340 -DORG_NAME
="$(call gb_Library_get_dllname,$(1))"\
341 -DINTERNAL_NAME
="$(subst $(gb_Library_DLLEXT),,$(call gb_Library_get_dllname,$(1)))" \
342 -DADDITIONAL_VERINFO1
="" \
343 -DADDITIONAL_VERINFO2
="" \
344 -DADDITIONAL_VERINFO3
="" \
346 $(call gb_Library_add_nativeres
,$(1),$(2))
347 $(call gb_Library_get_clean_target
,$(1)) : $(call gb_WinResTarget_get_clean_target
,$(2))
351 define gb_LinkTarget_add_nativeres
352 $(call gb_LinkTarget_get_target
,$(1)) : $(call gb_WinResTarget_get_target
,$(2))
353 $(call gb_LinkTarget_get_target
,$(1)) : NATIVERES
+= $(call gb_WinResTarget_get_target
,$(2))
357 define gb_LinkTarget_set_nativeres
358 $(call gb_LinkTarget_get_target
,$(1)) : $(call gb_WinResTarget_get_target
,$(2))
359 $(call gb_LinkTarget_get_target
,$(1)) : NATIVERES
:= $(call gb_WinResTarget_get_target
,$(2))
363 define gb_Library_get_dllname
364 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES
)))
367 # in effect this just causes the .export target to be touched
368 # cannot be the .lib itself because that causes attempts to get it linked :(
369 define gb_Library_get_exports_target
370 $(call gb_LinkTarget_get_target
,$(call gb_Library_get_linktargetname
,$(1))).exports
374 # StaticLibrary class
376 gb_StaticLibrary_TARGETTYPEFLAGS
:= -LIB
377 gb_StaticLibrary_SYSPRE
:=
378 gb_StaticLibrary_PLAINEXT
:= .lib
380 gb_StaticLibrary_FILENAMES
:= \
381 $(foreach lib
,$(gb_StaticLibrary_PLAINLIBS
),$(lib
):$(gb_StaticLibrary_SYSPRE
)$(lib
)$(gb_StaticLibrary_PLAINEXT
)) \
383 define gb_StaticLibrary_StaticLibrary_platform
384 $(call gb_LinkTarget_get_target
,$(2)) \
385 $(call gb_LinkTarget_get_headers_target
,$(2)) : PDBFILE
= $(call gb_LinkTarget_get_pdbfile
,$(2))
387 $(call gb_LinkTarget_add_auxtargets
,$(2),\
388 $(call gb_LinkTarget_get_pdbfile
,$(2)) \
395 gb_Executable_EXT
:= .exe
396 gb_Executable_EXT_for_build
:= .exe
397 gb_Executable_TARGETTYPEFLAGS
:= $(gb_Windows_PE_TARGETTYPEFLAGS
)
399 gb_Executable_get_rpath
:=
401 define gb_Executable_Executable_platform
402 $(call gb_LinkTarget_add_auxtargets
,$(2),\
403 $(patsubst %.exe
,%.pdb
,$(call gb_LinkTarget_get_target
,$(2))) \
404 $(call gb_LinkTarget_get_pdbfile
,$(2)) \
407 $(call gb_Executable_add_auxtarget
,$(1),$(call gb_Executable_get_target
,$(1)).manifest
)
408 $(call gb_Deliver_add_deliverable
,$(call gb_Executable_get_target
,$(1)).manifest
,$(call gb_LinkTarget_get_target
,$(2)).manifest
,$(1))
410 $(call gb_LinkTarget_get_target
,$(2)) \
411 $(call gb_LinkTarget_get_headers_target
,$(2)) : PDBFILE
:= $(call gb_LinkTarget_get_pdbfile
,$(2))
412 $(call gb_LinkTarget_get_target
,$(2)) : TARGETGUI
:=
418 gb_CppunitTest_DEFS
:= -D_DLL
419 # cppunittester.exe is in the cppunit subdirectory of ${OUTDIR}/bin,
420 # thus it won't find its DLLs unless ${OUTDIR}/bin is added to PATH.
421 gb_CppunitTest_CPPTESTPRECOMMAND
:= $(gb_Helper_set_ld_path
)
423 gb_CppunitTest_SYSPRE
:= itest_
424 gb_CppunitTest_EXT
:= .lib
425 gb_CppunitTest_LIBDIR
:= $(gb_Helper_OUTDIRLIBDIR
)
426 gb_CppunitTest_get_filename
= $(gb_CppunitTest_SYSPRE
)$(1)$(gb_CppunitTest_EXT
)
427 gb_CppunitTest_get_libfilename
= test_
$(1).dll
429 define gb_CppunitTest_CppunitTest_platform
430 $(call gb_LinkTarget_set_dlltarget
,$(2),$(3))
432 $(call gb_LinkTarget_add_auxtargets
,$(2),\
433 $(patsubst %.lib
,%.exp
,$(call gb_LinkTarget_get_target
,$(2))) \
436 $(patsubst %.dll
,%.pdb
,$(3)) \
437 $(call gb_LinkTarget_get_pdbfile
,$(2)) \
438 $(patsubst %.dll
,%.ilk
,$(3)) \
441 $(call gb_LinkTarget_get_target
,$(2)) \
442 $(call gb_LinkTarget_get_headers_target
,$(2)) : PDBFILE
= $(call gb_LinkTarget_get_pdbfile
,$(2))
448 gb_defaultlangiso
:= en-US
449 gb_smoketest_instset
:= $(SRCDIR
)/instsetoo_native
/$(INPATH
)/OpenOffice
/archive
/install/$(gb_defaultlangiso
)/OOo_
*_install-arc_
$(gb_defaultlangiso
).zip
451 ifneq ($(OOO_TEST_SOFFICE
),)
452 gb_JunitTest_SOFFICEARG
:=$(OOO_TEST_SOFFICE
)
454 ifneq ($(gb_JunitTest_DEBUGRUN
),)
455 gb_JunitTest_SOFFICEARG
:=connect
:pipe
,name
=$(USER
)
457 gb_JunitTest_SOFFICEARG
:=path
:$(gb_DEVINSTALLROOT
)/program
/soffice
462 define gb_JunitTest_JunitTest_platform
463 $(call gb_JunitTest_get_target
,$(1)) : DEFS
:= \
464 -Dorg.openoffice.
test.arg.soffice
="$$$${OOO_TEST_SOFFICE:-path:$(gb_DEVINSTALLROOT)/program/soffice.exe}" \
465 -Dorg.openoffice.
test.arg.env
=PATH
="$$$$PATH" \
466 -Dorg.openoffice.
test.arg.user
=$(call gb_Helper_make_url
,$(call gb_JunitTest_get_userdir
,$(1)))
473 gb_PythonTest_PRECOMMAND
:=
475 # SrsPartTarget class
477 ifeq ($(gb_FULLDEPS
),$(true
))
478 gb_SrsPartTarget__command_target
= $(OUTDIR
)/bin
/makedepend
$(gb_Executable_EXT
)
479 define gb_SrsPartTarget__command_dep
480 $(call gb_Helper_abbreviate_dirs
,\
481 $(OUTDIR
)/bin
/makedepend
$(gb_Executable_EXT
) \
486 -p
$(dir $(call gb_SrsPartTarget_get_target
,$(1))) \
487 -f
$(call gb_SrsPartTarget_get_dep_target
,$(1)))
490 gb_SrsPartTarget__command_target
=
491 gb_SrsPartTarget__command_dep
=
496 gb_WinResTarget_POSTFIX
:=.res
498 # rc.exe does not support -nologo in 6.1.6723.1 that is in the Windows SDK 6.0A
499 define gb_WinResTarget__command
500 $(call gb_Output_announce
,$(2),$(true
),RC
,1)
501 $(call gb_Helper_abbreviate_dirs
,\
502 mkdir
-p
$(dir $(1)) && \
510 define gb_WinResTarget_WinResTarget_platform
511 $(call gb_WinResTarget_get_target
,$(1)) : $(call gb_Package_get_target
,solenv_inc
)
515 $(eval
$(call gb_Helper_make_dep_targets
,\
519 ifeq ($(gb_FULLDEPS
),$(true
))
520 gb_WinResTarget__command_target
= $(OUTDIR
)/bin
/makedepend
$(gb_Executable_EXT
)
521 define gb_WinResTarget__command_dep
522 $(call gb_Output_announce
,RC
:$(2),$(true
),DEP
,1)
523 $(call gb_Helper_abbreviate_dirs
,\
524 mkdir
-p
$(dir $(1)) && \
525 $(OUTDIR
)/bin
/makedepend
$(gb_Executable_EXT
) \
534 gb_WinResTarget__command_target
=
535 gb_WinResTarget__command_dep
=
538 # InstallModuleTarget class
540 define gb_InstallModuleTarget_InstallModuleTarget_platform
541 $(call gb_InstallModuleTarget_add_defs
,$(1),\
545 $(if
$(filter TRUE
,$(SOLAR_JAVA
)),-DSOLAR_JAVA
) \
550 # ExternalProject class
552 # Use the gcc wrappers for a autoconf based project
554 # gb_ExternalProject_register_targets project state_target
555 define gb_ExternalProject_use_autoconf
556 $(call gb_ExternalProject_get_preparation_target
,$(1)) : $(call gb_Executable_get_runtime_dependencies
,gcc-wrapper
) \
557 $(call gb_Executable_get_runtime_dependencies
,g
++-wrapper
)
558 $(call gb_ExternalProject_get_state_target
,$(1),$(2)): WRAPPERS
:= $(gb_AUTOCONF_WRAPPERS
)
561 # if ccache is enabled, then split it and use lastword as REAL_FOO
562 # /opt/lo/bin/ccache /cygdrive/c/PROGRA~2/MICROS~2.0/VC/bin/cl.exe
564 gb_AUTOCONF_WRAPPERS
:= \
565 REAL_CC
="$(shell cygpath -w $(CC))" \
566 CC
="$(call gb_Executable_get_target,gcc-wrapper)" \
567 REAL_CXX
="$(shell cygpath -w $(CXX))" \
568 CXX
="$(call gb_Executable_get_target,g++-wrapper)" \
569 LD
="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo"
571 # InstallScript class
573 gb_InstallScript_EXT
:= .inf
575 # CliAssemblyTarget class
577 gb_CliAssemblyTarget_POLICYEXT
:= $(gb_Library_DLLEXT
)
578 gb_CliAssemblyTarget_get_dll
= $(OUTDIR
)/bin
/$(1)$(gb_CliAssemblyTarget_POLICYEXT
)
580 # ExtensionTarget class
582 gb_ExtensionTarget_LICENSEFILE_DEFAULT
:= $(OUTDIR
)/bin
/osl
/license.txt
584 # UnpackedTarget class
586 gb_UnpackedTarget_TARFILE_LOCATION
:= $(shell cygpath
-u
$(TARFILE_LOCATION
))
588 # UnoApiHeadersTarget class
590 ifeq ($(DISABLE_DYNLOADING
),TRUE
)
591 gb_UnoApiHeadersTarget_select_variant
= $(if
$(filter udkapi
,$(1)),comprehensive
,$(2))
593 gb_UnoApiHeadersTarget_select_variant
= $(2)
597 gb_Package_PROGRAMDIRNAME
:= program
598 gb_Package_SDKDIRNAME
:= sdk
600 # UIMenubarTarget class
602 define gb_UIMenubarTarget__command
603 $(call gb_Output_announce
,$(2),$(true
),UIM
,1)
608 gb_UIMenubarTarget_UIMenubarTarget_platform
:=
611 gb_Python_PRECOMMAND
:= PATH
="$(shell cygpath -w $(INSTDIR)/program);$(shell cygpath -w $(OUTDIR)/bin)" PYTHONHOME
="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH
="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib;$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload:$(INSTDIR)/program"
612 gb_Python_INSTALLED_EXECUTABLE
:= $(gb_DEVINSTALLROOT
)/program
/python.exe
614 # vim: set noet sw=4: