1995-03-17 18:42:51 +00:00
|
|
|
# This file is included several times in a row, once
|
|
|
|
# for each element of $(extra-libs). $(extra-libs-left)
|
|
|
|
# is initialized first to $(extra-libs) so that with each
|
|
|
|
# inclusion, we advance $(lib) to the next library name (e.g. libfoo).
|
|
|
|
# The variable $($(lib)-routines) defines the list of modules
|
|
|
|
# to be included in that library.
|
|
|
|
|
|
|
|
lib := $(firstword $(extra-libs-left))
|
|
|
|
extra-libs-left := $(filter-out $(lib),$(extra-libs-left))
|
|
|
|
|
1995-04-01 09:07:31 +00:00
|
|
|
object-suffixes-$(lib) := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
|
|
|
|
|
1996-05-13 22:11:28 +00:00
|
|
|
ifneq (,$(object-suffixes-$(lib)))
|
|
|
|
|
1995-04-08 19:23:00 +00:00
|
|
|
# Make sure these are simply-expanded variables before we append to them,
|
1995-10-24 21:45:10 +00:00
|
|
|
# since we want the expressions we append to be expanded right now.
|
1995-04-08 19:23:00 +00:00
|
|
|
install-lib := $(install-lib)
|
|
|
|
extra-objs := $(extra-objs)
|
|
|
|
|
1995-03-17 18:42:51 +00:00
|
|
|
# Add each flavor of library to the lists of things to build and install.
|
1995-04-01 09:07:31 +00:00
|
|
|
install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
|
|
|
|
extra-objs += $(foreach o,$(object-suffixes-$(lib)),$($(lib)-routines:=$o))
|
1995-04-08 19:23:00 +00:00
|
|
|
alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
|
1996-05-14 20:30:25 +00:00
|
|
|
$(objpfx)$(patsubst %,$(libtype$o),\
|
1995-04-08 19:23:00 +00:00
|
|
|
$(lib:lib%=%)))
|
1995-04-01 09:07:31 +00:00
|
|
|
ifneq (,$(filter .so,$(object-suffixes-$(lib))))
|
1996-05-14 20:30:25 +00:00
|
|
|
alltypes-$(lib) += $(objpfx)$(lib).so
|
1995-03-17 18:42:51 +00:00
|
|
|
endif
|
|
|
|
|
1995-10-31 06:54:40 +00:00
|
|
|
ifeq (,$($(lib)-no-lib-dep))
|
1995-03-17 18:42:51 +00:00
|
|
|
lib-noranlib: $(alltypes-$(lib))
|
1995-10-24 21:45:10 +00:00
|
|
|
else
|
|
|
|
others: $(alltypes-$(lib))
|
|
|
|
endif
|
1995-03-17 18:42:51 +00:00
|
|
|
|
|
|
|
# Use o-iterator.mk to generate a rule for each flavor of library.
|
|
|
|
define o-iterator-doit
|
1996-05-14 20:30:25 +00:00
|
|
|
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
|
1995-03-17 18:42:51 +00:00
|
|
|
$($(lib)-routines:%=$(objpfx)%$o); $$(build-extra-lib)
|
|
|
|
endef
|
1995-04-01 09:07:31 +00:00
|
|
|
object-suffixes-left = $(object-suffixes-$(lib))
|
1995-04-24 09:00:07 +00:00
|
|
|
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib)))
|
1996-05-13 22:11:28 +00:00
|
|
|
|
|
|
|
endif
|