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