From 0a7b9d5d57021e616dc5e4b5dfaa3b93131381af Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 17 Nov 2005 22:56:02 +0000 Subject: Include all lib*/Makefile.in in top_srcdir/Makefile.in, allows adding foreign objects to a lib --- libnsl/Makefile.in | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) (limited to 'libnsl') diff --git a/libnsl/Makefile.in b/libnsl/Makefile.in index b4dcefae2..765868e54 100644 --- a/libnsl/Makefile.in +++ b/libnsl/Makefile.in @@ -5,22 +5,46 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -CFLAGS+=$(SSP_ALL_CFLAGS) +CFLAGS-libnsl := -DNOT_IN_libc $(SSP_ALL_CFLAGS) -LIB_NAME:=libnsl +LDFLAGS-libnsl.so := $(LDFLAGS) -libnsl_DIR:=$(top_srcdir)libnsl -libnsl_OUT:=$(top_builddir)libnsl +LIBS-libnsl.so := $(LIBS) -libnsl_SRC:=$(libnsl_DIR)/nsl.c -libnsl_OBJ:=$(patsubst $(libnsl_DIR)/%.c,$(libnsl_OUT)/%.o,$(libnsl_SRC)) +libnsl_FULL_NAME := libnsl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so -libnsl-a-y:=$(libnsl_OBJ) -libnsl-so-y:=$(libnsl_OBJ:.o=.os) +libnsl_DIR := $(top_srcdir)libnsl +libnsl_OUT := $(top_builddir)libnsl -libnsl-multi-y:=$(libnsl_SRC) +libnsl_SRC := $(libnsl_DIR)/nsl.c +libnsl_OBJ := $(patsubst $(libnsl_DIR)/%.c,$(libnsl_OUT)/%.o,$(libnsl_SRC)) -objclean-y+=libnsl_clean +libnsl-a-y := $(libnsl_OBJ) +libnsl-so-y := $(libnsl_OBJ:.o=.os) -lib-a-y+=$(top_builddir)lib/libnsl.a -lib-so-y+=$(top_builddir)lib/libnsl.so +libnsl-multi-y := $(libnsl_SRC) + +lib-a-y += $(top_builddir)lib/libnsl.a +lib-so-y += $(top_builddir)lib/libnsl.so +objclean-y += libnsl_clean + +$(top_builddir)lib/libnsl.so: $(libnsl_OUT)/libnsl_so.a libc-y + $(call link.so,$(libnsl_FULL_NAME),$(MAJOR_VERSION)) + +$(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y) + $(Q)$(RM) $@ + $(do_strip) + $(do_ar) + +ifeq ($(DOPIC),y) +$(top_builddir)lib/libnsl.a: $(libnsl-a-y:.o=.os) +else +$(top_builddir)lib/libnsl.a: $(libnsl-a-y) +endif + $(Q)$(INSTALL) -d $(dir $@) + $(Q)$(RM) $@ + $(do_strip) + $(do_ar) + +libnsl_clean: + $(RM) $(libnsl_OUT)/*.{o,os,a} -- cgit v1.2.3