summaryrefslogtreecommitdiff
path: root/libcrypt
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 /libcrypt
parentc24e561a344c12f829ffffbf1b5b7b179409b0da (diff)
Include all lib*/Makefile.in in top_srcdir/Makefile.in, allows adding foreign objects to a lib
Diffstat (limited to 'libcrypt')
-rw-r--r--libcrypt/Makefile.in48
1 files changed, 36 insertions, 12 deletions
diff --git a/libcrypt/Makefile.in b/libcrypt/Makefile.in
index 4e1466e72..6138ef51f 100644
--- a/libcrypt/Makefile.in
+++ b/libcrypt/Makefile.in
@@ -6,22 +6,46 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CFLAGS+=$(SSP_ALL_CFLAGS)
+CFLAGS-libcrypt := -DNOT_IN_libc $(SSP_ALL_CFLAGS)
-LIB_NAME:=libcrypt
+LDFLAGS-libcrypt.so := $(LDFLAGS)
-libcrypt_DIR:=$(top_srcdir)libcrypt
-libcrypt_OUT:=$(top_builddir)libcrypt
+LIBS-libcrypt.so := $(LIBS)
-libcrypt_SRC:=$(wildcard $(libcrypt_DIR)/*.c)
-libcrypt_OBJ:=$(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
+libcrypt_FULL_NAME := libcrypt-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-libcrypt-a-y:=$(libcrypt_OBJ)
-libcrypt-so-y:=$(libcrypt_OBJ:.o=.os)
+libcrypt_DIR := $(top_srcdir)libcrypt
+libcrypt_OUT := $(top_builddir)libcrypt
-libcrypt-multi-y:=$(libcrypt_SRC)
+libcrypt_SRC := $(wildcard $(libcrypt_DIR)/*.c)
+libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
-objclean-y+=libcrypt_clean
+libcrypt-a-y := $(libcrypt_OBJ)
+libcrypt-so-y := $(libcrypt_OBJ:.o=.os)
-lib-a-y+=$(top_builddir)lib/libcrypt.a
-lib-so-y+=$(top_builddir)lib/libcrypt.so
+libcrypt-multi-y := $(libcrypt_SRC)
+
+lib-a-y += $(top_builddir)lib/libcrypt.a
+lib-so-y += $(top_builddir)lib/libcrypt.so
+objclean-y += libcrypt_clean
+
+$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a libc-y
+ $(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
+
+$(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
+
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y:.o=.os)
+else
+$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
+endif
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
+
+libcrypt_clean:
+ $(RM) $(libcrypt_OUT)/*.{o,os,a}