summaryrefslogtreecommitdiff
path: root/ldso/libdl/Makefile.in
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-19 14:34:51 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-19 14:34:51 +0000
commitb6cfa5f080db02f4e7426457511278d3e2d96d67 (patch)
tree9e97f603430c3fe61ca8341dcea1c3ea1b8a1113 /ldso/libdl/Makefile.in
parent65333434157380d01a8bfd0d8913a1335f1939b6 (diff)
2 more examples that show the handling of different objects in lib*.so and lib*.a, also handle arch specific optimized versions
Diffstat (limited to 'ldso/libdl/Makefile.in')
-rw-r--r--ldso/libdl/Makefile.in51
1 files changed, 51 insertions, 0 deletions
diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in
new file mode 100644
index 000000000..b3dca7d9c
--- /dev/null
+++ b/ldso/libdl/Makefile.in
@@ -0,0 +1,51 @@
+# Makefile.in for uClibc
+#
+# Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details.
+#
+
+CFLAGS+=$(SSP_ALL_CFLAGS) -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\"
+
+ifeq ($(SUPPORT_LD_DEBUG),y)
+CFLAGS+=-D__SUPPORT_LD_DEBUG__
+endif
+
+# BEWARE!!! At least mips* will die if -O0 is used!!!
+ifeq ($(TARGET_ARCH),mips)
+CFLAGS:=$(CFLAGS:-O0=-O1)
+endif
+
+CFLAGS:=-I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso $(CFLAGS)
+
+CFLAGS-.os=-DSHARED
+# we adapt CFLAGS, because libdl.a has an additional object
+ifeq ($(DOPIC),y)
+CFLAGS-.o=$(PICFLAG)
+resolv:=$(top_builddir)ldso/$(TARGET_ARCH)/resolv.os
+else
+resolv:=$(top_builddir)ldso/$(TARGET_ARCH)/resolv.o
+endif
+
+EXTRA_LINK_OPTS:=-fini dl_cleanup
+#EXTRA_LINK_LIBS:=$(interp) -L$(top_builddir)lib -lc $(LDADD_LIBFLOAT) $(top_builddir)lib/$(UCLIBC_LDSO) $(LIBGCC)
+
+# we need for all cases a "full" libdl.a the pic version used to build libdl.so misses $(resolv)
+# because it is linked against ld.so
+DOPIC=n
+
+LIB_NAME:=libdl
+srcdir=$(top_srcdir)ldso/$(LIB_NAME)
+$(LIB_NAME)_DIR:=$(top_builddir)ldso/$(LIB_NAME)
+
+$(LIB_NAME)_SRC:=$(srcdir)/libdl.c
+
+libso-$(HAVE_SHARED)+=$(top_builddir)lib/$(LIB_NAME).so
+liba-$(HAVE_SHARED)+=$(top_builddir)lib/$(LIB_NAME).a
+libclean-y+=$(LIB_NAME)_clean
+
+include $(top_srcdir)Makefile.libs
+
+# !!! these lines have to come after including Makefile.libs !!!
+EXTRA_LINK_LIBS+=$(top_builddir)lib/$(UCLIBC_LDSO)
+
+# should only go into libdl.a, OBJ_PIC is not modified here
+$(LIB_NAME)_OBJ+=$(resolv)