2001-12-13 02:09:13 +03:00
|
|
|
# $NetBSD: Makefile,v 1.16 2001/12/12 23:11:00 lukem 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
|
|
|
|
|
|
|
.if defined(USE_NEW_TOOLCHAIN)
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
|
|
TOP= ${.CURDIR}/../..
|
|
|
|
DIST= ${TOP}/dist/toolchain
|
|
|
|
|
|
|
|
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 \
|
|
|
|
-I${.CURDIR}/../libiberty/arch/${MACHINE_ARCH} -I${DIST}/include
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
.else
|
|
|
|
#
|
|
|
|
# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX
|
|
|
|
#
|
2001-09-21 19:38:15 +04:00
|
|
|
|
|
|
|
SHLIB_MAJOR= 2
|
|
|
|
SHLIB_MINOR= 0
|
1998-03-29 15:40:13 +04:00
|
|
|
|
1998-08-28 19:31:29 +04:00
|
|
|
INCS= cassert cctype cerrno cfloat ciso646 climits clocale cmath \
|
|
|
|
complex csetjmp csignal cstdarg cstddef cstdio cstdlib \
|
|
|
|
cstring ctime cwchar cwctype fstream iomanip iosfwd iostream \
|
|
|
|
stdexcept string strstream complex.h stl.h _G_config.h
|
|
|
|
INCSDIR= /usr/include/g++
|
1998-03-29 15:40:13 +04:00
|
|
|
|
1998-08-28 19:31:29 +04:00
|
|
|
SUBDIR= config std stl io
|
|
|
|
|
|
|
|
SRCS= PlotFile.cc SFile.cc builtinbuf.cc editbuf.cc filebuf.cc fstream.cc \
|
1998-04-09 03:39:05 +04:00
|
|
|
indstream.cc ioassign.cc ioextend.cc iomanip.cc iostream.cc \
|
|
|
|
isgetline.cc isgetsb.cc isscan.cc osform.cc parsestream.cc \
|
|
|
|
pfstream.cc procbuf.cc sbform.cc sbgetline.cc sbscan.cc \
|
|
|
|
stdiostream.cc stdstrbufs.cc stdstreams.cc stream.cc streambuf.cc \
|
|
|
|
strstream.cc \
|
|
|
|
cleanup.c filedoalloc.c fileops.c floatconv.c genops.c iofclose.c \
|
|
|
|
iofdopen.c iofeof.c ioferror.c iofflush.c iofflush_u.c iofgetpos.c \
|
|
|
|
iofgets.c iofopen.c iofprintf.c iofputs.c iofread.c iofscanf.c \
|
|
|
|
iofsetpos.c ioftell.c iofwrite.c iogetc.c iogetdelim.c iogetline.c \
|
|
|
|
iogets.c ioignore.c iopadn.c ioperror.c iopopen.c ioprims.c \
|
|
|
|
ioprintf.c ioputc.c ioputs.c ioscanf.c ioseekoff.c ioseekpos.c \
|
|
|
|
iosetbuffer.c iosetvbuf.c iosprintf.c iosscanf.c iostrerror.c \
|
|
|
|
ioungetc.c iovfprintf.c iovfscanf.c iovsprintf.c iovsscanf.c \
|
|
|
|
outfloat.c peekc.c strops.c \
|
1998-08-28 19:31:29 +04:00
|
|
|
cmathi.cc cstdlibi.cc cstringi.cc stdexcepti.cc stlinst.cc
|
1998-03-29 15:40:13 +04:00
|
|
|
|
1998-08-28 19:31:29 +04:00
|
|
|
DIST= ${.CURDIR}/../../dist
|
|
|
|
CPPFLAGS+= -I${DESTDIR}/usr/include/g++ -I${DIST}/libstdc++
|
1998-03-29 15:40:13 +04:00
|
|
|
|
1999-02-11 20:30:46 +03:00
|
|
|
TEXINFO= iostream.texi
|
|
|
|
|
1998-08-28 19:31:29 +04:00
|
|
|
.PATH: ${DIST}/libstdc++ ${DIST}/libstdc++/stl ${DIST}/libio
|
|
|
|
|
|
|
|
# W not yet supported
|
|
|
|
.for _TYPE_ in C
|
|
|
|
SRCS+= ${_TYPE_}inst.cc
|
|
|
|
CLEANFILES+= ${_TYPE_}inst.cc
|
|
|
|
${_TYPE_}inst.cc: sinst.cc
|
|
|
|
echo '#define ${_TYPE_}' >$@
|
|
|
|
@for func in \
|
|
|
|
REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC EQSS EQPS EQSP \
|
|
|
|
NESS NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP \
|
|
|
|
GESS GEPS GESP EXTRACT INSERT GETLINE; do \
|
|
|
|
echo "#define $$func" >>$@; \
|
|
|
|
done
|
|
|
|
cat $> >>$@
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for _TYPE_ in F D LD
|
|
|
|
SRCS+= ${_TYPE_}inst.cc
|
|
|
|
CLEANFILES+= ${_TYPE_}inst.cc
|
|
|
|
${_TYPE_}inst.cc: cinst.cc
|
|
|
|
echo '#define ${_TYPE_}' >$@
|
|
|
|
@for func in \
|
|
|
|
MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC \
|
|
|
|
DIVCC DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC \
|
|
|
|
ABS ARG POLAR CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI \
|
|
|
|
POWFC SIN SINH SQRT EXTRACT INSERT; do \
|
|
|
|
echo "#define $$func" >>$@; \
|
|
|
|
done
|
|
|
|
cat $> >>$@
|
|
|
|
.endfor
|
1998-03-29 15:40:13 +04:00
|
|
|
|
1998-04-12 18:18:41 +04:00
|
|
|
.cc:
|
|
|
|
@true
|
|
|
|
|
1999-02-11 20:30:46 +03:00
|
|
|
.include <bsd.info.mk>
|
1998-03-29 15:40:13 +04:00
|
|
|
.include <bsd.lib.mk>
|
|
|
|
.include <bsd.subdir.mk>
|
2001-07-24 23:44:47 +04:00
|
|
|
#
|
|
|
|
# XXX - END - Old toolchain build goop - delete when everything migrated - XXX
|
|
|
|
#
|
|
|
|
.endif
|
1998-03-29 15:40:13 +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
|