8 reloc.c rtld.c rtld_lock.c rtld_printf.c map_object.c \
9 malloc.c xmalloc.c debug.c libmap.c
12 TOPSRCDIR= ${.CURDIR}/../..
13 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD
14 CFLAGS+= -I${TOPSRCDIR}/lib/csu/common
15 .if exists(${.CURDIR}/${MACHINE_ARCH})
16 RTLD_ARCH= ${MACHINE_ARCH}
18 RTLD_ARCH= ${MACHINE_CPUARCH}
20 CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR}
21 .if ${MACHINE_ARCH} == "powerpc64"
22 CFLAGS+= -mcall-aixdesc
23 LDFLAGS+= -nostdlib -e _rtld_start
25 LDFLAGS+= -nostdlib -e .rtld_start
31 SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG}
32 MLINKS= rtld.1 ld-elf.so.1.1 \
35 .if ${MACHINE_CPUARCH} == "sparc64"
40 CFLAGS+= -DPIC $(DEBUG)
41 LDFLAGS+= -shared -Wl,-Bsymbolic
45 .if ${MK_SYMVER} == "yes"
46 LIBCDIR= ${TOPSRCDIR}/lib/libc
47 VERSION_DEF= ${LIBCDIR}/Versions.def
48 SYMBOL_MAPS= ${.CURDIR}/Symbol.map
49 VERSION_MAP= Version.map
50 LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
52 ${PROG}: ${VERSION_MAP}
54 .if exists(${.CURDIR}/${RTLD_ARCH}/Symbol.map)
55 SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map
59 .sinclude "${.CURDIR}/${RTLD_ARCH}/Makefile.inc"
61 # Since moving rtld-elf to /libexec, we need to create a symlink.
62 # Fixup the existing binary that's there so we can symlink over it.
64 .if exists(${DESTDIR}/usr/libexec/${PROG})
65 -chflags -h noschg ${DESTDIR}/usr/libexec/${PROG}
68 .PATH: ${.CURDIR}/${RTLD_ARCH}
70 .include <bsd.symver.mk>
71 .include <bsd.prog.mk>