Makefile revision 34707
1# 2# $Id: Makefile,v 1.8 1998/02/25 01:23:28 bde Exp $ 3# 4 5GPPDIR= ${.CURDIR}/../../../contrib/libg++ 6 7.PATH: ${GPPDIR}/libstdc++ ${GPPDIR}/libstdc++/stl ${GPPDIR}/libio \ 8 ${GPPDIR}/libiberty 9 10LIB= stdc++ 11SHLIB_MAJOR= 2 12SHLIB_MINOR= 0 13 14CFLAGS+= -I${GPPDIR}/include -I${DESTDIR}/usr/include/g++ -I. 15CXXFLAGS+= -I${GPPDIR}/include -I${GPPDIR}/libio -I${GPPDIR}/libstdc++ 16CXXFLAGS+= -fno-implicit-templates 17 18DIR= ${GPPDIR}/libstdc++ 19 20HDRS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \ 21 csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \ 22 cwchar cwctype new stddef string exception stdexcept typeinfo \ 23 algorithm deque list map queue set stack vector utility functional \ 24 iterator memory numeric \ 25 complex.h new.h stl.h 26 27SHDRS= bastring.cc bastring.h cassert.h cctype.h cerrno.h cfloat.h cinst.h \ 28 ciso646.h climits.h clocale.h cmath.h complex.h complext.cc \ 29 complext.h csetjmp.h csignal.h cstdarg.h cstddef.h cstdio.h \ 30 cstdlib.h cstring.h ctime.h cwchar.h cwctype.h dcomplex.h exception.h \ 31 fcomplex.h ldcomplex.h new.h sinst.h stddef.h stdexcept.h straits.h \ 32 string.h typeinfo.h 33 34STLHDRS=algo.h algobase.h bool.h bvector.h defalloc.h deque.h faralloc.h \ 35 fdeque.h flist.h fmap.h fmultmap.h fmultset.h fset.h function.h \ 36 hdeque.h heap.h hlist.h hmap.h hmultmap.h hmultset.h hset.h \ 37 hugalloc.h hvector.h iterator.h lbvector.h ldeque.h list.h llist.h \ 38 lmap.h lmultmap.h lmultset.h lngalloc.h lset.h map.h multimap.h \ 39 multiset.h neralloc.h nmap.h nmultmap.h nmultset.h nset.h pair.h \ 40 projectn.h set.h stack.h tempbuf.h tree.h vector.h 41 42SRCS+= newi.cc cstringi.cc stddefi.cc typeinfoi.cc exceptioni.cc \ 43 stdexcepti.cc cstdlibi.cc cmathi.cc 44 45# stl sources. 46SRCS+= tempbuf.cc tree.cc random.cc 47 48# "standard" C parts of libiberty (strerror is a superset of the libc version) 49SRCS+= insque.c strerror.c 50 51# Headers for iostream 52IHDRS= PlotFile.h SFile.h builtinbuf.h editbuf.h floatio.h fstream.h \ 53 indstream.h iolibio.h iomanip.h iostdio.h iostream.h iostreamP.h \ 54 istream.h libio.h libioP.h ostream.h parsestream.h pfstream.h \ 55 procbuf.h stdiostream.h stream.h streambuf.h strfile.h strstream.h 56 57# C++ parts of iostream 58SRCS+= PlotFile.cc SFile.cc builtinbuf.cc editbuf.cc filebuf.cc fstream.cc \ 59 indstream.cc ioassign.cc ioextend.cc iomanip.cc iostream.cc \ 60 isgetline.cc isgetsb.cc isscan.cc osform.cc parsestream.cc \ 61 pfstream.cc procbuf.cc sbform.cc sbgetline.cc sbscan.cc \ 62 stdiostream.cc stdstrbufs.cc stdstreams.cc stream.cc streambuf.cc \ 63 strstream.cc 64 65# C parts of iostream 66SRCS+= cleanup.c filedoalloc.c fileops.c floatconv.c genops.c iofclose.c \ 67 iofgetpos.c iofread.c iofscanf.c iofsetpos.c iogetdelim.c iogetline.c \ 68 ioignore.c iopadn.c iopopen.c ioprims.c ioprintf.c ioseekoff.c \ 69 ioseekpos.c iostrerror.c ioungetc.c iovfprintf.c iovfscanf.c \ 70 outfloat.c strops.c 71 72SRCS+= config.h 73CLEANFILES+= config.h 74 75config.h: 76 touch config.h 77 78beforeinstall: 79 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 80 ${.CURDIR}/_G_config.h \ 81 ${HDRS:S;^;${GPPDIR}/libstdc++/;} \ 82 ${IHDRS:S;^;${GPPDIR}/libio/;} \ 83 ${STLHDRS:S;^;${GPPDIR}/libstdc++/stl/;} \ 84 ${DESTDIR}/usr/include/g++ 85 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 86 ${SHDRS:S;^;${GPPDIR}/libstdc++/std/;} \ 87 ${DESTDIR}/usr/include/g++/std 88 89# Lots of special cases 90 91# ======== typeinfoi.o, stdexcepti.o ======== 92.for file in typeinfoi stdexcepti 93${file}.o: ${file}.cc 94 ${CXX} ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET} 95 @${LD} -O ${.TARGET} -x -r ${.TARGET} 96 97${file}.so: ${file}.cc 98 ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET} 99 @${LD} -O ${.TARGET} -x -r ${.TARGET} 100 101${file}.po: ${file}.cc 102 ${CXX} -p ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET} 103 @${LD} -O ${.TARGET} -X -r ${.TARGET} 104.endfor 105 106# ======== exceptioni.o ======== 107.for file in exceptioni 108${file}.o: ${file}.cc 109 ${CXX} ${CXXFLAGS} -O0 -frtti -fhandle-exceptions -c ${DIR}/${file}.cc -o ${.TARGET} 110 @${LD} -O ${.TARGET} -x -r ${.TARGET} 111 112${file}.so: ${file}.cc 113 ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -O0 -frtti -fhandle-exceptions -c ${DIR}/${file}.cc -o ${.TARGET} 114 @${LD} -O ${.TARGET} -x -r ${.TARGET} 115 116${file}.po: ${file}.cc 117 ${CXX} -p ${CXXFLAGS} -O0 -frtti -fhandle-exceptions -c ${DIR}/${file}.cc -o ${.TARGET} 118 @${LD} -O ${.TARGET} -X -r ${.TARGET} 119.endfor 120 121# ======== cstrmain.o ======== 122SRCS+= cstrmain.cc 123CLEANFILES+= cstrmain.cc 124 125cstrmain.cc: sinst.cc 126 echo "#define C 1" > ${.TARGET} 127.for i in REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC EQSS EQPS EQSP NESS \ 128 NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP GESS GEPS GESP 129 echo "#define $i 1" >> ${.TARGET} 130.endfor 131 cat ${.ALLSRC} >> ${.TARGET} 132 133# ======== cstrio.o ======== 134SRCS+= cstrio.cc 135CLEANFILES+= cstrio.cc 136 137cstrio.cc: sinst.cc 138 echo "#define C 1" > ${.TARGET} 139.for i in EXTRACT INSERT GETLINE 140 echo "#define $i 1" >> ${.TARGET} 141.endfor 142 cat ${.ALLSRC} >> ${.TARGET} 143 144# ======== fcomplex.o ======= 145SRCS+= fcomplex.cc 146CLEANFILES+= fcomplex.cc 147 148fcomplex.cc: cinst.cc 149 echo "#define F 1" > ${.TARGET} 150.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ 151 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ 152 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT 153 echo "#define $i 1" >> ${.TARGET} 154.endfor 155 cat ${.ALLSRC} >> ${.TARGET} 156 157# ======== fcomio.o ======= 158SRCS+= fcomio.cc 159CLEANFILES+= fcomio.cc 160 161fcomio.cc: cinst.cc 162 echo "#define F 1" > ${.TARGET} 163.for i in EXTRACT INSERT 164 echo "#define $i 1" >> ${.TARGET} 165.endfor 166 cat ${.ALLSRC} >> ${.TARGET} 167 168# ======== dcomplex.o ======= 169SRCS+= dcomplex.cc 170CLEANFILES+= dcomplex.cc 171 172dcomplex.cc: cinst.cc 173 echo "#define D 1" > ${.TARGET} 174.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ 175 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ 176 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT 177 echo "#define $i 1" >> ${.TARGET} 178.endfor 179 cat ${.ALLSRC} >> ${.TARGET} 180 181# ======== dcomio.o ======= 182SRCS+= dcomio.cc 183CLEANFILES+= dcomio.cc 184 185dcomio.cc: cinst.cc 186 echo "#define D 1" > ${.TARGET} 187.for i in EXTRACT INSERT 188 echo "#define $i 1" >> ${.TARGET} 189.endfor 190 cat ${.ALLSRC} >> ${.TARGET} 191 192# ======== ldcomplex.o ======= 193SRCS+= ldcomplex.cc 194CLEANFILES+= ldcomplex.cc 195 196ldcomplex.cc: cinst.cc 197 echo "#define LD 1" > ${.TARGET} 198.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ 199 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ 200 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT 201 echo "#define $i 1" >> ${.TARGET} 202.endfor 203 cat ${.ALLSRC} >> ${.TARGET} 204 205# ======== ldcomio.o ======= 206SRCS+= ldcomio.cc 207CLEANFILES+= ldcomio.cc 208 209ldcomio.cc: cinst.cc 210 echo "#define LD 1" > ${.TARGET} 211.for i in EXTRACT INSERT 212 echo "#define $i 1" >> ${.TARGET} 213.endfor 214 cat ${.ALLSRC} >> ${.TARGET} 215 216.include <bsd.lib.mk> 217