diff options
| author | tv <tv@NetBSD.org> | 2001-07-24 19:44:47 +0000 |
|---|---|---|
| committer | tv <tv@NetBSD.org> | 2001-07-24 19:44:47 +0000 |
| commit | f6709db6c67199e923533d84ebe7bc1d87ea191a (patch) | |
| tree | 60874d04ad9652d64b4060a86a365001082ce355 /gnu/lib/libstdc++/Makefile | |
| parent | b224b62a84ff74fe13d71090006c26b2aad9a8ba (diff) | |
Add new toolchain build structure for libg2c, libobjc, and libstdc++.
Note that old build system still exists under .if conditionals; this
will be removed once all platforms are using the new toolchain.
Diffstat (limited to 'gnu/lib/libstdc++/Makefile')
| -rw-r--r-- | gnu/lib/libstdc++/Makefile | 81 |
1 files changed, 77 insertions, 4 deletions
diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile index e950af36bd0..da7545d58ca 100644 --- a/gnu/lib/libstdc++/Makefile +++ b/gnu/lib/libstdc++/Makefile @@ -1,6 +1,78 @@ -# $NetBSD: Makefile,v 1.9 1999/02/13 02:54:23 lukem Exp $ +# $NetBSD: Makefile,v 1.10 2001/07/24 19:44:49 tv Exp $ + +.include <bsd.own.mk> LIB= stdc++ +MKLINT= no + +.if defined(USE_NEW_TOOLCHAIN) + +.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk" + +SUBDIR= include + +TOP= ${.CURDIR}/../.. +DIST= ${TOP}/dist/toolchain + +SRCS= ${G_OBJS:.o=.cc} ${G_LIBIBERTY_OBJS:.o=.c} + +# Ugly, but they aren't identified individually in libio/Makefile: +.for f in ${G_LIBIOSTREAM_USE} +.if exists(${DIST}/libio/${f:.o=.c}) +SRCS+= ${f:.o=.c} +.else +SRCS+= ${f:.o=.cc} +.endif +.endfor + +GCPPFLAGS= ${G_XCFLAGS} ${G_CINCLUDES} ${G_MT_CFLAGS} ${G_CXXINCLUDES} +CPPFLAGS+= -nostdinc++ -I${.CURDIR}/arch/${MACHINE_ARCH} \ + ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \ + -I${DIST}/gcc/cp/inc \ + -I${.CURDIR}/../libiberty/arch/${MACHINE_ARCH} -I${DIST}/include + +CXXFLAGS+= ${G_XCXXFLAGS:M-f*} + +.PATH: ${DIST}/libstdc++ ${DIST}/libstdc++/stl ${DIST}/libio ${DIST}/libiberty + +.for t in C +.for v in STRFUNCS STRIO +CLEANFILES+= ${t}${v}.cc +SRCS+= ${t}${v}.cc + +${t}${v}.cc: Makefile ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk sinst.cc + echo '#define ${t}' >$@ +.for f in ${G_${v}} + echo '#define ${f}' >>$@ +.endfor + cat ${>:M*.cc} >>$@ +.endfor +.endfor + +.for t in F D LD +.for v in COMFUNCS COMIO +CLEANFILES+= ${t}${v}.cc +SRCS+= ${t}${v}.cc + +${t}${v}.cc: Makefile ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk cinst.cc + echo '#define ${t}' >$@ +.for f in ${G_${v}} + echo '#define ${f}' >>$@ +.endfor + cat ${>:M*.cc} >>$@ +.endfor +.endfor + +.include <bsd.lib.mk> +.include <bsd.subdir.mk> + +${OBJS}: ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk + +.else +# +# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX +# +MKPIC=no # XXX hack; shlib_version mismatch INCS= cassert cctype cerrno cfloat ciso646 climits clocale cmath \ complex csetjmp csignal cstdarg cstddef cstdio cstdlib \ @@ -30,9 +102,6 @@ SRCS= PlotFile.cc SFile.cc builtinbuf.cc editbuf.cc filebuf.cc fstream.cc \ DIST= ${.CURDIR}/../../dist CPPFLAGS+= -I${DESTDIR}/usr/include/g++ -I${DIST}/libstdc++ -MKMAN= no -MKLINT= no - TEXINFO= iostream.texi .PATH: ${DIST}/libstdc++ ${DIST}/libstdc++/stl ${DIST}/libio @@ -73,6 +142,10 @@ ${_TYPE_}inst.cc: cinst.cc .include <bsd.info.mk> .include <bsd.lib.mk> .include <bsd.subdir.mk> +# +# XXX - END - Old toolchain build goop - delete when everything migrated - XXX +# +.endif .if (${OBJECT_FMT} == "a.out") LDADD= ${DESTDIR}/usr/lib/c++rt0.o |
