summaryrefslogtreecommitdiff
path: root/ldso/libdl/Makefile.in
blob: 3fd8a6cd126a1ecb9367f7f9b28dcdc1789848cb (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
# Makefile.in for uClibc
#
# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

subdirs += ldso/libdl

CFLAGS-libdl := -DNOT_IN_libc -DIS_IN_libdl $(SSP_ALL_CFLAGS)

CFLAGS-libdl += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso

CFLAGS-libdl += -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\"

CFLAGS-$(SUPPORT_LD_DEBUG)-ldso/libdl := -D__SUPPORT_LD_DEBUG__

CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"

LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libdl.so := -Wl,--dsbt-index=3
LDFLAGS-libdl.so := $(LDFLAGS)

ifeq ($(LDSO_NO_CLEANUP),)
LDFLAGS-libdl.so += -Wl,-fini,$(SYMBOL_PREFIX)dl_cleanup
endif

LIBS-libdl.so := $(LIBS) $(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))

resolve := $(top_builddir)ldso/ldso/$(TARGET_ARCH)/resolve.o
libdl-a-y := $(libdl_OBJ) $(resolve)
ifeq ($(DOPIC),y)
libdl-a-y := $(libdl-a-y:.o=.os)
endif
libdl-so-y := $(libdl_OUT)/libdl.oS

objclean-y += CLEAN_ldso/libdl

CLEAN_ldso/libdl:
	$(do_rm) $(addprefix $(libdl_OUT)/*., o os oS a)