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