rtld: Implement ELF filters (DT_FILTER and DT_AUXILIARY)
[dragonfly.git] / libexec / rtld-elf / Makefile
1 # $FreeBSD$
2
3 PROG=           ld-elf.so.2
4 SRCS=           rtld_start.S \
5                 reloc.c rtld.c rtld_lock.c rtld_printf.c map_object.c \
6                 malloc.c xmalloc.c debug.c libmap.c
7 MAN=            rtld.1
8 CSTD?=          gnu99
9 WARNS?=         2
10
11 # To activate LD_DEBUG functionality, define ENABLE_DEBUG
12 # e.g. make -DENABLE_DEBUG
13
14 CFLAGS+=        -DIN_RTLD
15 CFLAGS+=        -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} -D__thread=
16 LDFLAGS+=       -nostdlib -e .rtld_start -Wl,--no-undefined
17 INSTALLFLAGS=   -C -b
18 .ifndef NOFSCHG
19 INSTALLFLAGS+=  -fschg
20 .endif
21 MLINKS=         rtld.1 ld-elf.so.1.1
22 MLINKS+=        rtld.1 ld-elf.so.2.1
23 MLINKS+=        rtld.1 _rtld_functrace.3
24
25 .if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
26 .include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
27 .endif
28
29 CFLAGS+=        -fpic -DPIC
30 LDFLAGS+=       -shared -Wl,-Bsymbolic
31 DPADD=          ${.OBJDIR}/../../lib/libc_rtld/libc_rtld_pic.a
32 LDADD=          -L${.OBJDIR}/../../lib/libc_rtld -lc_rtld_pic
33
34 .ifdef ENABLE_DEBUG
35 CFLAGS+=        -DDEBUG
36 .endif
37
38 .PATH: ${.CURDIR}/${MACHINE_ARCH}
39
40 .include <bsd.prog.mk>