summaryrefslogtreecommitdiff
path: root/libutil/Makefile.in
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 /libutil/Makefile.in
parentc24e561a344c12f829ffffbf1b5b7b179409b0da (diff)
Include all lib*/Makefile.in in top_srcdir/Makefile.in, allows adding foreign objects to a lib
Diffstat (limited to 'libutil/Makefile.in')
-rw-r--r--libutil/Makefile.in50
1 files changed, 37 insertions, 13 deletions
diff --git a/libutil/Makefile.in b/libutil/Makefile.in
index 6095bf405..79c329a33 100644
--- a/libutil/Makefile.in
+++ b/libutil/Makefile.in
@@ -5,25 +5,49 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CFLAGS+=$(SSP_ALL_CFLAGS)
+CFLAGS-libutil := -DNOT_IN_libc $(SSP_ALL_CFLAGS)
-LIB_NAME:=libutil
+LDFLAGS-libutil.so := $(LDFLAGS)
-libutil_DIR:=$(top_srcdir)libutil
-libutil_OUT:=$(top_builddir)libutil
+LIBS-libutil.so := $(LIBS)
-libutil_SRC:=$(wildcard $(libutil_DIR)/*.c)
+libutil_FULL_NAME := libutil-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+
+libutil_DIR := $(top_srcdir)libutil
+libutil_OUT := $(top_builddir)libutil
+
+libutil_SRC := $(wildcard $(libutil_DIR)/*.c)
ifneq ($(ARCH_HAS_MMU),y)
-libutil_SRC:=$(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
+libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
endif
-libutil_OBJ:=$(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
+libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
+
+libutil-a-y := $(libutil_OBJ)
+libutil-so-y := $(libutil_OBJ:.o=.os)
-libutil-a-y:=$(libutil_OBJ)
-libutil-so-y:=$(libutil_OBJ:.o=.os)
+libutil-multi-y := $(libutil_SRC)
-libutil-multi-y:=$(libutil_SRC)
+lib-a-y += $(top_builddir)lib/libutil.a
+lib-so-y += $(top_builddir)lib/libutil.so
+objclean-y += libutil_clean
-objclean-y+=libutil_clean
+$(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a libc-y
+ $(call link.so,$(libutil_FULL_NAME),$(MAJOR_VERSION))
+
+$(libutil_OUT)/libutil_so.a: $(libutil-so-y)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
+
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libutil.a: $(libutil-a-y:.o=.os)
+else
+$(top_builddir)lib/libutil.a: $(libutil-a-y)
+endif
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
-lib-a-y+=$(top_builddir)lib/libutil.a
-lib-so-y+=$(top_builddir)lib/libutil.so
+libutil_clean:
+ $(RM) $(libutil_OUT)/*.{o,os,a}