OSDN Git Service

Add the current implementation to review
[uclinux-h8/uClibc.git] / ldso / libdl / Makefile.in
1 # Makefile.in for uClibc
2 #
3 # Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details.
4 #
5
6 LIB_NAME:=libdl
7
8 # psm: I do not know if the order of includes is relevant
9 # to be sure I added them first
10 CFLAGS:=-I$(top_builddir)ldso/include -I$(top_builddir)ldso/ldso $(CFLAGS) $(SSP_ALL_CFLAGS)
11
12 CFLAGS+=-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\"
13
14 ifeq ($(SUPPORT_LD_DEBUG),y)
15 CFLAGS+=-D__SUPPORT_LD_DEBUG__
16 endif
17
18 # BEWARE!!! At least mips* will die if -O0 is used!!!
19 ifeq ($(TARGET_ARCH),mips)
20 CFLAGS:=$(CFLAGS:-O0=-O1)
21 endif
22
23 CFLAGS-.os=-DSHARED
24 # we adapt CFLAGS, because libdl.a has an additional object
25 ifeq ($(DOPIC),y)
26 CFLAGS-.o=$(PICFLAG)
27 resolv:=$(top_builddir)ldso/ldso/$(TARGET_ARCH)/resolve.os
28 else
29 resolv:=$(top_builddir)ldso/ldso/$(TARGET_ARCH)/resolve.o
30 endif
31
32 EXTRA_LINK_OPTS:=-fini dl_cleanup
33
34 # we need for all cases a "full" libdl.a the pic version used to build libdl.so misses $(resolv)
35 # because it is linked against ld.so
36 DOPIC=n
37
38 srcdir=$(top_srcdir)ldso/$(LIB_NAME)
39 $(LIB_NAME)_DIR:=$(top_builddir)ldso/$(LIB_NAME)
40
41 $(LIB_NAME)_SRC:=$(srcdir)/libdl.c
42
43 $(LIB_NAME)_A_ADD:=$(resolv)
44
45 libso-$(HAVE_SHARED)+=$(top_builddir)lib/$(LIB_NAME).so
46 liba-$(HAVE_SHARED)+=$(top_builddir)lib/$(LIB_NAME).a
47 libclean-y+=$(LIB_NAME)_clean
48
49 include $(top_srcdir)Makefile.libs
50
51 # !!! these lines have to come after including Makefile.libs !!!
52 EXTRA_LINK_LIBS+=$(top_builddir)lib/$(UCLIBC_LDSO)