summaryrefslogtreecommitdiff
path: root/share/mk
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-15 00:36:59 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-15 00:36:59 +0000
commiteeec52ffee304ad6eff0b98115518cd329aa5934 (patch)
treeb8458090655e3dd440619b966f9738fb2fdd5500 /share/mk
parent015ce70fae716967e97534fe49d3484137ce3686 (diff)
Add DESTDIR support for crt{begin,end}.o (powerpc only so far)
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.prog.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index e1b31f55c80..86a21ebd73f 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.prog.mk,v 1.7 1996/12/08 14:42:32 downsj Exp $
+# $OpenBSD: bsd.prog.mk,v 1.8 1997/01/15 00:36:56 niklas Exp $
# $NetBSD: bsd.prog.mk,v 1.55 1996/04/08 21:19:26 jtc Exp $
# @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
@@ -12,6 +12,11 @@
CFLAGS+= ${COPTS}
+.if (${MACHINE_ARCH} == "powerpc")
+CRTBEGIN?= ${DESTDIR}/usr/lib/crtbegin.o
+CRTEND?= ${DESTDIR}/usr/lib/crtend.o
+.endif
+
LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o
LIBC?= ${DESTDIR}/usr/lib/libc.a
LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a
@@ -69,12 +74,12 @@ LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
.if defined(OBJS) && !empty(OBJS)
.if defined(DESTDIR)
-${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
- ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${OBJS} ${LDADD} -lgcc -lc -lgcc
+${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD}
+ ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${CRTBEGIN} ${OBJS} ${LDADD} -lgcc -lc -lgcc ${CRTEND}
.else
-${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
+${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD}
${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
.endif # defined(DESTDIR)