fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / solenv / gbuild / StaticLibrary.mk
blob6aec948aeb658a82d351311ad2699a0fedc69616
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 .
21 # Static Library class
23 # defined globally in gbuild.mk
24 # gb_StaticLibrary_OUTDIRLOCATION := $(OUTDIR)/lib
25 # defined by platform
26 # gb_StaticLibrary_FILENAMES
29 # EVIL: gb_StaticLibrary and gb_Library need the same deliver rule because they are indistinguishable on windows
30 .PHONY : $(WORKDIR)/Clean/OutDir/lib/%$(gb_StaticLibrary_PLAINEXT)
31 $(WORKDIR)/Clean/OutDir/lib/%$(gb_StaticLibrary_PLAINEXT) :
32 $(call gb_Helper_abbreviate_dirs,\
33 rm -f $(OUTDIR)/lib/$*$(gb_StaticLibrary_PLAINEXT) \
34 $(AUXTARGETS))
36 define gb_StaticLibrary_StaticLibrary
37 ifeq (,$$(findstring $(1),$$(gb_StaticLibrary_KNOWNLIBS)))
38 $$(eval $$(call gb_Output_info,Currently known static libraries are: $(sort $(gb_StaticLibrary_KNOWNLIBS)),ALL))
39 $$(eval $$(call gb_Output_error,Static library $(1) must be registered in Repository.mk))
40 endif
41 $(call gb_StaticLibrary__StaticLibrary_impl,$(1),$(call gb_StaticLibrary_get_linktargetname,$(1)))
43 endef
45 define gb_StaticLibrary__StaticLibrary_impl
46 $(call gb_LinkTarget_LinkTarget,$(2),StaticLibrary_$(1))
47 $(call gb_LinkTarget_set_targettype,$(2),StaticLibrary)
48 $(call gb_StaticLibrary_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
49 | $(dir $(call gb_StaticLibrary_get_target,$(1))).dir
50 $(call gb_StaticLibrary_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
51 $(call gb_StaticLibrary_get_clean_target,$(1)) : AUXTARGETS :=
52 $(call gb_StaticLibrary_StaticLibrary_platform,$(1),$(2))
53 $$(eval $$(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1))))
54 $(call gb_Helper_make_userfriendly_targets,$(1),StaticLibrary)
55 $(call gb_Deliver_add_deliverable,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
57 endef
59 define gb_StaticLibrary_forward_to_Linktarget
60 gb_StaticLibrary_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_StaticLibrary_get_linktargetname,$$(1)),$$(2),$$(3),StaticLibrary_$$(1))
62 endef
64 $(eval $(foreach method,\
65 add_cobject \
66 add_cobjects \
67 add_cxxobject \
68 add_cxxobjects \
69 add_objcxxobject \
70 add_objcxxobjects \
71 add_asmobject \
72 add_asmobjects \
73 add_exception_objects \
74 add_x64_generated_exception_objects \
75 add_noexception_objects \
76 add_generated_cobjects \
77 add_x64_generated_cobjects \
78 add_generated_cxxobjects \
79 add_generated_exception_objects \
80 add_cflags \
81 set_cflags \
82 add_cxxflags \
83 set_cxxflags \
84 add_objcflags \
85 add_objcxxflags \
86 set_objcxxflags \
87 add_defs \
88 set_defs \
89 set_include \
90 add_ldflags \
91 set_ldflags \
92 set_x64 \
93 add_libs \
94 set_library_path_flags \
95 use_api \
96 use_sdk_api \
97 use_udk_api \
98 use_internal_api \
99 use_internal_bootstrap_api \
100 use_internal_comprehensive_api \
101 use_external \
102 use_externals \
103 add_custom_headers \
104 use_custom_headers \
105 add_package_headers \
106 use_package \
107 use_packages \
108 use_unpacked \
109 use_external_project \
110 use_static_libraries \
111 add_sdi_headers \
112 set_precompiled_header \
113 add_precompiled_header \
114 set_warnings_not_errors \
115 set_generated_cxx_suffix \
117 $(call gb_StaticLibrary_forward_to_Linktarget,$(method))\
120 # vim: set noet sw=4: