]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - gnu/lib/libstdc++/Makefile
MFC r239680:
[FreeBSD/stable/9.git] / gnu / lib / libstdc++ / Makefile
1 # $FreeBSD$
2
3 GCCVER= 4.2
4 GCCDIR= ${.CURDIR}/../../../contrib/gcc
5 GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
6 SRCDIR= ${.CURDIR}/../../../contrib/libstdc++
7 SUPDIR= ${SRCDIR}/libsupc++
8
9 .PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \
10        ${SRCDIR}/config/locale/darwin ${SRCDIR}/config/locale/generic \
11        ${SRCDIR}/include ${SUPDIR} ${GCCDIR} ${GCCLIB}/libiberty
12
13 LIB=            stdc++
14 SHLIB_MAJOR=    6
15
16 CFLAGS+=        -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
17 .if ${MACHINE_CPUARCH} == "arm"
18 CFLAGS+=        -D_GLIBCXX_SJLJ_EXCEPTIONS=1
19 .endif
20 CFLAGS+=        -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
21 CFLAGS+=        -I${GCCLIB}/include -I${SRCDIR}/include -I.
22 CFLAGS+=        -frandom-seed=RepeatabilityConsideredGood
23 CXXFLAGS+=      -fno-implicit-templates -ffunction-sections -fdata-sections \
24                 -Wno-deprecated
25 CXXFLAGS:=      ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
26 PO_CXXFLAGS=    ${CXXFLAGS:N-ffunction-sections}
27
28 DPADD=          ${LIBM}
29 LDADD=          -lm  -Wl,-f,libsupc++.so.1
30
31 # libstdc++ sources
32 SRCS+=  bitmap_allocator.cc pool_allocator.cc \
33         mt_allocator.cc codecvt.cc compatibility.cc complex_io.cc \
34         ctype.cc debug.cc debug_list.cc functexcept.cc globals_io.cc \
35         ios.cc ios_failure.cc ios_init.cc ios_locale.cc limits.cc \
36         list.cc locale.cc locale_init.cc locale_facets.cc \
37         localename.cc stdexcept.cc strstream.cc tree.cc \
38         allocator-inst.cc concept-inst.cc fstream-inst.cc ext-inst.cc \
39         ios-inst.cc iostream-inst.cc istream-inst.cc istream.cc \
40         locale-inst.cc misc-inst.cc ostream-inst.cc sstream-inst.cc \
41         streambuf-inst.cc streambuf.cc string-inst.cc valarray-inst.cc \
42         wlocale-inst.cc wstring-inst.cc atomicity.cc \
43         codecvt_members.cc collate_members.cc ctype_members.cc \
44         messages_members.cc monetary_members.cc numeric_members.cc \
45         time_members.cc basic_file_stdio.cc c_locale.cc \
46 #       compatibility-ldbl.cc
47
48 # target sources
49 SRCS+=  atomicity.cc codecvt_members.cc collate_members.cc ctype_members.cc \
50         messages_members.cc monetary_members.cc numeric_members.cc \
51         time_members.cc
52
53 # target sources extra
54 SRCS+=  basic_file_stdio.cc c_locale.cc
55
56 # C parts of math
57 SRCS+=  stubs.c
58
59 # Embedded copy of libsupc++
60 SRCS+=  del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
61         eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \
62         eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \
63         eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \
64         new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \
65         vec.cc vterminate.cc
66
67 # from libiberty:
68 SRCS+=  cp-demangle.c
69
70 # MD headers location
71 .if ${MACHINE_CPUARCH} == "sparc64"
72 MARCHDIR=       sparc
73 .elif ${MACHINE_CPUARCH} == "i386" && ${MACHINE_CPU} != 'i386'
74 MARCHDIR=       i486
75 .elif ${MACHINE_CPUARCH} == "amd64"
76 MARCHDIR=       i486
77 .else
78 MARCHDIR=       ${MACHINE_CPUARCH}
79 .endif
80
81 .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h)
82 ATOMICITY_H=    ${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h
83 .else
84 ATOMICITY_H=    ${SRCDIR}/config/cpu/generic/atomicity_mutex/atomicity.h
85 .endif
86
87 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
88 .if exists(${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h)
89 ATOMICITY_H=    ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h
90 .endif
91 .endif
92
93 atomicity.cc:   ${ATOMICITY_H}
94         ln -sf ${.ALLSRC} ${.TARGET}
95 CLEANFILES+=    atomicity.cc
96
97 INCSGROUPS=     BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \
98                 TARGETHDRS THRHDRS DEBUGHDRS TR1HDRS PBHDRS0 PBHDRS1
99 CXXINCLUDEDIR=  ${INCLUDEDIR}/c++/${GCCVER}
100
101 STDHDRS=        std_algorithm.h std_bitset.h std_complex.h std_deque.h \
102                 std_fstream.h std_functional.h std_iomanip.h std_ios.h \
103                 std_iosfwd.h std_iostream.h std_istream.h std_iterator.h \
104                 std_limits.h std_list.h std_locale.h std_map.h std_memory.h \
105                 std_numeric.h std_ostream.h std_queue.h std_set.h \
106                 std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h \
107                 std_string.h std_utility.h std_valarray.h std_vector.h
108 .for h in ${STDHDRS}
109 STDHDRSNAME_$h=${h:R:S;^std_;;}
110 .endfor
111 STDHDRS:=       ${STDHDRS:S;^;${SRCDIR}/include/std/;}
112 STDHDRSDIR=     ${CXXINCLUDEDIR}
113
114 BITSHDRS=       allocator.h basic_ios.h basic_ios.tcc basic_string.h \
115                 basic_string.tcc boost_concept_check.h char_traits.h codecvt.h \
116                 concept_check.h cpp_type_traits.h deque.tcc fstream.tcc \
117                 functexcept.h gslice.h gslice_array.h indirect_array.h \
118                 ios_base.h istream.tcc list.tcc locale_classes.h \
119                 locale_facets.h locale_facets.tcc localefwd.h mask_array.h \
120                 ostream.tcc ostream_insert.h postypes.h stream_iterator.h \
121                 streambuf_iterator.h slice_array.h sstream.tcc stl_algo.h \
122                 stl_algobase.h stl_bvector.h stl_construct.h stl_deque.h \
123                 stl_function.h stl_heap.h stl_iterator.h \
124                 stl_iterator_base_funcs.h stl_iterator_base_types.h stl_list.h \
125                 stl_map.h stl_multimap.h stl_multiset.h stl_numeric.h \
126                 stl_pair.h stl_queue.h stl_raw_storage_iter.h stl_relops.h \
127                 stl_set.h stl_stack.h stl_tempbuf.h stl_tree.h \
128                 stl_uninitialized.h stl_vector.h streambuf.tcc stringfwd.h \
129                 valarray_array.h valarray_array.tcc valarray_before.h \
130                 valarray_after.h vector.tcc
131 BITSHDRS:=      ${BITSHDRS:S;^;${SRCDIR}/include/bits/;}
132 BITSHDRSDIR=    ${CXXINCLUDEDIR}/bits
133
134 BKWHDRS=        complex.h iomanip.h istream.h ostream.h stream.h streambuf.h \
135                 algo.h algobase.h alloc.h bvector.h defalloc.h deque.h \
136                 function.h hash_map.h hash_set.h hashtable.h heap.h iostream.h \
137                 iterator.h list.h map.h multimap.h new.h multiset.h pair.h \
138                 queue.h rope.h set.h slist.h stack.h tempbuf.h tree.h \
139                 vector.h fstream.h strstream backward_warning.h
140 BKWHDRS:=       ${BKWHDRS:S;^;${SRCDIR}/include/backward/;}
141 BKWHDRSDIR=     ${CXXINCLUDEDIR}/backward
142
143 EXTHDRS=        algorithm atomicity.h array_allocator.h bitmap_allocator.h \
144                 codecvt_specializations.h concurrence.h debug_allocator.h \
145                 stdio_filebuf.h stdio_sync_filebuf.h functional \
146                 hash_map hash_set hash_fun.h hashtable.h iterator \
147                 malloc_allocator.h memory mt_allocator.h new_allocator.h \
148                 numeric numeric_traits.h pod_char_traits.h pool_allocator.h \
149                 rb_tree rope ropeimpl.h slist throw_allocator.h typelist.h \
150                 type_traits.h rc_string_base.h sso_string_base.h vstring.h \
151                 vstring.tcc vstring_fwd.h vstring_util.h
152
153 EXTHDRS:=       ${EXTHDRS:S;^;${SRCDIR}/include/ext/;}
154 EXTHDRSDIR=     ${CXXINCLUDEDIR}/ext
155
156 TR1HDRS=        array bind_repeat.h bind_iterate.h boost_shared_ptr.h cctype \
157                 cfenv cfloat cinttypes climits cmath common.h complex cstdarg \
158                 cstdbool cstdint cstdio cstdlib ctgmath ctime ctype.h cwchar \
159                 cwctype fenv.h float.h functional functional_hash.h \
160                 functional_iterate.h hashtable hashtable_policy.h inttypes.h \
161                 limits.h math.h memory mu_iterate.h random random.tcc \
162                 ref_fwd.h ref_wrap_iterate.h repeat.h stdarg.h stdbool.h \
163                 stdint.h stdio.h stdlib.h tgmath.h tuple tuple_defs.h \
164                 tuple_iterate.h type_traits type_traits_fwd.h unordered_set \
165                 unordered_map utility wchar.h wctype.h
166
167 TR1HDRS:=       ${TR1HDRS:S;^;${SRCDIR}/include/tr1/;}
168 TR1HDRSDIR=     ${CXXINCLUDEDIR}/tr1
169
170 # This is the common subset of files that all three "C" header models use.
171 BASEHDRS=       std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h \
172                 std_ciso646.h std_climits.h std_clocale.h std_cmath.h \
173                 std_csetjmp.h std_csignal.h std_cstdarg.h std_cstddef.h \
174                 std_cstdio.h std_cstdlib.h std_cstring.h std_ctime.h \
175                 std_cwchar.h std_cwctype.h
176 .for h in ${BASEHDRS}
177 BASEHDRSNAME_$h=${h:R:S;^std_;;}
178 .endfor
179 BASEHDRS:=      ${BASEHDRS:S;^;${SRCDIR}/include/c_std/;}
180 BASEHDRSDIR=    ${CXXINCLUDEDIR}
181
182 # Some of the different "C" header models need extra files.
183 BASEXHDRS=      ${SRCDIR}/include/c_std/cmath.tcc
184 BASEXHDRSDIR=   ${CXXINCLUDEDIR}/bits
185
186 DEBUGHDRS=      bitset debug.h deque formatter.h functions.h hash_map \
187                 hash_map.h hash_multimap.h hash_multiset.h hash_set hash_set.h \
188                 list macros.h map map.h multimap.h multiset.h safe_base.h \
189                 safe_iterator.h safe_iterator.tcc safe_sequence.h set set.h \
190                 string vector
191 DEBUGHDRS:=     ${DEBUGHDRS:S;^;${SRCDIR}/include/debug/;}
192 DEBUGHDRSDIR=   ${CXXINCLUDEDIR}/debug
193
194 # Not installed, but kept here for completeness
195 COMPATHDRS=     assert.h ctype.h errno.h float.h iso646.h limits.h locale.h \
196                 math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h \
197                 string.h time.h wchar.h wctype.h
198 COMPATHDRS:=    ${COMPATHDRS:S;^;${SRCDIR}/include/debug/;}
199 COMPATHDRSDIR=  ${CXXINCLUDEDIR}/c_compatibility
200
201 PBHDRS0 = \
202         assoc_container.hpp \
203         exception.hpp \
204         hash_policy.hpp \
205         list_update_policy.hpp \
206         priority_queue.hpp \
207         tag_and_trait.hpp \
208         tree_policy.hpp \
209         trie_policy.hpp
210 PBHDRS0:=       ${PBHDRS0:S;^;${SRCDIR}/include/ext/pb_ds/;}
211 PBHDRS0DIR=     ${CXXINCLUDEDIR}/ext/pb_ds
212
213 PBHDRS1 = \
214         basic_types.hpp \
215         cond_dealtor.hpp \
216         constructors_destructor_fn_imps.hpp \
217         container_base_dispatch.hpp \
218         map_debug_base.hpp \
219         priority_queue_base_dispatch.hpp \
220         standard_policies.hpp \
221         tree_trace_base.hpp \
222         type_utils.hpp \
223         types_traits.hpp
224 PBHDRS1:=       ${PBHDRS1:S;^;${SRCDIR}/include/ext/pb_ds/detail/;}
225 PBHDRS1DIR=     ${CXXINCLUDEDIR}/ext/pb_ds/detail
226
227 PBHDRS+= \
228         basic_tree_policy/basic_tree_policy_base.hpp \
229         basic_tree_policy/null_node_metadata.hpp \
230         basic_tree_policy/traits.hpp \
231         basic_types.hpp \
232         binary_heap_/binary_heap_.hpp \
233         binary_heap_/const_iterator.hpp \
234         binary_heap_/const_point_iterator.hpp \
235         binary_heap_/constructors_destructor_fn_imps.hpp \
236         binary_heap_/debug_fn_imps.hpp \
237         binary_heap_/entry_cmp.hpp \
238         binary_heap_/entry_pred.hpp \
239         binary_heap_/erase_fn_imps.hpp \
240         binary_heap_/find_fn_imps.hpp \
241         binary_heap_/info_fn_imps.hpp \
242         binary_heap_/insert_fn_imps.hpp \
243         binary_heap_/iterators_fn_imps.hpp \
244         binary_heap_/policy_access_fn_imps.hpp \
245         binary_heap_/resize_policy.hpp \
246         binary_heap_/split_join_fn_imps.hpp \
247         binary_heap_/trace_fn_imps.hpp \
248         binomial_heap_base_/binomial_heap_base_.hpp \
249         binomial_heap_base_/constructors_destructor_fn_imps.hpp \
250         binomial_heap_base_/debug_fn_imps.hpp \
251         binomial_heap_base_/erase_fn_imps.hpp \
252         binomial_heap_base_/find_fn_imps.hpp \
253         binomial_heap_base_/insert_fn_imps.hpp \
254         binomial_heap_base_/split_join_fn_imps.hpp \
255         binomial_heap_/binomial_heap_.hpp \
256         binomial_heap_/constructors_destructor_fn_imps.hpp \
257         binomial_heap_/debug_fn_imps.hpp \
258         bin_search_tree_/bin_search_tree_.hpp \
259         bin_search_tree_/cond_dtor_entry_dealtor.hpp \
260         bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
261
262 PBHDRS+= \
263         bin_search_tree_/constructors_destructor_fn_imps.hpp \
264         bin_search_tree_/debug_fn_imps.hpp \
265         bin_search_tree_/erase_fn_imps.hpp \
266         bin_search_tree_/find_fn_imps.hpp \
267         bin_search_tree_/info_fn_imps.hpp \
268         bin_search_tree_/insert_fn_imps.hpp \
269         bin_search_tree_/iterators_fn_imps.hpp \
270         bin_search_tree_/node_iterators.hpp \
271         bin_search_tree_/point_iterators.hpp \
272         bin_search_tree_/policy_access_fn_imps.hpp \
273         bin_search_tree_/r_erase_fn_imps.hpp \
274         bin_search_tree_/rotate_fn_imps.hpp \
275         bin_search_tree_/split_join_fn_imps.hpp \
276         bin_search_tree_/traits.hpp \
277         cc_hash_table_map_/cc_ht_map_.hpp \
278         cc_hash_table_map_/cmp_fn_imps.hpp \
279         cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp \
280         cc_hash_table_map_/constructor_destructor_fn_imps.hpp \
281         cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
282         cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp \
283         cc_hash_table_map_/debug_fn_imps.hpp \
284         cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp \
285         cc_hash_table_map_/debug_store_hash_fn_imps.hpp \
286         cc_hash_table_map_/entry_list_fn_imps.hpp \
287         cc_hash_table_map_/erase_fn_imps.hpp \
288         cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp \
289         cc_hash_table_map_/erase_store_hash_fn_imps.hpp \
290         cc_hash_table_map_/find_fn_imps.hpp \
291         cc_hash_table_map_/find_store_hash_fn_imps.hpp \
292         cc_hash_table_map_/info_fn_imps.hpp \
293         cc_hash_table_map_/insert_fn_imps.hpp \
294         cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp \
295         cc_hash_table_map_/insert_store_hash_fn_imps.hpp \
296         cc_hash_table_map_/iterators_fn_imps.hpp \
297         cc_hash_table_map_/policy_access_fn_imps.hpp \
298         cc_hash_table_map_/resize_fn_imps.hpp \
299         cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp \
300         cc_hash_table_map_/resize_store_hash_fn_imps.hpp \
301         cc_hash_table_map_/size_fn_imps.hpp \
302         cc_hash_table_map_/standard_policies.hpp
303
304 PBHDRS+= \
305         cc_hash_table_map_/trace_fn_imps.hpp \
306         cond_dealtor.hpp \
307         constructors_destructor_fn_imps.hpp \
308         container_base_dispatch.hpp \
309         eq_fn/eq_by_less.hpp \
310         eq_fn/hash_eq_fn.hpp \
311         gp_hash_table_map_/constructor_destructor_fn_imps.hpp \
312         gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp \
313         gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp \
314         gp_hash_table_map_/debug_fn_imps.hpp \
315         gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp \
316         gp_hash_table_map_/debug_store_hash_fn_imps.hpp \
317         gp_hash_table_map_/erase_fn_imps.hpp \
318         gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp \
319         gp_hash_table_map_/erase_store_hash_fn_imps.hpp \
320         gp_hash_table_map_/find_fn_imps.hpp \
321         gp_hash_table_map_/find_no_store_hash_fn_imps.hpp \
322         gp_hash_table_map_/find_store_hash_fn_imps.hpp \
323         gp_hash_table_map_/gp_ht_map_.hpp \
324         gp_hash_table_map_/info_fn_imps.hpp \
325         gp_hash_table_map_/insert_fn_imps.hpp \
326         gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp \
327         gp_hash_table_map_/insert_store_hash_fn_imps.hpp \
328         gp_hash_table_map_/iterator_fn_imps.hpp \
329         gp_hash_table_map_/policy_access_fn_imps.hpp \
330         gp_hash_table_map_/resize_fn_imps.hpp \
331         gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp \
332         gp_hash_table_map_/resize_store_hash_fn_imps.hpp \
333         gp_hash_table_map_/standard_policies.hpp \
334         gp_hash_table_map_/trace_fn_imps.hpp \
335         hash_fn/direct_mask_range_hashing_imp.hpp \
336         hash_fn/direct_mod_range_hashing_imp.hpp \
337         hash_fn/linear_probe_fn_imp.hpp \
338         hash_fn/mask_based_range_hashing.hpp \
339         hash_fn/mod_based_range_hashing.hpp \
340         hash_fn/probe_fn_base.hpp \
341         hash_fn/quadratic_probe_fn_imp.hpp \
342         hash_fn/ranged_hash_fn.hpp \
343         hash_fn/ranged_probe_fn.hpp
344
345 PBHDRS+= \
346         hash_fn/sample_probe_fn.hpp \
347         hash_fn/sample_ranged_hash_fn.hpp \
348         hash_fn/sample_ranged_probe_fn.hpp \
349         hash_fn/sample_range_hashing.hpp \
350         left_child_next_sibling_heap_/const_iterator.hpp \
351         left_child_next_sibling_heap_/const_point_iterator.hpp \
352         left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp \
353         left_child_next_sibling_heap_/debug_fn_imps.hpp \
354         left_child_next_sibling_heap_/erase_fn_imps.hpp \
355         left_child_next_sibling_heap_/info_fn_imps.hpp \
356         left_child_next_sibling_heap_/insert_fn_imps.hpp \
357         left_child_next_sibling_heap_/iterators_fn_imps.hpp \
358         left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp \
359         left_child_next_sibling_heap_/node.hpp \
360         left_child_next_sibling_heap_/null_metadata.hpp \
361         left_child_next_sibling_heap_/policy_access_fn_imps.hpp \
362         left_child_next_sibling_heap_/trace_fn_imps.hpp \
363         list_update_map_/constructor_destructor_fn_imps.hpp \
364         list_update_map_/debug_fn_imps.hpp \
365         list_update_map_/entry_metadata_base.hpp \
366         list_update_map_/erase_fn_imps.hpp \
367         list_update_map_/find_fn_imps.hpp \
368         list_update_map_/info_fn_imps.hpp \
369         list_update_map_/insert_fn_imps.hpp \
370         list_update_map_/iterators_fn_imps.hpp \
371         list_update_map_/lu_map_.hpp \
372         list_update_map_/trace_fn_imps.hpp \
373         list_update_policy/counter_lu_metadata.hpp \
374         list_update_policy/counter_lu_policy_imp.hpp \
375         list_update_policy/mtf_lu_policy_imp.hpp \
376         list_update_policy/sample_update_policy.hpp \
377         map_debug_base.hpp \
378         ov_tree_map_/cond_dtor.hpp \
379         ov_tree_map_/constructors_destructor_fn_imps.hpp \
380         ov_tree_map_/debug_fn_imps.hpp \
381         ov_tree_map_/erase_fn_imps.hpp \
382         ov_tree_map_/info_fn_imps.hpp \
383         ov_tree_map_/insert_fn_imps.hpp \
384         ov_tree_map_/iterators_fn_imps.hpp \
385         ov_tree_map_/node_iterators.hpp \
386         ov_tree_map_/ov_tree_map_.hpp
387
388 PBHDRS+= \
389         ov_tree_map_/policy_access_fn_imps.hpp \
390         ov_tree_map_/split_join_fn_imps.hpp \
391         ov_tree_map_/traits.hpp \
392         pairing_heap_/constructors_destructor_fn_imps.hpp \
393         pairing_heap_/debug_fn_imps.hpp \
394         pairing_heap_/erase_fn_imps.hpp \
395         pairing_heap_/find_fn_imps.hpp \
396         pairing_heap_/insert_fn_imps.hpp \
397         pairing_heap_/pairing_heap_.hpp \
398         pairing_heap_/split_join_fn_imps.hpp \
399         pat_trie_/child_iterator.hpp \
400         pat_trie_/cond_dtor_entry_dealtor.hpp \
401         pat_trie_/const_child_iterator.hpp \
402         pat_trie_/constructors_destructor_fn_imps.hpp \
403         pat_trie_/debug_fn_imps.hpp \
404         pat_trie_/erase_fn_imps.hpp \
405         pat_trie_/find_fn_imps.hpp \
406         pat_trie_/head.hpp \
407         pat_trie_/info_fn_imps.hpp \
408         pat_trie_/insert_join_fn_imps.hpp \
409         pat_trie_/internal_node.hpp \
410         pat_trie_/iterators_fn_imps.hpp \
411         pat_trie_/leaf.hpp \
412         pat_trie_/node_base.hpp \
413         pat_trie_/node_iterators.hpp \
414         pat_trie_/node_metadata_base.hpp \
415         pat_trie_/pat_trie_.hpp \
416         pat_trie_/point_iterators.hpp \
417         pat_trie_/policy_access_fn_imps.hpp \
418         pat_trie_/r_erase_fn_imps.hpp \
419         pat_trie_/rotate_fn_imps.hpp \
420         pat_trie_/split_fn_imps.hpp \
421         pat_trie_/split_join_branch_bag.hpp \
422         pat_trie_/synth_e_access_traits.hpp \
423         pat_trie_/trace_fn_imps.hpp \
424         pat_trie_/traits.hpp \
425         pat_trie_/update_fn_imps.hpp \
426         priority_queue_base_dispatch.hpp \
427         rb_tree_map_/constructors_destructor_fn_imps.hpp \
428         rb_tree_map_/debug_fn_imps.hpp
429
430 PBHDRS+= \
431         rb_tree_map_/erase_fn_imps.hpp \
432         rb_tree_map_/find_fn_imps.hpp \
433         rb_tree_map_/info_fn_imps.hpp \
434         rb_tree_map_/insert_fn_imps.hpp \
435         rb_tree_map_/node.hpp \
436         rb_tree_map_/rb_tree_.hpp \
437         rb_tree_map_/split_join_fn_imps.hpp \
438         rb_tree_map_/traits.hpp \
439         rc_binomial_heap_/constructors_destructor_fn_imps.hpp \
440         rc_binomial_heap_/debug_fn_imps.hpp \
441         rc_binomial_heap_/erase_fn_imps.hpp \
442         rc_binomial_heap_/insert_fn_imps.hpp \
443         rc_binomial_heap_/rc_binomial_heap_.hpp \
444         rc_binomial_heap_/rc.hpp \
445         rc_binomial_heap_/split_join_fn_imps.hpp \
446         rc_binomial_heap_/trace_fn_imps.hpp \
447         resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp \
448         resize_policy/hash_exponential_size_policy_imp.hpp \
449         resize_policy/hash_load_check_resize_trigger_imp.hpp \
450         resize_policy/hash_load_check_resize_trigger_size_base.hpp \
451         resize_policy/hash_prime_size_policy_imp.hpp \
452         resize_policy/hash_standard_resize_policy_imp.hpp \
453         resize_policy/sample_resize_policy.hpp \
454         resize_policy/sample_resize_trigger.hpp \
455         resize_policy/sample_size_policy.hpp \
456         splay_tree_/constructors_destructor_fn_imps.hpp \
457         splay_tree_/debug_fn_imps.hpp \
458         splay_tree_/erase_fn_imps.hpp \
459         splay_tree_/find_fn_imps.hpp \
460         splay_tree_/info_fn_imps.hpp \
461         splay_tree_/insert_fn_imps.hpp \
462         splay_tree_/node.hpp \
463         splay_tree_/splay_fn_imps.hpp \
464         splay_tree_/splay_tree_.hpp \
465         splay_tree_/split_join_fn_imps.hpp \
466         splay_tree_/traits.hpp \
467         standard_policies.hpp \
468         thin_heap_/constructors_destructor_fn_imps.hpp \
469         thin_heap_/debug_fn_imps.hpp \
470         thin_heap_/erase_fn_imps.hpp
471
472 PBHDRS+= \
473         thin_heap_/find_fn_imps.hpp \
474         thin_heap_/insert_fn_imps.hpp \
475         thin_heap_/split_join_fn_imps.hpp \
476         thin_heap_/thin_heap_.hpp \
477         thin_heap_/trace_fn_imps.hpp \
478         tree_policy/node_metadata_selector.hpp \
479         tree_policy/null_node_update_imp.hpp \
480         tree_policy/order_statistics_imp.hpp \
481         tree_policy/sample_tree_node_update.hpp \
482         tree_trace_base.hpp \
483         trie_policy/node_metadata_selector.hpp \
484         trie_policy/null_node_update_imp.hpp \
485         trie_policy/order_statistics_imp.hpp \
486         trie_policy/prefix_search_node_update_imp.hpp \
487         trie_policy/sample_trie_e_access_traits.hpp \
488         trie_policy/sample_trie_node_update.hpp \
489         trie_policy/string_trie_e_access_traits_imp.hpp \
490         trie_policy/trie_policy_base.hpp \
491         types_traits.hpp \
492         type_utils.hpp \
493         unordered_iterator/const_iterator.hpp \
494         unordered_iterator/const_point_iterator.hpp \
495         unordered_iterator/iterator.hpp \
496         unordered_iterator/point_iterator.hpp
497
498 PBHDRSDIRS= \
499         pairing_heap_ \
500         splay_tree_ \
501         list_update_map_ \
502         basic_tree_policy \
503         trie_policy \
504         gp_hash_table_map_ \
505         tree_policy \
506         binomial_heap_base_ \
507         resize_policy \
508         bin_search_tree_ \
509         binomial_heap_ \
510         thin_heap_ \
511         pat_trie_ \
512         cc_hash_table_map_ \
513         rc_binomial_heap_ \
514         left_child_next_sibling_heap_ \
515         unordered_iterator \
516         binary_heap_ \
517         ov_tree_map_ \
518         hash_fn \
519         eq_fn \
520         rb_tree_map_ \
521         list_update_policy
522
523 .for D in ${PBHDRSDIRS}
524 PHDRGRP$D:=     ${PBHDRS:M$D/*:S;^;${SRCDIR}/include/ext/pb_ds/detail/;}
525 PHDRGRP$DDIR=   ${CXXINCLUDEDIR}/ext/pb_ds/detail/$D
526 INCSGROUPS+=    PHDRGRP$D
527 .endfor
528
529 TARGETHDRS=     abi/compatibility.h \
530                 allocator/new_allocator_base.h \
531                 io/basic_file_stdio.h \
532                 io/c_io_stdio.h \
533                 locale/generic/c_locale.h \
534                 locale/generic/c++locale_internal.h \
535                 locale/generic/messages_members.h \
536                 locale/generic/time_members.h \
537                 os/bsd/freebsd/ctype_base.h \
538                 os/bsd/freebsd/ctype_inline.h \
539                 os/bsd/freebsd/ctype_noninline.h \
540                 os/bsd/freebsd/os_defines.h
541 TARGETHDRS:=    ${TARGETHDRS:S;^;${SRCDIR}/config/;}
542 TARGETHDRS+=    c++config.h
543 TARGETHDRSNAME_basic_file_stdio.h= basic_file.h
544 TARGETHDRSNAME_c_io_stdio.h= c++io.h
545 TARGETHDRSNAME_c_locale.h= c++locale.h
546 TARGETHDRSNAME_new_allocator_base.h= c++allocator.h
547 TARGETHDRSDIR=  ${CXXINCLUDEDIR}/bits
548
549 MARCHHDRS=      atomic_word.h cpu_defines.h cxxabi_tweaks.h
550 .for h in ${MARCHHDRS}
551 .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h})
552 TARGETHDRS+=    ${SRCDIR}/config/cpu/${MARCHDIR}/${h}
553 .else
554 TARGETHDRS+=    ${SRCDIR}/config/cpu/generic/${h}
555 .endif
556 .endfor
557
558 THRHDRS=        gthr.h gthr-single.h gthr-posix.h gthr-tpf.h gthr-default.h
559 THRHDRSDIR=     ${CXXINCLUDEDIR}/bits
560 uppercase =     [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
561
562 gthr.h: ${GCCDIR}/gthr.h
563         sed -e '/^#pragma/b' \
564             -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
565             -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
566             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
567             < ${.ALLSRC} > ${.TARGET}
568
569 gthr-single.h: ${GCCDIR}/gthr-single.h
570         sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
571             -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
572             < ${.ALLSRC} > ${.TARGET}
573
574 gthr-posix.h: ${GCCDIR}/gthr-posix.h
575         sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
576             -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
577             -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
578             -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
579             < ${.ALLSRC} > ${.TARGET}
580
581 gthr-tpf.h: ${GCCDIR}/gthr-posix.h
582         sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
583             -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
584             -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
585             -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
586             < ${.ALLSRC} > ${.TARGET}
587
588 gthr-default.h: ${GCCDIR}/gthr-posix.h
589         sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
590             -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \
591             -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
592             -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \
593             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
594             < ${.ALLSRC} > ${.TARGET}
595
596 CLEANFILES+=    ${THRHDRS}
597
598 unwind.h: ${GCCDIR}/unwind-generic.h
599         ln -sf ${.ALLSRC} ${.TARGET}
600
601 SRCS+=          unwind.h
602 CLEANFILES+=    unwind.h
603
604 DATESTAMP!=     cat ${GCCDIR}/DATESTAMP
605
606 c++config.h: ${.CURDIR}/config.h ${SRCDIR}/include/bits/c++config
607         sed -e "s/\\(define __GLIBCXX__\\)/\1 ${DATESTAMP}/" \
608             -e 's/\(define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY\)/\1 1/' \
609             -e 's/\(define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION\)/\1 0/' \
610             < ${SRCDIR}/include/bits/c++config > ${.TARGET} && \
611         sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
612             -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
613             -e 's/VERSION/_GLIBCXX_VERSION/g' \
614             -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
615             < ${.CURDIR}/config.h >> ${.TARGET} && \
616         echo "#endif // _CXXCONFIG_" >> ${.TARGET}
617 CLEANFILES+=    c++config.h
618
619 # Symbol versioning.
620
621 VERSION_MAP=    libstdc++.map
622
623 ${VERSION_MAP}: ${SRCDIR}/config/abi/pre/gnu.ver
624         ln -sf ${.ALLSRC} ${.TARGET}
625
626 CLEANFILES+=    ${VERSION_MAP}
627
628 .include <bsd.lib.mk>