Merge from vendor branch BINUTILS:
[dragonfly.git] / libexec / rtld-elf / Makefile
CommitLineData
984263bc 1# $FreeBSD: src/libexec/rtld-elf/Makefile,v 1.10.2.6 2002/06/22 17:03:13 jdp Exp $
0a5ad630 2# $DragonFly: src/libexec/rtld-elf/Makefile,v 1.12 2005/11/19 22:00:20 joerg Exp $
984263bc 3
a1eee96a 4PROG= ld-elf.so.2
984263bc 5SRCS= rtld_start.S rtld.c lockdflt.c map_object.c malloc.c \
6192271e 6 xmalloc.c debug.c reloc.c
984263bc 7MAN= rtld.1
d2a4c620 8CFLAGS+= -Wall -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} -D__thread=
33d0682a 9LDFLAGS+= -nostdlib -e .rtld_start -Wl,--no-undefined
0a5ad630
JS
10INSTALLFLAGS= -C -b
11.ifndef NOFSCHG
12INSTALLFLAGS+= -fschg
13.endif
984263bc 14MLINKS= rtld.1 ld-elf.so.1.1
b6989f5b 15MLINKS+= rtld.1 ld-elf.so.2.1
984263bc
MD
16
17.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
18.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
19.endif
20
3b35796a 21.ifdef LDSCRIPT
984263bc
MD
22OBJS+= dyn_hack.so
23LDFLAGS+= -Wl,-T,${LDSCRIPT} -Wl,-E -Wl,-Bstatic
d2a4c620
JS
24DPADD= ${.OBJDIR}/../../lib/libc_rtld/libc_rtld.a
25LDADD= -L${.OBJDIR}/../../lib/libc_rtld -lc_rtld
984263bc
MD
26.else
27CFLAGS+= -fpic -DPIC
28LDFLAGS+= -shared -Wl,-Bsymbolic
d2a4c620
JS
29DPADD= ${.OBJDIR}/../../lib/libc_rtld/libc_rtld_pic.a
30LDADD= -L${.OBJDIR}/../../lib/libc_rtld -lc_rtld_pic
984263bc
MD
31.endif
32
33dyn_hack.so:
34 ${CC} -shared -nostdlib -o dyn_hack.so -x c /dev/null
35
36.PATH: ${.CURDIR}/${MACHINE_ARCH}
37
38.include <bsd.prog.mk>