diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-10-20 09:28:18 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-10-20 09:28:18 +0000 |
commit | 569658ff76d67fd708530f954a5e180bfba2d664 (patch) | |
tree | f6d6865f139c00f1f2035f1dd487df92ad5d02d7 | |
parent | ab1d6687d01429231cf131ce413ef13fb7137ed6 (diff) |
support C/C++
Ditch DESTDIR building.
okay miod, theo.
-rw-r--r-- | share/mk/bsd.prog.mk | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index d2af24656d2..c5e08b8121d 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.prog.mk,v 1.41 2004/10/18 10:07:09 espie Exp $ +# $OpenBSD: bsd.prog.mk,v 1.42 2004/10/20 09:28:17 espie 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 @@ -106,28 +106,24 @@ CLEANFILES+=strings .if defined(PROG) SRCS?= ${PROG}.c -.if !empty(SRCS:N*.h:N*.sh) +. if !empty(SRCS:N*.h:N*.sh) OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} -.endif - -.if defined(OBJS) && !empty(OBJS) -.if defined(DESTDIR) +. endif +. if defined(OBJS) && !empty(OBJS) +. if !empty(SRCS:M*.C) || !empty(SRCS:M*.cc) || !empty(SRCS:M*.cxx) ${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 - + ${CXX} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD} +. else ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD} ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD} +. endif +. endif # defined(OBJS) && !empty(OBJS) -.endif # defined(DESTDIR) -.endif # defined(OBJS) && !empty(OBJS) - -.if !defined(MAN) +. if !defined(MAN) MAN= ${PROG}.1 -.endif # !defined(MAN) +. endif # !defined(MAN) .endif # defined(PROG) .MAIN: all |