summaryrefslogtreecommitdiff
path: root/ldso/libdl/Makefile.in
blob: 24a53422e843b8050c712d8ad73cd118dedc645f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Makefile.in for uClibc
#
# Copyright (C) 2000 by Lineo, inc.
# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

# psm: I do not know if the order of includes is relevant
# to be sure I added them first, Jocke please cleanup if needed
CFLAGS:=-I$(top_builddir)ldso/include -I$(top_builddir)ldso/ldso $(CFLAGS) $(SSP_ALL_CFLAGS)

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

# useless, only 1 source file
DOMULTI=n

LIB_NAME:=libdl

EXTRA_LINK_OPTS:=-fini dl_cleanup
# keep in sync w/ Makerules
EXTRA_LINK_LIBS:=$(top_builddir)libc/misc/internals/interp.os $(top_builddir)lib/libc.so $(LIBGCC) $(top_builddir)lib/$(UCLIBC_LDSO)

libdl_DIR:=$(top_srcdir)ldso/libdl
libdl_OUT:=$(top_builddir)ldso/libdl

libdl_SRC:=$(libdl_DIR)/libdl.c
libdl_OBJ:=$(patsubst $(libdl_DIR)/%.c,$(libdl_OUT)/%.o,$(libdl_SRC))

# use other suffixes, so that it does not pick up the multi rule from Makerules
$(libdl_OUT)/libdl.oS: $(libdl_DIR)/libdl.c
	$(compile.c) -DSHARED

resolve:=$(top_builddir)ldso/ldso/$(TARGET_ARCH)/resolve.o

libdl-a-$(HAVE_SHARED):=$(libdl_OBJ) $(resolve)
libdl-a-pic-$(HAVE_SHARED):=$(libdl_OBJ:.o=.os) $(resolve:.o=.os)
libdl-so-$(HAVE_SHARED):=$(libdl_OBJ:.o=.oS)

# we enable this although no use of multi, else libdl.o gets empty sources
libdl-multi-$(HAVE_SHARED):=$(libdl_SRC)

objclean-y+=libdl_clean libdl_extra_clean

libdl_extra_clean:
	$(RM) $(libdl_OUT)/*.oS

lib-a-$(HAVE_SHARED)+=$(top_builddir)lib/libdl.a
lib-a-pic-$(HAVE_SHARED)+=$(top_builddir)lib/libdl.a
lib-so-$(HAVE_SHARED)+=$(top_builddir)lib/libdl.so