]>
git.ipfire.org Git - thirdparty/glibc.git/blob - extra-lib.mk
436170e0d0084d59344c5a6790d9b5b025923055
1 # This file is included several times in a row, once
2 # for each element of $(extra-libs). $(extra-libs-left)
3 # is initialized first to $(extra-libs) so that with each
4 # inclusion, we advance $(lib) to the next library name (e.g. libfoo).
5 # The variable $($(lib)-routines) defines the list of modules
6 # to be included in that library.
8 lib
:= $(firstword $(extra-libs-left
))
9 extra-libs-left
:= $(filter-out $(lib
),$(extra-libs-left
))
11 object-suffixes-
$(lib
) := $(filter-out $($(lib
)-inhibit-o
),$(object-suffixes
))
13 # Add each flavor of library to the lists of things to build and install.
14 install-lib
+= $(foreach o
,$(object-suffixes-
$(lib
)),$(lib
:lib
%=$(libtype
$o)))
15 extra-objs
+= $(foreach o
,$(object-suffixes-
$(lib
)),$($(lib
)-routines
:=$o))
16 alltypes-
$(lib
) = $(foreach o
,$(object-suffixes-
$(lib
)),\
17 $(objpfx
)$(patsubst %,$(libtype
$o),\
19 ifneq (,$(filter .so
,$(object-suffixes-
$(lib
))))
20 alltypes-
$(lib
) += $(objpfx
)$(lib
).so
23 lib-noranlib
: $(alltypes-
$(lib
))
25 # Use o-iterator.mk to generate a rule for each flavor of library.
26 define o-iterator-doit
27 $(objpfx
)$(patsubst %,$(libtype
$o),$(lib
:lib
%=%)): \
28 $($(lib
)-routines
:%=$(objpfx
)%$o); $$(build-extra-lib
)
30 object-suffixes-left
= $(object-suffixes-
$(lib
))