Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / lib / libstdc++ / Makefile
1 # $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.24.2.1 2001/11/21 18:55:27 obrien Exp $
2 # $DragonFly: src/gnu/lib/libstdc++/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $
3
4 SRCDIR= ${.CURDIR}/../../../contrib/libstdc++
5
6 .PATH: ${SRCDIR} ${SRCDIR}/stl ${SRCDIR}/../libio
7
8 SUBDIR= doc
9
10 LIB=            stdc++
11 SHLIB_MAJOR=    3
12 SHLIB_MINOR=    0
13
14 CFLAGS+=        -I${.CURDIR} -I${SRCDIR}/include -I${SRCDIR}/../libio -I.
15 CXXFLAGS+=      -I${SRCDIR}/stl -I${SRCDIR} -I${SRCDIR}/../gcc/cp/inc -I.
16 CXXFLAGS+=      -nostdinc++ -fno-implicit-templates
17
18 LDADD+=         -lm
19 DPADD+=         ${LIBM}
20
21 HDRS=   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 sstream stdexcept \
24         string strstream complex.h stl.h valarray
25
26 STDHDRS=bastring.cc bastring.h complext.cc complext.h dcomplex.h fcomplex.h \
27         gslice.h gslice_array.h indirect_array.h ldcomplex.h mask_array.h \
28         slice.h slice_array.h std_valarray.h straits.h valarray_array.h \
29         valarray_array.tcc valarray_meta.h
30
31 STLHDRS=algo.h algobase.h algorithm alloc.h bitset bvector.h defalloc.h deque \
32         deque.h 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
46 SRCS+=  cmathi.cc cstdlibi.cc cstringi.cc stdexcepti.cc stlinst.cc
47
48 # Headers for iostream / libio
49 IHDRS=  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
55 SRCS+=  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
63 SRCS+=  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
73 beforeinstall:
74         ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
75             ${.CURDIR}/_G_config.h \
76             ${HDRS:S;^;${SRCDIR}/;} \
77             ${IHDRS:S;^;${SRCDIR}/../libio/;} \
78             ${STLHDRS:S;^;${SRCDIR}/stl/;} \
79             ${DESTDIR}/usr/include/g++
80         ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
81             ${STDHDRS:S;^;${SRCDIR}/std/;} \
82             ${DESTDIR}/usr/include/g++/std
83
84 CLEANFILES+=    dummy.h dummy.c dummy.C
85
86 # Lots of special cases
87
88 # ======== cstrmain.o ========
89 SRCS+=  cstrmain.cc
90 CLEANFILES+=    cstrmain.cc
91
92 cstrmain.cc: sinst.cc
93         echo "#define C 1" > ${.TARGET}
94 .for i in REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC  EQSS EQPS EQSP NESS \
95     NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP GESS GEPS GESP
96         echo "#define $i 1" >> ${.TARGET}
97 .endfor
98         cat ${.ALLSRC} >> ${.TARGET}
99
100 # ======== cstrio.o ========
101 SRCS+=  cstrio.cc
102 CLEANFILES+=    cstrio.cc
103
104 cstrio.cc: sinst.cc
105         echo "#define C 1" > ${.TARGET}
106 .for i in EXTRACT INSERT GETLINE
107         echo "#define $i 1" >> ${.TARGET}
108 .endfor
109         cat ${.ALLSRC} >> ${.TARGET}
110
111 # ======== fcomplex.o =======
112 SRCS+=  fcomplex.cc
113 CLEANFILES+=    fcomplex.cc
114
115 fcomplex.cc: cinst.cc
116         echo "#define F 1" > ${.TARGET}
117 .for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
118     DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
119     NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
120         echo "#define $i 1" >> ${.TARGET}
121 .endfor
122         cat ${.ALLSRC} >> ${.TARGET}
123
124 # ======== fcomio.o =======
125 SRCS+=  fcomio.cc
126 CLEANFILES+=    fcomio.cc
127
128 fcomio.cc: cinst.cc
129         echo "#define F 1" > ${.TARGET}
130 .for i in EXTRACT INSERT
131         echo "#define $i 1" >> ${.TARGET}
132 .endfor
133         cat ${.ALLSRC} >> ${.TARGET}
134
135 # ======== dcomplex.o =======
136 SRCS+=  dcomplex.cc
137 CLEANFILES+=    dcomplex.cc
138
139 dcomplex.cc: cinst.cc
140         echo "#define D 1" > ${.TARGET}
141 .for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
142     DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
143     NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
144         echo "#define $i 1" >> ${.TARGET}
145 .endfor
146         cat ${.ALLSRC} >> ${.TARGET}
147
148 # ======== dcomio.o =======
149 SRCS+=  dcomio.cc
150 CLEANFILES+=    dcomio.cc
151
152 dcomio.cc: cinst.cc
153         echo "#define D 1" > ${.TARGET}
154 .for i in EXTRACT INSERT
155         echo "#define $i 1" >> ${.TARGET}
156 .endfor
157         cat ${.ALLSRC} >> ${.TARGET}
158
159 # ======== ldcomplex.o =======
160 SRCS+=  ldcomplex.cc
161 CLEANFILES+=    ldcomplex.cc
162
163 ldcomplex.cc: cinst.cc
164         echo "#define LD 1" > ${.TARGET}
165 .for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
166     DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
167     NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
168         echo "#define $i 1" >> ${.TARGET}
169 .endfor
170         cat ${.ALLSRC} >> ${.TARGET}
171
172 # ======== ldcomio.o =======
173 SRCS+=  ldcomio.cc
174 CLEANFILES+=    ldcomio.cc
175
176 ldcomio.cc: cinst.cc
177         echo "#define LD 1" > ${.TARGET}
178 .for i in EXTRACT INSERT
179         echo "#define $i 1" >> ${.TARGET}
180 .endfor
181         cat ${.ALLSRC} >> ${.TARGET}
182
183 # ======== _G_config.h generation =======
184 # In case you want or need to generate a _G_config.h file.
185 make_G_config_h:
186         CC="${CC}" CXX="${CXX}" CONFIG_NM="nm" \
187             CPP="${CC} -E -nostdinc -idirafter ${DESTDIR}/usr/include" \
188             sh ${SRCDIR}/../libio/gen-params \
189             LIB_VERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.0 >${.TARGET}
190
191 .include <bsd.lib.mk>