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