RIP GNU patch.
[dragonfly.git] / gnu / lib / gcc3 / libstdc++ / Makefile
CommitLineData
6fecd16f 1# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.49 2004/01/06 19:20:30 kan Exp $
7db62ea6 2# $DragonFly: src/gnu/lib/gcc3/libstdc++/Attic/Makefile,v 1.2 2004/02/02 23:35:09 dillon Exp $
6fecd16f 3
7db62ea6
MD
4.include "../Makefile.inc"
5
6SRCDIR= ${GCCDIR}/libstdc++-v3
6fecd16f
JS
7SUPDIR= ${SRCDIR}/libsupc++
8
9.PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \
10 ${SRCDIR}/config/locale/generic ${SRCDIR} ${SRCDIR}/std \
7db62ea6 11 ${SUPDIR} ${GCCDIR}/gcc ${GCCDIR}/libiberty
6fecd16f
JS
12
13#SUBDIR= doc
14
15LIB= stdc++
16SHLIB_MAJOR= 4
17
18CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
7db62ea6 19CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR}/gcc -I${GCCDIR}/include
6fecd16f
JS
20CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \
21 -Wno-deprecated
22#LDFLAGS+= -Wl,-version-info,4:0:0 -Wl,--version-script=${SRCDIR}/src/linker.map
23
24LDADD+= -lm
25DPADD+= ${LIBM}
26
27# libstdc++ sources (libstdc++/src/Makefile.in, do not reorder)
28SRCS+= bitset.cc codecvt.cc complex_io.cc concept-inst.cc ctype.cc \
29 ext-inst.cc fstream.cc fstream-inst.cc functexcept.cc \
30 globals.cc io-inst.cc ios.cc istream-inst.cc limits.cc \
31 locale.cc locale-inst.cc localename.cc misc-inst.cc \
32 ostream-inst.cc sstream-inst.cc stdexcept.cc stl-inst.cc \
33 streambuf-inst.cc string-inst.cc strstream-fixed.cc \
34 valarray-inst.cc vterminate.cc wstring-inst.cc
35
36# target sources
37SRCS+= codecvt_members.cc collate_members.cc ctype_members.cc \
38 messages_members.cc monetary_members.cc numeric_members.cc \
39 time_members.cc
40
41# target sources extra
42SRCS+= basic_file_stdio.cc c_locale.cc
43
44# C parts of math
45SRCS+= nan.c signbit.c signbitf.c signbitl.c stubs.c
46
47# Embedded copy of libsupc++
48SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \
49 eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc \
50 eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.cc eh_type.cc \
51 guard.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \
52 pure.cc tinfo.cc tinfo2.cc vec.cc
53
54# from libiberty:
55SRCS+= cp-demangle.c dyn-string.c
56
57strstream-fixed.cc: ${SRCDIR}/src/strstream.cc
58 sed -e 's,^#include <strstream>,#include <backward/strstream>,g' \
59 < ${SRCDIR}/src/strstream.cc > strstream-fixed.cc
60
61CLEANFILES+= strstream-fixed.cc
62
63INCSGROUPS= BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \
64 TARGETHDRS THRHDRS
65
66BITSHDRS= basic_ios.h basic_ios.tcc basic_string.h basic_string.tcc \
67 boost_concept_check.h char_traits.h codecvt.h concept_check.h \
68 cpp_type_traits.h deque.tcc fpos.h fstream.tcc functexcept.h \
69 gslice.h gslice_array.h indirect_array.h \
70 ios_base.h istream.tcc list.tcc \
71 locale_classes.h locale_facets.h locale_facets.tcc \
72 localefwd.h mask_array.h ostream.tcc pthread_allocimpl.h \
73 slice_array.h sstream.tcc stl_algo.h stl_algobase.h \
74 stl_alloc.h stl_bvector.h stl_construct.h stl_deque.h \
75 stl_function.h stl_heap.h stl_iterator.h \
76 stl_iterator_base_funcs.h stl_iterator_base_types.h \
77 stl_list.h stl_map.h stl_multimap.h stl_multiset.h \
78 stl_numeric.h stl_pair.h stl_pthread_alloc.h stl_queue.h \
79 stl_raw_storage_iter.h stl_relops.h stl_set.h stl_stack.h \
80 stl_tempbuf.h stl_threads.h stl_tree.h stl_uninitialized.h \
81 stl_vector.h stream_iterator.h streambuf.tcc \
82 streambuf_iterator.h stringfwd.h type_traits.h \
83 valarray_array.h valarray_array.tcc valarray_meta.h \
84 vector.tcc
85BITSHDRS:= ${BITSHDRS:S;^;${SRCDIR}/include/bits/;}
86BITSHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits
87
88BKWHDRS= algo.h algobase.h alloc.h backward_warning.h bvector.h \
89 complex.h defalloc.h deque.h fstream.h function.h \
90 hash_map.h hash_set.h hashtable.h heap.h iomanip.h \
91 iostream.h istream.h iterator.h list.h map.h multimap.h \
92 multiset.h new.h ostream.h pair.h queue.h rope.h set.h \
93 slist.h stack.h stream.h streambuf.h strstream \
94 tempbuf.h tree.h vector.h
95BKWHDRS:= ${BKWHDRS:S;^;${SRCDIR}/include/backward/;}
96BKWHDRSDIR= ${INCLUDEDIR}/c++/3.3/backward
97
98EXTHDRS= algorithm enc_filebuf.h functional hash_map hash_set \
99 iterator memory numeric rb_tree rope ropeimpl.h slist \
100 stdio_filebuf.h stl_hash_fun.h stl_hashtable.h stl_rope.h
101EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;}
102EXTHDRSDIR= ${INCLUDEDIR}/c++/3.3/ext
103
104# This is the common subset of files that all three "C" header models use.
105BASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h \
106 std_ciso646.h std_climits.h std_clocale.h std_cmath.h \
107 std_csetjmp.h std_csignal.h std_cstdarg.h std_cstddef.h \
108 std_cstdio.h std_cstdlib.h std_cstring.h std_ctime.h \
109 std_cwchar.h std_cwctype.h
110.for h in ${BASEHDRS}
111BASEHDRSNAME_$h=${h:R:S;^std_;;}
112.endfor
113BASEHDRS:= ${BASEHDRS:S;^;${SRCDIR}/include/c_std/;}
114BASEHDRSDIR= ${INCLUDEDIR}/c++/3.3
115
116# Some of the different "C" header models need extra files.
117BASEXHDRS= ${SRCDIR}/include/c_std/cmath.tcc
118BASEXHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits
119
120STDHDRS= std_algorithm.h std_bitset.h std_complex.h std_deque.h \
121 std_fstream.h std_functional.h std_iomanip.h std_ios.h \
122 std_iosfwd.h std_iostream.h std_istream.h std_iterator.h \
123 std_limits.h std_list.h std_locale.h std_map.h std_memory.h \
124 std_numeric.h std_ostream.h std_queue.h std_set.h \
125 std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h \
126 std_string.h std_utility.h std_valarray.h std_vector.h
127.for h in ${STDHDRS}
128STDHDRSNAME_$h=${h:R:S;^std_;;}
129.endfor
130STDHDRS:= ${STDHDRS:S;^;${SRCDIR}/include/std/;}
131STDHDRSDIR= ${INCLUDEDIR}/c++/3.3
132
133TARGETHDRS= io/basic_file_stdio.h io/c_io_stdio.h \
134 locale/generic/c_locale.h \
135 locale/generic/c++locale_internal.h \
136 locale/generic/codecvt_specializations.h \
137 locale/generic/messages_members.h \
138 locale/generic/time_members.h \
139 os/bsd/freebsd/ctype_base.h \
140 os/bsd/freebsd/ctype_inline.h \
141 os/bsd/freebsd/ctype_noninline.h \
142 os/bsd/freebsd/os_defines.h
143TARGETHDRS:= ${TARGETHDRS:S;^;${SRCDIR}/config/;}
144TARGETHDRS+= ${.CURDIR}/c++config.h
145TARGETHDRSNAME_basic_file_stdio.h= basic_file.h
146TARGETHDRSNAME_c_io_stdio.h= c++io.h
147TARGETHDRSNAME_c_locale.h= c++locale.h
148TARGETHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits
149
150MARCHHDRS= atomicity.h
151.if ${MACHINE_ARCH} == "sparc64"
152MARCHDIR= sparc
153.elif ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU} != 'i386'
154MARCHDIR= i486
155.else
156MARCHDIR= ${MACHINE_ARCH}
157.endif
158
159.for h in ${MARCHHDRS}
160.if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h})
161TARGETHDRS+= ${SRCDIR}/config/cpu/${MARCHDIR}/${h}
162.else
163TARGETHDRS+= ${SRCDIR}/config/cpu/generic/${h}
164.endif
165.endfor
166
167THRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-default.h
168THRHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits
169
7db62ea6 170gthr.h: ${GCCDIR}/gcc/gthr.h
6fecd16f
JS
171 sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \
172 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
7db62ea6 173 < ${GCCDIR}/gcc/gthr.h > gthr.h
6fecd16f 174
7db62ea6 175gthr-single.h: ${GCCDIR}/gcc/gthr-single.h
6fecd16f
JS
176 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
177 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
7db62ea6 178 < ${GCCDIR}/gcc/gthr-single.h > gthr-single.h
6fecd16f 179
7db62ea6 180gthr-posix.h: ${GCCDIR}/gcc/gthr-posix.h
6fecd16f
JS
181 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
182 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
183 -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
7db62ea6 184 < ${GCCDIR}/gcc/gthr-posix.h > gthr-posix.h
6fecd16f 185
7db62ea6 186gthr-default.h: ${GCCDIR}/gcc/gthr-posix.h
6fecd16f
JS
187 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
188 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
189 -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
190 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
7db62ea6 191 < ${GCCDIR}/gcc/gthr-posix.h > gthr-default.h
6fecd16f
JS
192
193CLEANFILES+= ${THRHDRS}
194
195.include <bsd.lib.mk>