* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
# $NetBSD: Makefile,v 1.20 2002/09/17 23:18:36 thorpej Exp $
|
2001-10-31 19:27:31 +03:00
|
|
|
|
|
|
|
REQUIRETOOLS= yes
|
2001-12-13 02:09:13 +03:00
|
|
|
NOLINT= # defined
|
2001-07-24 23:44:47 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1998-03-29 15:40:13 +04:00
|
|
|
|
1998-08-28 19:31:29 +04:00
|
|
|
LIB= stdc++
|
2001-07-24 23:44:47 +04:00
|
|
|
|
2002-02-12 00:36:33 +03:00
|
|
|
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
|
2001-07-24 23:44:47 +04:00
|
|
|
.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
|
|
|
|
|
2001-09-21 19:38:15 +04:00
|
|
|
SHLIB_MAJOR= 4
|
|
|
|
SHLIB_MINOR= 0
|
|
|
|
|
2001-08-10 15:57:48 +04:00
|
|
|
SUBDIR= include io config
|
2001-07-24 23:44:47 +04:00
|
|
|
|
2002-08-19 13:46:39 +04:00
|
|
|
DIST= ${NETBSDSRCDIR}/gnu/dist/toolchain
|
2001-07-24 23:44:47 +04:00
|
|
|
|
|
|
|
SRCS= ${G_OBJS:.o=.cc} ${G_LIBIBERTY_OBJS:.o=.c}
|
2001-08-10 15:57:48 +04:00
|
|
|
INCS= _G_config.h
|
|
|
|
INCSDIR= /usr/include/g++
|
2001-07-24 23:44:47 +04:00
|
|
|
|
|
|
|
# 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 \
|
2002-08-19 13:46:39 +04:00
|
|
|
-I${NETBSDSRCDIR}/gnu/lib/libiberty -I${DIST}/include
|
2001-07-24 23:44:47 +04:00
|
|
|
|
|
|
|
CXXFLAGS+= ${G_XCXXFLAGS:M-f*}
|
|
|
|
|
2001-08-19 18:19:38 +04:00
|
|
|
TEXINFO= iostream.texi
|
|
|
|
|
2001-07-24 23:44:47 +04:00
|
|
|
.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>
|
2001-08-19 18:19:38 +04:00
|
|
|
.include <bsd.info.mk>
|
2001-07-24 23:44:47 +04:00
|
|
|
|
|
|
|
${OBJS}: ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
|
2002-02-12 00:36:33 +03:00
|
|
|
.else
|
|
|
|
.include <bsd.prog.mk> # do nothing
|
|
|
|
.endif
|
2001-07-24 23:44:47 +04:00
|
|
|
|
1998-08-28 19:31:29 +04:00
|
|
|
.if (${OBJECT_FMT} == "a.out")
|
|
|
|
LDADD= ${DESTDIR}/usr/lib/c++rt0.o
|
|
|
|
DPADD= ${DESTDIR}/usr/lib/c++rt0.o
|
|
|
|
.endif
|