NetBSD/gnu/usr.bin/ld/rtld/Makefile

37 lines
946 B
Makefile

# $NetBSD: Makefile,v 1.14 1996/12/23 22:13:03 pk Exp $
PROG= ld.so
SRCS= mdprologue.S rtld.c malloc.c shlib.c etc.c md.c vfprintf.c
MAN= rtld.1
LDDIR?= $(.CURDIR)/..
PICFLAG=-fpic -fno-function-cse
CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE_ARCH) $(PICFLAG) -DRTLD -DLIBC_SCCS
ASFLAGS+=-k
LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic
.if defined(DESTDIR)
LDFLAGS+= -nostdlib -L${DESTDIR}/usr/lib
.endif
LDADD+= -lc_pic
BINDIR= /usr/libexec
HDRS= link.h
MLINKS= rtld.1 ld.so.1
.PATH: $(LDDIR) $(LDDIR)/$(MACHINE_ARCH) ${.CURDIR}/../../../../lib/libc/stdio
$(PROG):
$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
.S.o:
${CPP} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET} -
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
.include <bsd.prog.mk>