54 lines
1.3 KiB
Makefile
54 lines
1.3 KiB
Makefile
# $NetBSD: Makefile,v 1.16 1998/09/13 03:50:32 mrg Exp $
|
|
|
|
.include <bsd.own.mk> # for OBJECT_FMT definition
|
|
|
|
.if ((${OBJECT_FMT} == "ELF") && !defined(NOPIC))
|
|
PROG= ld.elf_so
|
|
.endif
|
|
|
|
.if (${MACHINE} == "alpha") || (${MACHINE_ARCH} == "mips") || \
|
|
(${MACHINE} == "sparc64")
|
|
# Adds SRCS, CPPFLAGS, LDFLAGS, etc. Must go first so MD startup source
|
|
# is first.
|
|
.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
|
|
.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
|
|
.endif
|
|
|
|
CLIBOBJ!=cd ${.CURDIR}/../../lib/libc; \
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
|
|
|
|
SRCS+= rtld.c reloc.c symbol.c malloc.c xmalloc.c xprintf.c debug.c \
|
|
map_object.c load.c search.c headers.c paths.c
|
|
CPPFLAGS+= -Wall -DLIBDIR=\"${LIBDIR}\" -D_PATH_RTLD=\"${BINDIR}/${PROG}\"
|
|
CPPFLAGS+= -DDEBUG -DRTLD_LOADER
|
|
#CPPFLAGS+= -DRTLD_DEBUG
|
|
|
|
LDADD+= -L${DESTDIR}/${LIBDIR} -L${CLIBOBJ} -non_shared -lc_pic
|
|
DPADD+= ${LIBC_PIC}
|
|
|
|
.if (${OBJECT_FMT} == "ELF")
|
|
# to be installed
|
|
HDRS= link.h
|
|
.endif
|
|
|
|
STRIPFLAG=
|
|
|
|
.PATH: ${.CURDIR}/${MACHINE_ARCH}
|
|
|
|
${PROG}: ${OBJS} ${DPADD}
|
|
${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD}
|
|
|
|
includes:
|
|
@cd ${.CURDIR}; for i in $(HDRS); do \
|
|
j="cmp -s $$i ${DESTDIR}/usr/include/$$i || \
|
|
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
|
|
${DESTDIR}/usr/include"; \
|
|
echo $$j; \
|
|
eval "$$j"; \
|
|
done
|
|
.endif
|
|
|
|
NOMAN=
|
|
|
|
.include <bsd.prog.mk>
|