Initial shot at a bmakefile for libstdc++

This commit is contained in:
Peter Wemm 1996-10-03 22:52:23 +00:00
parent 3cfdb0dc3d
commit 99dd87778d
2 changed files with 364 additions and 0 deletions

286
gnu/lib/libstdc++/Makefile Normal file
View File

@ -0,0 +1,286 @@
#
# $Id$
#
GPPDIR= ${.CURDIR}/../../../contrib/libg++
.PATH: ${GPPDIR}/libstdc++ ${GPPDIR}/libio ${GPPDIR}/libiberty
LIB= stdc++
SHLIB_MAJOR= 2
SHLIB_MINOR= 0
CPLUSPLUSLIB= 1 # include c++rt0.o for static constructors
CFLAGS+= -I${GPPDIR}/include -I/usr/include/g++ -I.
CXXFLAGS+= -I${GPPDIR}/include -I${GPPDIR}/libio -I${GPPDIR}/libstdc++
CXXFLAGS+= -fno-implicit-templates
DIR= ${GPPDIR}/libstdc++
HDRS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
cwchar cwctype new stddef string exception stdexcept typeinfo \
algorithm deque list map queue set stack vector utility functional \
iterator memory numeric \
complex.h new.h stl.h
SHDRS= bastring.cc bastring.h cassert.h cctype.h cerrno.h cfloat.h cinst.h \
ciso646.h climits.h clocale.h cmath.h complex.h complext.cc \
complext.h csetjmp.h csignal.h cstdarg.h cstddef.h cstdio.h \
cstdlib.h cstring.h ctime.h cwchar.h cwctype.h dcomplex.h exception.h \
fcomplex.h ldcomplex.h new.h sinst.h stddef.h stdexcept.h straits.h \
string.h typeinfo.h
STLHDRS=algo.h algobase.h bool.h bvector.h defalloc.h deque.h faralloc.h \
fdeque.h flist.h fmap.h fmultmap.h fmultset.h fset.h function.h \
hdeque.h heap.h hlist.h hmap.h hmultmap.h hmultset.h hset.h \
hugalloc.h hvector.h iterator.h lbvector.h ldeque.h list.h llist.h \
lmap.h lmultmap.h lmultset.h lngalloc.h lset.h map.h multimap.h \
multiset.h neralloc.h nmap.h nmultmap.h nmultset.h nset.h pair.h \
projectn.h set.h stack.h tempbuf.h tree.h vector.h
SRCS+= newi.cc cstringi.cc stddefi.cc typeinfoi.cc exceptioni.cc \
stdexcepti.cc cstdlibi.cc cmathi.cc
# "standard" C parts of libiberty (strerror is a superset of the libc version)
SRCS+= insque.c strerror.c
# Headers for iostream
IHDRS= PlotFile.h SFile.h builtinbuf.h editbuf.h floatio.h fstream.h \
indstream.h iolibio.h iomanip.h iostdio.h iostream.h iostreamP.h \
istream.h libio.h libioP.h ostream.h parsestream.h pfstream.h \
procbuf.h stdiostream.h stream.h streambuf.h strfile.h strstream.h
# C++ parts of iostream
SRCS+= PlotFile.cc SFile.cc builtinbuf.cc editbuf.cc filebuf.cc fstream.cc \
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 \
streambuf.cc strstream.cc
# C parts of iostream
SRCS+= cleanup.c filedoalloc.c fileops.c floatconv.c genops.c iofclose.c \
iofgetpos.c iofread.c iofscanf.c iofsetpos.c iogetdelim.c iogetline.c \
ioignore.c iopadn.c iopopen.c ioprims.c ioprintf.c ioseekoff.c \
ioseekpos.c iostrerror.c ioungetc.c iovfprintf.c iovfscanf.c \
outfloat.c strops.c
beforedepend: config.h
strerror.o: config.h
CLEANFILES+= config.h
config.h:
touch config.h
beforeinstall:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
${.CURDIR}/_G_config.h \
${HDRS:S;^;${GPPDIR}/libstdc++/;} \
${IHDRS:S;^;${GPPDIR}/libio/;} \
${STLHDRS:S;^;${GPPDIR}/libstdc++/stl/;} \
${DESTDIR}/usr/include/g++
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
${SHDRS:S;^;${GPPDIR}/libstdc++/std/;} \
${DESTDIR}/usr/include/g++/std
# Lots of special cases
# ======== typeinfoi.o, stdexcepti.o ========
.for file in typeinfoi stdexcepti
${file}.o: ${file}.cc
${CXX} ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
${file}.so: ${file}.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
${file}.po: ${file}.cc
${CXX} -p ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
.endfor
# ======== exceptioni.o ========
.for file in exceptioni
${file}.o: ${file}.cc
${CXX} ${CXXFLAGS} -O0 -frtti -fhandle-exceptions -c ${DIR}/${file}.cc -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
${file}.so: ${file}.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -O0 -frtti -fhandle-exceptions -c ${DIR}/${file}.cc -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
${file}.po: ${file}.cc
${CXX} -p ${CXXFLAGS} -O0 -frtti -fhandle-exceptions -c ${DIR}/${file}.cc -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
.endfor
# ======== cstrmain.o ========
CSTRMAIN= -DC
.for i 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
CSTRMAIN+= -D${i}
.endfor
OBJS+= cstrmain.o
cstrmain.o: sinst.cc
${CXX} ${CXXFLAGS} ${CSTRMAIN} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
cstrmain.so: sinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${CSTRMAIN} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
cstrmain.po: sinst.cc
${CXX} -p ${CXXFLAGS} ${CSTRMAIN} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
# ======== cstrio.o ========
CSTRIO= -DC
.for i in EXTRACT INSERT GETLINE
CSTRIO+= -D${i}
.endfor
OBJS+= cstrio.o
cstrio.o: sinst.cc
${CXX} ${CXXFLAGS} ${CSTRIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
cstrio.so: sinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${CSTRIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
cstrio.po: sinst.cc
${CXX} -p ${CXXFLAGS} ${CSTRIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
# ======== fcomplex.o =======
FCOMPLEX= -DF
.for i in MAIN ADD CC 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
FCOMPLEX+= -D${i}
.endfor
OBJS+= fcomplex.o
fcomplex.o: cinst.cc
${CXX} ${CXXFLAGS} ${FCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
fcomplex.so: cinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${FCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
fcomplex.po: cinst.cc
${CXX} -p ${CXXFLAGS} ${FCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
# ======== fcomio.o =======
FCOMIO= -DF
.for i in EXTRACT INSERT
FCOMIO+=-D${i}
.endfor
OBJS+= fcomio.o
fcomio.o: cinst.cc
${CXX} ${CXXFLAGS} ${FCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
fcomio.so: cinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${FCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
fcomio.po: cinst.cc
${CXX} -p ${CXXFLAGS} ${FCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
# ======== dcomplex.o =======
DCOMPLEX= -DD
.for i in MAIN ADD CC 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
DCOMPLEX+= -D${i}
.endfor
OBJS+= dcomplex.o
dcomplex.o: cinst.cc
${CXX} ${CXXFLAGS} ${DCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
dcomplex.so: cinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${DCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
dcomplex.po: cinst.cc
${CXX} -p ${CXXFLAGS} ${DCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
# ======== dcomio.o =======
DCOMIO= -DD
.for i in EXTRACT INSERT
DCOMIO+=-D${i}
.endfor
OBJS+= dcomio.o
dcomio.o: cinst.cc
${CXX} ${CXXFLAGS} ${DCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
dcomio.so: cinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${DCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
dcomio.po: cinst.cc
${CXX} -p ${CXXFLAGS} ${DCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
# ======== ldcomplex.o =======
LDCOMPLEX= -DLD
.for i in MAIN ADD CC 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
LDCOMPLEX+= -D${i}
.endfor
OBJS+= ldcomplex.o
ldcomplex.o: cinst.cc
${CXX} ${CXXFLAGS} ${LDCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
ldcomplex.so: cinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${LDCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
ldcomplex.po: cinst.cc
${CXX} -p ${CXXFLAGS} ${LDCOMPLEX} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
# ======== ldcomio.o =======
LDCOMIO= -DLD
.for i in EXTRACT INSERT
LDCOMIO+=-D${i}
.endfor
OBJS+= ldcomio.o
ldcomio.o: cinst.cc
${CXX} ${CXXFLAGS} ${LDCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
ldcomio.so: cinst.cc
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${LDCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
ldcomio.po: cinst.cc
${CXX} -p ${CXXFLAGS} ${LDCOMIO} -c ${.ALLSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
.include <bsd.lib.mk>

View File

@ -0,0 +1,78 @@
/* AUTOMATICALLY GENERATED; DO NOT EDIT! */
#ifndef _G_config_h
#define _G_config_h
#define _G_LIB_VERSION "2.7.2"
#define _G_NAMES_HAVE_UNDERSCORE 1
#define _G_VTABLE_LABEL_HAS_LENGTH 1
#define _G_VTABLE_LABEL_PREFIX "__vt$"
#define _G_HAVE_ST_BLKSIZE 1
typedef unsigned long _G_clock_t;
typedef unsigned int _G_dev_t;
typedef long long _G_fpos_t;
typedef unsigned int _G_gid_t;
typedef unsigned int _G_ino_t;
typedef unsigned short _G_mode_t;
typedef unsigned short _G_nlink_t;
typedef long long _G_off_t;
typedef int _G_pid_t;
#ifndef __PTRDIFF_TYPE__
#define __PTRDIFF_TYPE__ int
#endif
typedef __PTRDIFF_TYPE__ _G_ptrdiff_t;
typedef unsigned int _G_sigset_t;
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ unsigned int
#endif
typedef __SIZE_TYPE__ _G_size_t;
typedef long _G_time_t;
typedef unsigned int _G_uid_t;
typedef int _G_wchar_t;
typedef int _G_ssize_t;
typedef int /* default */ _G_wint_t;
typedef char * _G_va_list;
#define _G_signal_return_type void
#define _G_sprintf_return_type int
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
typedef int _G_int8_t __attribute__((__mode__(__QI__)));
typedef unsigned int _G_uint8_t __attribute__((__mode__(__QI__)));
typedef int _G_int16_t __attribute__((__mode__(__HI__)));
typedef unsigned int _G_uint16_t __attribute__((__mode__(__HI__)));
typedef int _G_int32_t __attribute__((__mode__(__SI__)));
typedef unsigned int _G_uint32_t __attribute__((__mode__(__SI__)));
typedef int _G_int64_t __attribute__((__mode__(__DI__)));
typedef unsigned int _G_uint64_t __attribute__((__mode__(__DI__)));
#else
typedef short _G_int16_t;
typedef unsigned short _G_uint16_t;
typedef int _G_int32_t;
typedef unsigned int _G_uint32_t;
#endif
#define _G_BUFSIZ 1024
#define _G_FOPEN_MAX 20
#define _G_FILENAME_MAX 1024
#define _G_NULL 0 /* default */
#if defined (__cplusplus) || defined (__STDC__)
#define _G_ARGS(ARGLIST) ARGLIST
#else
#define _G_ARGS(ARGLIST) ()
#endif
#if !defined (__GNUG__) || defined (__STRICT_ANSI__)
#define _G_NO_NRV
#endif
#if !defined (__GNUG__)
#define _G_NO_EXTERN_TEMPLATES
#endif
#define _G_HAVE_ATEXIT 1
#define _G_HAVE_SYS_RESOURCE 1
#define _G_HAVE_SYS_TIMES 1
#define _G_HAVE_SYS_SOCKET 1
#define _G_HAVE_SYS_CDEFS 1
#define _G_HAVE_SYS_WAIT 1
#define _G_HAVE_UNISTD 1
#define _G_HAVE_DIRENT 1
#define _G_HAVE_CURSES 1
#define _G_MATH_H_INLINES 0
#define _G_HAVE_BOOL 1
#endif /* !_G_config_h */