summaryrefslogtreecommitdiff
path: root/libnsl
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-17 22:56:02 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-17 22:56:02 +0000
commit0a7b9d5d57021e616dc5e4b5dfaa3b93131381af (patch)
treec8f59bd3d11749d7512393e5e34e17a7270c5bc6 /libnsl
parentc24e561a344c12f829ffffbf1b5b7b179409b0da (diff)
Include all lib*/Makefile.in in top_srcdir/Makefile.in, allows adding foreign objects to a lib
Diffstat (limited to 'libnsl')
-rw-r--r--libnsl/Makefile.in48
1 files changed, 36 insertions, 12 deletions
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}