diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-05 09:51:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-05 09:51:07 +0000 |
commit | 6c99f5ed69766ce2b4f49ab0814d87d5b42fe268 (patch) | |
tree | 6e5748e17e45f4039a9cae7a074400a2adf7ae87 /share/mk | |
parent | 2f535a0deaad631218f25ce9d4bd1d4053c37c7e (diff) |
.cxx support from Mathieu.Herrb@mipnet.fr
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.lib.mk | 10 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 10 | ||||
-rw-r--r-- | share/mk/sys.mk | 13 |
3 files changed, 24 insertions, 9 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 5690332ab27..ea4542d122e 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.lib.mk,v 1.15 1997/09/08 11:16:10 niklas Exp $ +# $OpenBSD: bsd.lib.mk,v 1.16 1997/11/05 09:51:06 deraadt Exp $ # $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $ # @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 @@ -18,7 +18,7 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor # prefer .S to a .c, add .po, remove stuff not used in the BSD libraries. # .so used for PIC object files. .ln used for lint output files. .SUFFIXES: -.SUFFIXES: .out .o .po .so .S .s .c .cc .C .f .y .l .ln .m4 +.SUFFIXES: .out .o .po .so .S .s .c .cc .C .cxx .f .y .l .ln .m4 .c.o: @echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}" @@ -41,19 +41,19 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor .c.ln: ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} -i ${.IMPSRC} -.cc.o .C.o: +.cc.o .C.o .cxx.o: @echo "${COMPILE.cc} ${.IMPSRC} -o ${TARGET}" @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o -.cc.po .C.po: +.cc.po .C.po .cxx.po: @echo "${COMPILE.cc} -p ${.IMPSRC} -o ${.TARGET}" @${COMPILE.cc} -p ${.IMPSRC} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o -.cc.so .C.so: +.cc.so .C.so .cxx.so: @echo "${COMPILE.cc} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}" @${COMPILE.cc} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}.o @${LD} -x -r ${.TARGET}.o -o ${.TARGET} diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 0a15096d826..db8187727ed 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.prog.mk,v 1.13 1997/04/27 21:38:34 millert Exp $ +# $OpenBSD: bsd.prog.mk,v 1.14 1997/11/05 09:51:06 deraadt 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 @@ -8,7 +8,7 @@ .include <bsd.own.mk> -.SUFFIXES: .out .o .c .cc .C .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 +.SUFFIXES: .out .o .c .cc .C .cxx .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 CFLAGS+= ${COPTS} @@ -63,6 +63,12 @@ CLEANFILES+=strings @mv -f x.c x.C @${CXX} ${CXXFLAGS} -c x.C -o ${.TARGET} @rm -f x.C + +.cxx.o: + ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c - + @mv -f x.c x.cxx + @${CXX} ${CXXFLAGS} -c x.cxx -o ${.TARGET} + @rm -f x.cxx .endif diff --git a/share/mk/sys.mk b/share/mk/sys.mk index ab49ddf4226..75b4e0cecfb 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,4 +1,4 @@ -# $OpenBSD: sys.mk,v 1.11 1997/02/06 10:49:16 niklas Exp $ +# $OpenBSD: sys.mk,v 1.12 1997/11/05 09:51:06 deraadt Exp $ # $NetBSD: sys.mk,v 1.27 1996/04/10 05:47:19 mycroft Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -10,7 +10,7 @@ unix= We run OpenBSD. -.SUFFIXES: .out .a .ln .o .c .cc .C .F .f .r .y .l .s .S .cl .p .h .sh .m4 +.SUFFIXES: .out .a .ln .o .c .cc .C .cxx .F .f .r .y .l .s .S .cl .p .h .sh .m4 .LIBS: .a @@ -109,6 +109,15 @@ INSTALL?= install ${AR} ${ARFLAGS} $@ $*.o rm -f $*.o +.cxx: + ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.cxx.o: + ${COMPILE.cc} ${.IMPSRC} +.cxx.a: + ${COMPILE.cc} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + # Fortran/Ratfor .f: ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} |