]> git.ipfire.org Git - thirdparty/glibc.git/blob - extra-lib.mk
Fri Mar 17 12:58:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
[thirdparty/glibc.git] / 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.
7
8 lib := $(firstword $(extra-libs-left))
9 extra-libs-left := $(filter-out $(lib),$(extra-libs-left))
10
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),\
16 $(lib:lib%=%)))
17 ifeq (yes,$(build-shared))
18 alltypes-$(lib) += $(objpfx)$(lib).so
19 endif
20
21 lib-noranlib: $(alltypes-$(lib))
22
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)
27 endef
28 object-suffixes-left := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
29 include $(o-iterator)