Makefile revision 45299
1# 2# $Id: Makefile,v 1.19 1999/03/14 22:54:18 obrien Exp $ 3# 4 5EGCSDIR= ${.CURDIR}/../../../contrib/egcs 6 7.PATH: ${EGCSDIR}/libstdc++ ${EGCSDIR}/libstdc++/stl ${EGCSDIR}/libio 8 9LIB= stdc++ 10SHLIB_MAJOR= 3 11SHLIB_MINOR= 0 12 13CFLAGS+= -I${EGCSDIR}/include -I${EGCSDIR}/libio -I. 14CXXFLAGS+= -I${EGCSDIR}/libstdc++/stl -I${EGCSDIR}/libstdc++ \ 15 -I${EGCSDIR}/gcc/cp/inc -I. 16CXXFLAGS+= -nostdinc++ -fno-implicit-templates 17 18LDADD+= -lm 19DPADD+= ${LIBM} 20 21DIR= ${EGCSDIR}/libstdc++ 22 23HDRS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \ 24 csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \ 25 cwchar cwctype fstream iomanip iosfwd iostream stdexcept string \ 26 strstream complex.h stl.h 27 28SHDRS= bastring.cc bastring.h complext.cc complext.h dcomplex.h fcomplex.h \ 29 ldcomplex.h straits.h 30 31STLHDRS=algo.h algobase.h algorithm alloc.h bvector.h defalloc.h deque deque.h \ 32 function.h functional hash_map hash_map.h hash_set hash_set.h \ 33 hashtable.h heap.h iterator iterator.h list list.h map map.h memory \ 34 multimap.h multiset.h numeric pair.h pthread_alloc pthread_alloc.h \ 35 queue rope rope.h ropeimpl.h set set.h slist slist.h stack stack.h \ 36 stl_algo.h stl_algobase.h stl_alloc.h stl_bvector.h stl_config.h \ 37 stl_construct.h stl_deque.h stl_function.h stl_hash_fun.h \ 38 stl_hash_map.h stl_hash_set.h stl_hashtable.h stl_heap.h \ 39 stl_iterator.h stl_list.h stl_map.h stl_multimap.h stl_multiset.h \ 40 stl_numeric.h stl_pair.h stl_queue.h stl_raw_storage_iter.h \ 41 stl_relops.h stl_rope.h stl_set.h stl_slist.h stl_stack.h \ 42 stl_tempbuf.h stl_tree.h stl_uninitialized.h stl_vector.h \ 43 tempbuf.h tree.h type_traits.h utility vector vector.h 44 45# libstdc++ sources 46SRCS+= cmathi.cc cstdlibi.cc cstringi.cc stdexcepti.cc stlinst.cc 47 48# Headers for iostream / libio 49IHDRS= PlotFile.h SFile.h builtinbuf.h editbuf.h floatio.h fstream.h \ 50 indstream.h iolibio.h iomanip.h iostdio.h iostream.h iostreamP.h \ 51 istream.h libio.h libioP.h ostream.h parsestream.h pfstream.h \ 52 procbuf.h stdiostream.h stream.h streambuf.h strfile.h strstream.h 53 54# C++ parts of iostream / libio 55SRCS+= PlotFile.cc SFile.cc builtinbuf.cc editbuf.cc filebuf.cc fstream.cc \ 56 indstream.cc ioassign.cc ioextend.cc iomanip.cc iostream.cc \ 57 isgetline.cc isgetsb.cc isscan.cc osform.cc parsestream.cc \ 58 pfstream.cc procbuf.cc sbform.cc sbgetline.cc sbscan.cc \ 59 stdiostream.cc stdstrbufs.cc stdstreams.cc stream.cc streambuf.cc \ 60 strstream.cc 61 62# C parts of iostream / libio 63SRCS+= cleanup.c filedoalloc.c fileops.c floatconv.c genops.c iofclose.c \ 64 iofdopen.c iofeof.c ioferror.c iofflush.c iofflush_u.c iofgetpos.c \ 65 iofgets.c iofopen.c iofprintf.c iofputs.c iofread.c iofscanf.c \ 66 iofsetpos.c ioftell.c iofwrite.c iogetc.c iogetdelim.c iogetline.c \ 67 iogets.c ioignore.c iopadn.c ioperror.c iopopen.c ioprims.c ioprintf.c \ 68 ioputc.c ioputs.c ioscanf.c ioseekoff.c ioseekpos.c iosetbuffer.c \ 69 iosetvbuf.c iosprintf.c iosscanf.c iostrerror.c ioungetc.c \ 70 iovfprintf.c iovfscanf.c iovsprintf.c iovsscanf.c outfloat.c \ 71 peekc.c strops.c 72 73beforeinstall: _G_config.h 74 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 75 _G_config.h \ 76 ${DESTDIR}/usr/include/g++ 77 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 78 ${HDRS:S;^;${EGCSDIR}/libstdc++/;} \ 79 ${IHDRS:S;^;${EGCSDIR}/libio/;} \ 80 ${STLHDRS:S;^;${EGCSDIR}/libstdc++/stl/;} \ 81 ${DESTDIR}/usr/include/g++ 82 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 83 ${SHDRS:S;^;${EGCSDIR}/libstdc++/std/;} \ 84 ${DESTDIR}/usr/include/g++/std 85 86SRCS+= _G_config.h 87CLEANFILES+= _G_config.h dummy.h dummy.c dummy.C 88_G_config.h: Makefile ${EGCSDIR}/libio/gen-params 89 CC="${CC}" CXX="${CXX}" CONFIG_NM="nm" \ 90 CPP="${CC} -E -nostdinc -idirafter ${DESTDIR}/usr/include" \ 91 sh ${EGCSDIR}/libio/gen-params \ 92 LIB_VERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.0 >${.TARGET} 93 94# Lots of special cases 95 96# ======== typeinfoi.o, stdexcepti.o ======== 97.for file in typeinfoi stdexcepti 98CLEANFILES+= ${file}.o.tmp ${file}.po.tmp ${file}.so.tmp 99${file}.o: ${file}.cc 100 ${CXX} -nostdinc++ ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET} 101 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} 102 @mv ${.TARGET}.tmp ${.TARGET} 103 104${file}.so: ${file}.cc 105 ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET} 106 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} 107 @mv ${.TARGET}.tmp ${.TARGET} 108 109${file}.po: ${file}.cc 110 ${CXX} -p ${CXXFLAGS} -frtti -c ${DIR}/${file}.cc -o ${.TARGET} 111 @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET} 112 @mv ${.TARGET}.tmp ${.TARGET} 113.endfor 114 115# ======== exceptioni.o ======== 116.for file in exceptioni 117CLEANFILES+= ${file}.o.tmp ${file}.po.tmp ${file}.so.tmp 118${file}.o: ${file}.cc 119 ${CXX} ${CXXFLAGS} -O0 -c ${DIR}/${file}.cc -o ${.TARGET} 120 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} 121 @mv ${.TARGET}.tmp ${.TARGET} 122 123${file}.so: ${file}.cc 124 ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -O0 -c ${DIR}/${file}.cc -o ${.TARGET} 125 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} 126 @mv ${.TARGET}.tmp ${.TARGET} 127 128${file}.po: ${file}.cc 129 ${CXX} -p ${CXXFLAGS} -O0 -c ${DIR}/${file}.cc -o ${.TARGET} 130 @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET} 131 @mv ${.TARGET}.tmp ${.TARGET} 132.endfor 133 134# ======== cstrmain.o ======== 135SRCS+= cstrmain.cc 136CLEANFILES+= cstrmain.cc 137 138cstrmain.cc: sinst.cc 139 echo "#define C 1" > ${.TARGET} 140.for i in REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC EQSS EQPS EQSP NESS \ 141 NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP GESS GEPS GESP 142 echo "#define $i 1" >> ${.TARGET} 143.endfor 144 cat ${.ALLSRC} >> ${.TARGET} 145 146# ======== cstrio.o ======== 147SRCS+= cstrio.cc 148CLEANFILES+= cstrio.cc 149 150cstrio.cc: sinst.cc 151 echo "#define C 1" > ${.TARGET} 152.for i in EXTRACT INSERT GETLINE 153 echo "#define $i 1" >> ${.TARGET} 154.endfor 155 cat ${.ALLSRC} >> ${.TARGET} 156 157# ======== fcomplex.o ======= 158SRCS+= fcomplex.cc 159CLEANFILES+= fcomplex.cc 160 161fcomplex.cc: cinst.cc 162 echo "#define F 1" > ${.TARGET} 163.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ 164 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ 165 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT 166 echo "#define $i 1" >> ${.TARGET} 167.endfor 168 cat ${.ALLSRC} >> ${.TARGET} 169 170# ======== fcomio.o ======= 171SRCS+= fcomio.cc 172CLEANFILES+= fcomio.cc 173 174fcomio.cc: cinst.cc 175 echo "#define F 1" > ${.TARGET} 176.for i in EXTRACT INSERT 177 echo "#define $i 1" >> ${.TARGET} 178.endfor 179 cat ${.ALLSRC} >> ${.TARGET} 180 181# ======== dcomplex.o ======= 182SRCS+= dcomplex.cc 183CLEANFILES+= dcomplex.cc 184 185dcomplex.cc: cinst.cc 186 echo "#define D 1" > ${.TARGET} 187.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ 188 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ 189 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT 190 echo "#define $i 1" >> ${.TARGET} 191.endfor 192 cat ${.ALLSRC} >> ${.TARGET} 193 194# ======== dcomio.o ======= 195SRCS+= dcomio.cc 196CLEANFILES+= dcomio.cc 197 198dcomio.cc: cinst.cc 199 echo "#define D 1" > ${.TARGET} 200.for i in EXTRACT INSERT 201 echo "#define $i 1" >> ${.TARGET} 202.endfor 203 cat ${.ALLSRC} >> ${.TARGET} 204 205# ======== ldcomplex.o ======= 206SRCS+= ldcomplex.cc 207CLEANFILES+= ldcomplex.cc 208 209ldcomplex.cc: cinst.cc 210 echo "#define LD 1" > ${.TARGET} 211.for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ 212 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ 213 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT 214 echo "#define $i 1" >> ${.TARGET} 215.endfor 216 cat ${.ALLSRC} >> ${.TARGET} 217 218# ======== ldcomio.o ======= 219SRCS+= ldcomio.cc 220CLEANFILES+= ldcomio.cc 221 222ldcomio.cc: cinst.cc 223 echo "#define LD 1" > ${.TARGET} 224.for i in EXTRACT INSERT 225 echo "#define $i 1" >> ${.TARGET} 226.endfor 227 cat ${.ALLSRC} >> ${.TARGET} 228 229.include <bsd.lib.mk> 230