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