Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk * If PROG_CXX is set by the program's Makefile, use...
details: https://anonhg.NetBSD.org/src/rev/ab569226b26b
branches: trunk
changeset: 519998:ab569226b26b
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Jan 01 00:27:06 2002 +0000
description:
* If PROG_CXX is set by the program's Makefile, use ${CXX} to link
the program rather than ${CC}.
* If HAVE_GCC3 is defined, pull in "-lstdc++ -lm" as additional C++
support libraries for DESTDIR builds.
diffstat:
share/mk/bsd.prog.mk | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r cef29b45b9cd -r ab569226b26b share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk Mon Dec 31 23:11:05 2001 +0000
+++ b/share/mk/bsd.prog.mk Tue Jan 01 00:27:06 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prog.mk,v 1.144 2001/12/28 01:32:41 lukem Exp $
+# $NetBSD: bsd.prog.mk,v 1.145 2002/01/01 00:27:06 thorpej Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.include <bsd.init.mk>
@@ -126,18 +126,27 @@
-L${DESTDIR}${SHLIBDIR}
.endif
+.if defined(PROG_CXX)
+_CCLINK= ${CXX}
+.if defined(HAVE_GCC3)
+_SUPCXX= -lstdc++ -lm
+.endif
+.else
+_CCLINK= ${CC}
+.endif
+
.if defined(DESTDIR)
${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
.if !commands(${PROG})
- ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib ${_PROGLDOPTS} ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${DESTDIR}/usr/lib -lgcc -lc -lgcc ${LIBCRTEND}
+ ${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib ${_PROGLDOPTS} ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${DESTDIR}/usr/lib ${_SUPCXX} -lgcc -lc -lgcc ${LIBCRTEND}
.endif
.else
${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
.if !commands(${PROG})
- ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${OBJS} ${LDADD}
+ ${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${OBJS} ${LDADD}
.endif
.endif # defined(DESTDIR)
Home |
Main Index |
Thread Index |
Old Index