Readd _G_config.h and the missing std headers. This brings C++ back to where
[dragonfly.git] / gnu / lib / gcc2 / 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/gcc2/libstdc++/Attic/Makefile,v 1.4 2004/04/05 18:02:51 joerg 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 INCSGROUPS=     INCS STDINCS
74 INCS=   _G_config.h ${HDRS:S;^;${SRCDIR}/;} ${IHDRS:S;^;${SRCDIR}/../libio/;} \
75         ${STLHDRS:S;^;${SRCDIR}/stl/;}
76 INCSDIR=${INCLUDEDIR}/c++/2.95
77
78 STDINCS=        ${STDHDRS:S;^;${SRCDIR}/std/;}
79 STDINCSDIR=     ${INCLUDEDIR}/c++/2.95/std
80
81 CLEANFILES+=    dummy.h dummy.c dummy.C
82
83 # Lots of special cases
84
85 # ======== cstrmain.o ========
86 SRCS+=  cstrmain.cc
87 CLEANFILES+=    cstrmain.cc
88
89 cstrmain.cc: sinst.cc
90         echo "#define C 1" > ${.TARGET}
91 .for i in REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC  EQSS EQPS EQSP NESS \
92     NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP GESS GEPS GESP
93         echo "#define $i 1" >> ${.TARGET}
94 .endfor
95         cat ${.ALLSRC} >> ${.TARGET}
96
97 # ======== cstrio.o ========
98 SRCS+=  cstrio.cc
99 CLEANFILES+=    cstrio.cc
100
101 cstrio.cc: sinst.cc
102         echo "#define C 1" > ${.TARGET}
103 .for i in EXTRACT INSERT GETLINE
104         echo "#define $i 1" >> ${.TARGET}
105 .endfor
106         cat ${.ALLSRC} >> ${.TARGET}
107
108 # ======== fcomplex.o =======
109 SRCS+=  fcomplex.cc
110 CLEANFILES+=    fcomplex.cc
111
112 fcomplex.cc: cinst.cc
113         echo "#define F 1" > ${.TARGET}
114 .for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
115     DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
116     NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
117         echo "#define $i 1" >> ${.TARGET}
118 .endfor
119         cat ${.ALLSRC} >> ${.TARGET}
120
121 # ======== fcomio.o =======
122 SRCS+=  fcomio.cc
123 CLEANFILES+=    fcomio.cc
124
125 fcomio.cc: cinst.cc
126         echo "#define F 1" > ${.TARGET}
127 .for i in EXTRACT INSERT
128         echo "#define $i 1" >> ${.TARGET}
129 .endfor
130         cat ${.ALLSRC} >> ${.TARGET}
131
132 # ======== dcomplex.o =======
133 SRCS+=  dcomplex.cc
134 CLEANFILES+=    dcomplex.cc
135
136 dcomplex.cc: cinst.cc
137         echo "#define D 1" > ${.TARGET}
138 .for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
139     DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
140     NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
141         echo "#define $i 1" >> ${.TARGET}
142 .endfor
143         cat ${.ALLSRC} >> ${.TARGET}
144
145 # ======== dcomio.o =======
146 SRCS+=  dcomio.cc
147 CLEANFILES+=    dcomio.cc
148
149 dcomio.cc: cinst.cc
150         echo "#define D 1" > ${.TARGET}
151 .for i in EXTRACT INSERT
152         echo "#define $i 1" >> ${.TARGET}
153 .endfor
154         cat ${.ALLSRC} >> ${.TARGET}
155
156 # ======== ldcomplex.o =======
157 SRCS+=  ldcomplex.cc
158 CLEANFILES+=    ldcomplex.cc
159
160 ldcomplex.cc: cinst.cc
161         echo "#define LD 1" > ${.TARGET}
162 .for i in MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
163     DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR CONJ \
164     NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
165         echo "#define $i 1" >> ${.TARGET}
166 .endfor
167         cat ${.ALLSRC} >> ${.TARGET}
168
169 # ======== ldcomio.o =======
170 SRCS+=  ldcomio.cc
171 CLEANFILES+=    ldcomio.cc
172
173 ldcomio.cc: cinst.cc
174         echo "#define LD 1" > ${.TARGET}
175 .for i in EXTRACT INSERT
176         echo "#define $i 1" >> ${.TARGET}
177 .endfor
178         cat ${.ALLSRC} >> ${.TARGET}
179
180 # ======== _G_config.h generation =======
181 # In case you want or need to generate a _G_config.h file.
182 make_G_config_h:
183         CC="${CC}" CXX="${CXX}" CONFIG_NM="nm" \
184             CPP="${CC} -E -nostdinc -idirafter ${DESTDIR}/usr/include" \
185             sh ${SRCDIR}/../libio/gen-params \
186             LIB_VERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.0 >${.TARGET}
187
188 .include <bsd.lib.mk>