]>
git.ipfire.org Git - thirdparty/glibc.git/blob - extra-lib.mk
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 # Add each flavor of library to the lists of things to build and install.
12 install-lib
+= $(foreach o
,$(object-suffixes
),$(lib
:lib
%=$(libtype
$o)))
13 extra-objs
+= $(foreach o
,$(object-suffixes
),$($(lib
)-routines
:=$o))
14 alltypes-
$(lib
) = $(foreach o
,$(object-suffixes
),\
15 $(objpfx
)$(patsubst %,$(libtype
$o),\
17 ifeq (yes
,$(build-shared
))
18 alltypes-
$(lib
) += $(objpfx
)$(lib
).so
21 lib-noranlib
: $(alltypes-
$(lib
))
23 # Use o-iterator.mk to generate a rule for each flavor of library.
24 define o-iterator-doit
25 $(objpfx
)$(patsubst %,$(libtype
$o),$(lib
:lib
%=%)): \
26 $($(lib
)-routines
:%=$(objpfx
)%$o); $$(build-extra-lib
)
28 object-suffixes-left
:= $(filter-out $($(lib
)-inhibit-o
),$(object-suffixes
))