More minor IPI work.
[dragonfly/vkernel-mp.git] / libexec / rtld-elf / Makefile
blob54109a2931cccec568e2f3b0675c47dc94f221ec
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.12 2005/11/19 23:00:20 joerg Exp $
4 PROG= ld-elf.so.2
5 SRCS= rtld_start.S rtld.c lockdflt.c map_object.c malloc.c \
6 xmalloc.c debug.c reloc.c
7 MAN= rtld.1
8 CFLAGS+= -Wall -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} -D__thread=
9 LDFLAGS+= -nostdlib -e .rtld_start -Wl,--no-undefined
10 INSTALLFLAGS= -C -b
11 .ifndef NOFSCHG
12 INSTALLFLAGS+= -fschg
13 .endif
14 MLINKS= rtld.1 ld-elf.so.1.1
15 MLINKS+= rtld.1 ld-elf.so.2.1
17 .if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
18 .include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
19 .endif
21 .ifdef LDSCRIPT
22 OBJS+= dyn_hack.so
23 LDFLAGS+= -Wl,-T,${LDSCRIPT} -Wl,-E -Wl,-Bstatic
24 DPADD= ${.OBJDIR}/../../lib/libc_rtld/libc_rtld.a
25 LDADD= -L${.OBJDIR}/../../lib/libc_rtld -lc_rtld
26 .else
27 CFLAGS+= -fpic -DPIC
28 LDFLAGS+= -shared -Wl,-Bsymbolic
29 DPADD= ${.OBJDIR}/../../lib/libc_rtld/libc_rtld_pic.a
30 LDADD= -L${.OBJDIR}/../../lib/libc_rtld -lc_rtld_pic
31 .endif
33 dyn_hack.so:
34 ${CC} -shared -nostdlib -o dyn_hack.so -x c /dev/null
36 .PATH: ${.CURDIR}/${MACHINE_ARCH}
38 .include <bsd.prog.mk>