gcc50/csu: Skip depends step to avoid possible race
[dragonfly.git] / gnu / lib / gcc44 / libstdc++ / Makefile
1 .include "../Makefile.inc"
2
3 .if ${MACHINE_ARCH} == "i386" && !empty(MACHINE_CPU:Mi486)
4 MARCHDIR=       i486
5 .elif ${MACHINE_ARCH} == "x86_64"
6 MARCHDIR=       i486
7 .else
8 MARCHDIR=       ${MACHINE_ARCH}
9 .endif
10
11 SRCDIR= ${GCCDIR}/libstdc++-v3
12
13 glibcxx_srcdir= ${SRCDIR}
14
15 .PATH:  ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io
16 .PATH:  ${SRCDIR}/config/locale/dragonfly
17 .PATH:  ${SRCDIR}/config/locale/generic ${SRCDIR}
18 .PATH:  ${GCCDIR}/gcc ${GCCDIR}/libiberty
19
20 #SUBDIR=        doc
21
22 LIB=            stdc++
23 SHLIB_MAJOR=    9
24
25 CFLAGS+=        -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
26 CFLAGS+=        -I${GCCDIR}/gcc -I${GCCDIR}/include
27 CXXFLAGS+=      -fno-implicit-templates -ffunction-sections -fdata-sections \
28                 -Wno-deprecated
29
30 FLAGS_GROUPS=   c++0x
31 c++0x_FLAGS=    -std=gnu++0x
32 c++0x_FLAGS_FILES= \
33         functexcept.cc system_error.cc mutex.cc condition_variable.cc \
34         hash_c++0x.cc hashtable_c++0x.cc limits_c++0x.cc atomic.cc \
35         string-inst.cc wstring-inst.cc chrono.cc thread.cc
36
37 LDADD+=         -lm
38 DPADD+=         ${LIBM}
39
40 .include "../libsupc++/Makefile.src"
41
42 # libstdc++ sources (libstdc++/src/Makefile.in, do not reorder)
43 SRCS+=  \
44         atomic.cc \
45         bitmap_allocator.cc \
46         pool_allocator.cc \
47         mt_allocator.cc \
48         codecvt.cc \
49         compatibility.cc \
50         complex_io.cc \
51         ctype.cc \
52         debug.cc \
53         functexcept.cc \
54         hash.cc \
55         hash_c++0x.cc \
56         globals_io.cc \
57         hashtable.cc \
58         hashtable_c++0x.cc \
59         ios.cc \
60         ios_failure.cc \
61         ios_init.cc \
62         ios_locale.cc \
63         limits.cc \
64         limits_c++0x.cc \
65         list.cc \
66         debug_list.cc \
67         locale.cc \
68         locale_init.cc \
69         locale_facets.cc \
70         localename.cc \
71         math_stubs_float.cc \
72         math_stubs_long_double.cc \
73         stdexcept.cc \
74         strstream.cc \
75         system_error.cc \
76         tree.cc \
77         allocator-inst.cc \
78         concept-inst.cc \
79         fstream-inst.cc \
80         ext-inst.cc \
81         ios-inst.cc \
82         iostream-inst.cc \
83         istream-inst.cc \
84         istream.cc \
85         locale-inst.cc \
86         misc-inst.cc \
87         ostream-inst.cc \
88         sstream-inst.cc \
89         streambuf-inst.cc \
90         streambuf.cc \
91         string-inst.cc \
92         valarray-inst.cc \
93         wlocale-inst.cc \
94         wstring-inst.cc \
95         mutex.cc \
96         condition_variable.cc \
97         chrono.cc \
98         thread.cc \
99         ${host_sources} \
100         ${host_sources_extra}
101
102 host_sources = \
103         atomicity.cc \
104         codecvt_members.cc \
105         collate_members.cc \
106         ctype_members.cc \
107         messages_members.cc \
108         monetary_members.cc \
109         numeric_members.cc \
110         time_members.cc 
111
112 # Here we change the file to stdio and c++locale to c_locale
113 host_sources_extra = \
114         basic_file_stdio.cc c_locale.cc
115
116 atomicity.cc:
117         echo '#include <ext/atomicity.h>' > ${.TARGET}
118
119 CLEANFILES+=    atomicity.cc
120
121 SRCS+=  gstdint.h bits/compatibility.h
122
123 gstdint.h:
124         echo "#include <stdint.h>" > ${.TARGET}
125
126 bits/compatibility.h: config/abi/compatibility.h
127         mkdir -p ${.TARGET:H}
128         cp ${.ALLSRC} ${.TARGET}
129
130 CLEANFILES+=    gstdint.h bits/compatibility.h
131 CLEANDIRS+=     bits
132
133
134 strstream.cc:   ${SRCDIR}/src/strstream.cc
135         sed -e 's,^#include <strstream>,#include <backward/strstream>,g' \
136             < ${.ALLSRC} > ${.TARGET}
137
138 CLEANFILES+=    strstream.cc
139
140
141 HD=     ${INCLUDEDIR}/c++/${GCCPOINTVER}
142 .for i in std bits backward ext tr1 tr1_impl c_base c_compatibility debug \
143         c_base_headers_extra
144
145 INCSGROUPS+=    $i_headers
146 $i_headersDIR=  ${HD}/${$i_builddir}
147 .endfor
148
149 INCSGROUPS+=    TARGETHDRS THRHDRS
150
151 std_srcdir = ${glibcxx_srcdir}/include/std
152 std_builddir = .
153 std_headers = \
154         ${std_srcdir}/algorithm \
155         ${std_srcdir}/array \
156         ${std_srcdir}/bitset \
157         ${std_srcdir}/c++0x_warning.h \
158         ${std_srcdir}/chrono \
159         ${std_srcdir}/complex \
160         ${std_srcdir}/condition_variable \
161         ${std_srcdir}/deque \
162         ${std_srcdir}/forward_list \
163         ${std_srcdir}/fstream \
164         ${std_srcdir}/functional \
165         ${std_srcdir}/iomanip \
166         ${std_srcdir}/ios \
167         ${std_srcdir}/iosfwd \
168         ${std_srcdir}/iostream \
169         ${std_srcdir}/istream \
170         ${std_srcdir}/iterator \
171         ${std_srcdir}/limits \
172         ${std_srcdir}/list \
173         ${std_srcdir}/locale \
174         ${std_srcdir}/map \
175         ${std_srcdir}/memory \
176         ${std_srcdir}/mutex \
177         ${std_srcdir}/numeric \
178         ${std_srcdir}/ostream \
179         ${std_srcdir}/queue \
180         ${std_srcdir}/random \
181         ${std_srcdir}/ratio \
182         ${std_srcdir}/regex \
183         ${std_srcdir}/set \
184         ${std_srcdir}/sstream \
185         ${std_srcdir}/stack \
186         ${std_srcdir}/stdexcept \
187         ${std_srcdir}/streambuf \
188         ${std_srcdir}/string \
189         ${std_srcdir}/system_error \
190         ${std_srcdir}/thread \
191         ${std_srcdir}/tuple \
192         ${std_srcdir}/type_traits \
193         ${std_srcdir}/unordered_map \
194         ${std_srcdir}/unordered_set \
195         ${std_srcdir}/utility \
196         ${std_srcdir}/valarray \
197         ${std_srcdir}/vector
198
199
200 bits_srcdir = ${glibcxx_srcdir}/include/bits
201 bits_builddir = ./bits
202 bits_headers = \
203         ${bits_srcdir}/algorithmfwd.h \
204         ${bits_srcdir}/allocator.h \
205         ${bits_srcdir}/atomicfwd_c.h \
206         ${bits_srcdir}/atomicfwd_cxx.h \
207         ${bits_srcdir}/atomic_0.h \
208         ${bits_srcdir}/atomic_2.h \
209         ${bits_srcdir}/basic_ios.h \
210         ${bits_srcdir}/basic_ios.tcc \
211         ${bits_srcdir}/basic_string.h \
212         ${bits_srcdir}/basic_string.tcc \
213         ${bits_srcdir}/boost_concept_check.h \
214         ${bits_srcdir}/char_traits.h \
215         ${bits_srcdir}/codecvt.h \
216         ${bits_srcdir}/concept_check.h \
217         ${bits_srcdir}/cpp_type_traits.h \
218         ${bits_srcdir}/deque.tcc \
219         ${bits_srcdir}/forward_list.h \
220         ${bits_srcdir}/forward_list.tcc \
221         ${bits_srcdir}/fstream.tcc \
222         ${bits_srcdir}/functexcept.h \
223         ${bits_srcdir}/functional_hash.h \
224         ${bits_srcdir}/gslice.h \
225         ${bits_srcdir}/gslice_array.h \
226         ${bits_srcdir}/hashtable.h \
227         ${bits_srcdir}/indirect_array.h \
228         ${bits_srcdir}/ios_base.h \
229         ${bits_srcdir}/istream.tcc \
230         ${bits_srcdir}/list.tcc \
231         ${bits_srcdir}/locale_classes.h \
232         ${bits_srcdir}/locale_classes.tcc \
233         ${bits_srcdir}/locale_facets.h \
234         ${bits_srcdir}/locale_facets.tcc \
235         ${bits_srcdir}/locale_facets_nonio.h \
236         ${bits_srcdir}/locale_facets_nonio.tcc \
237         ${bits_srcdir}/localefwd.h \
238         ${bits_srcdir}/mask_array.h \
239         ${bits_srcdir}/move.h \
240         ${bits_srcdir}/ostream.tcc \
241         ${bits_srcdir}/ostream_insert.h \
242         ${bits_srcdir}/postypes.h \
243         ${bits_srcdir}/stream_iterator.h \
244         ${bits_srcdir}/streambuf_iterator.h \
245         ${bits_srcdir}/shared_ptr.h \
246         ${bits_srcdir}/slice_array.h \
247         ${bits_srcdir}/sstream.tcc \
248         ${bits_srcdir}/stl_algo.h \
249         ${bits_srcdir}/stl_algobase.h \
250         ${bits_srcdir}/stl_bvector.h \
251         ${bits_srcdir}/stl_construct.h \
252         ${bits_srcdir}/stl_deque.h \
253         ${bits_srcdir}/stl_function.h \
254         ${bits_srcdir}/stl_heap.h \
255         ${bits_srcdir}/stl_iterator.h \
256         ${bits_srcdir}/stl_iterator_base_funcs.h \
257         ${bits_srcdir}/stl_iterator_base_types.h \
258         ${bits_srcdir}/stl_list.h \
259         ${bits_srcdir}/stl_map.h \
260         ${bits_srcdir}/stl_multimap.h \
261         ${bits_srcdir}/stl_multiset.h \
262         ${bits_srcdir}/stl_numeric.h \
263         ${bits_srcdir}/stl_pair.h \
264         ${bits_srcdir}/stl_queue.h \
265         ${bits_srcdir}/stl_raw_storage_iter.h \
266         ${bits_srcdir}/stl_relops.h \
267         ${bits_srcdir}/stl_set.h \
268         ${bits_srcdir}/stl_stack.h \
269         ${bits_srcdir}/stl_tempbuf.h \
270         ${bits_srcdir}/stl_tree.h \
271         ${bits_srcdir}/stl_uninitialized.h \
272         ${bits_srcdir}/stl_vector.h \
273         ${bits_srcdir}/streambuf.tcc \
274         ${bits_srcdir}/stringfwd.h \
275         ${bits_srcdir}/unique_ptr.h \
276         ${bits_srcdir}/valarray_array.h \
277         ${bits_srcdir}/valarray_array.tcc \
278         ${bits_srcdir}/valarray_before.h \
279         ${bits_srcdir}/valarray_after.h \
280         ${bits_srcdir}/vector.tcc
281
282
283 backward_srcdir = ${glibcxx_srcdir}/include/backward
284 backward_builddir = ./backward
285 backward_headers = \
286         ${backward_srcdir}/auto_ptr.h \
287         ${backward_srcdir}/backward_warning.h \
288         ${backward_srcdir}/binders.h \
289         ${backward_srcdir}/hash_map \
290         ${backward_srcdir}/hash_set \
291         ${backward_srcdir}/hash_fun.h \
292         ${backward_srcdir}/hashtable.h \
293         ${backward_srcdir}/strstream
294
295
296 ext_srcdir = ${glibcxx_srcdir}/include/ext
297 ext_builddir = ./ext
298 ext_headers = \
299         ${ext_srcdir}/algorithm \
300         ${ext_srcdir}/atomicity.h \
301         ${ext_srcdir}/array_allocator.h \
302         ${ext_srcdir}/bitmap_allocator.h \
303         ${ext_srcdir}/cast.h \
304         ${ext_srcdir}/codecvt_specializations.h \
305         ${ext_srcdir}/concurrence.h \
306         ${ext_srcdir}/debug_allocator.h \
307         ${ext_srcdir}/enc_filebuf.h \
308         ${ext_srcdir}/extptr_allocator.h \
309         ${ext_srcdir}/stdio_filebuf.h \
310         ${ext_srcdir}/stdio_sync_filebuf.h \
311         ${ext_srcdir}/functional \
312         ${ext_srcdir}/iterator \
313         ${ext_srcdir}/malloc_allocator.h \
314         ${ext_srcdir}/memory \
315         ${ext_srcdir}/mt_allocator.h \
316         ${ext_srcdir}/new_allocator.h \
317         ${ext_srcdir}/numeric \
318         ${ext_srcdir}/numeric_traits.h \
319         ${ext_srcdir}/pod_char_traits.h \
320         ${ext_srcdir}/pointer.h \
321         ${ext_srcdir}/pool_allocator.h \
322         ${ext_srcdir}/rb_tree \
323         ${ext_srcdir}/rope \
324         ${ext_srcdir}/ropeimpl.h \
325         ${ext_srcdir}/slist \
326         ${ext_srcdir}/string_conversions.h \
327         ${ext_srcdir}/throw_allocator.h \
328         ${ext_srcdir}/typelist.h \
329         ${ext_srcdir}/type_traits.h \
330         ${ext_srcdir}/rc_string_base.h \
331         ${ext_srcdir}/sso_string_base.h \
332         ${ext_srcdir}/vstring.h \
333         ${ext_srcdir}/vstring.tcc \
334         ${ext_srcdir}/vstring_fwd.h \
335         ${ext_srcdir}/vstring_util.h \
336         ${ext_compat_headers}
337 ext_compat_headers = \
338         ${backward_srcdir}/hash_set \
339         ${backward_srcdir}/hash_map
340
341
342 tr1_srcdir = ${glibcxx_srcdir}/include/tr1
343 tr1_builddir = ./tr1
344 tr1_headers = \
345         ${tr1_srcdir}/array \
346         ${tr1_srcdir}/bessel_function.tcc \
347         ${tr1_srcdir}/beta_function.tcc \
348         ${tr1_srcdir}/ccomplex \
349         ${tr1_srcdir}/cctype \
350         ${tr1_srcdir}/cfenv \
351         ${tr1_srcdir}/cfloat \
352         ${tr1_srcdir}/cinttypes \
353         ${tr1_srcdir}/climits \
354         ${tr1_srcdir}/cmath \
355         ${tr1_srcdir}/complex \
356         ${tr1_srcdir}/complex.h \
357         ${tr1_srcdir}/cstdarg \
358         ${tr1_srcdir}/cstdbool \
359         ${tr1_srcdir}/cstdint \
360         ${tr1_srcdir}/cstdio \
361         ${tr1_srcdir}/cstdlib \
362         ${tr1_srcdir}/ctgmath \
363         ${tr1_srcdir}/ctime \
364         ${tr1_srcdir}/ctype.h \
365         ${tr1_srcdir}/cwchar \
366         ${tr1_srcdir}/cwctype \
367         ${tr1_srcdir}/ell_integral.tcc \
368         ${tr1_srcdir}/exp_integral.tcc \
369         ${tr1_srcdir}/fenv.h \
370         ${tr1_srcdir}/float.h \
371         ${tr1_srcdir}/functional \
372         ${tr1_srcdir}/functional_hash.h \
373         ${tr1_srcdir}/gamma.tcc \
374         ${tr1_srcdir}/hypergeometric.tcc \
375         ${tr1_srcdir}/hashtable.h \
376         ${tr1_srcdir}/inttypes.h \
377         ${tr1_srcdir}/limits.h \
378         ${tr1_srcdir}/math.h \
379         ${tr1_srcdir}/memory \
380         ${tr1_srcdir}/modified_bessel_func.tcc \
381         ${tr1_srcdir}/poly_hermite.tcc \
382         ${tr1_srcdir}/poly_laguerre.tcc \
383         ${tr1_srcdir}/legendre_function.tcc \
384         ${tr1_srcdir}/random \
385         ${tr1_srcdir}/regex \
386         ${tr1_srcdir}/riemann_zeta.tcc \
387         ${tr1_srcdir}/shared_ptr.h \
388         ${tr1_srcdir}/special_function_util.h \
389         ${tr1_srcdir}/stdarg.h \
390         ${tr1_srcdir}/stdbool.h \
391         ${tr1_srcdir}/stdint.h \
392         ${tr1_srcdir}/stdio.h \
393         ${tr1_srcdir}/stdlib.h \
394         ${tr1_srcdir}/tgmath.h \
395         ${tr1_srcdir}/tuple \
396         ${tr1_srcdir}/type_traits \
397         ${tr1_srcdir}/unordered_set \
398         ${tr1_srcdir}/unordered_map \
399         ${tr1_srcdir}/utility \
400         ${tr1_srcdir}/wchar.h \
401         ${tr1_srcdir}/wctype.h
402
403
404 tr1_impl_srcdir = ${glibcxx_srcdir}/include/tr1_impl
405 tr1_impl_builddir = ./tr1_impl
406 tr1_impl_headers = \
407         ${tr1_impl_srcdir}/array \
408         ${tr1_impl_srcdir}/boost_sp_counted_base.h \
409         ${tr1_impl_srcdir}/cctype \
410         ${tr1_impl_srcdir}/cfenv \
411         ${tr1_impl_srcdir}/cinttypes \
412         ${tr1_impl_srcdir}/cmath \
413         ${tr1_impl_srcdir}/complex \
414         ${tr1_impl_srcdir}/cstdint \
415         ${tr1_impl_srcdir}/cstdio \
416         ${tr1_impl_srcdir}/cstdlib \
417         ${tr1_impl_srcdir}/cwchar \
418         ${tr1_impl_srcdir}/cwctype \
419         ${tr1_impl_srcdir}/functional \
420         ${tr1_impl_srcdir}/functional_hash.h \
421         ${tr1_impl_srcdir}/hashtable \
422         ${tr1_impl_srcdir}/hashtable_policy.h \
423         ${tr1_impl_srcdir}/random \
424         ${tr1_impl_srcdir}/random.tcc \
425         ${tr1_impl_srcdir}/regex \
426         ${tr1_impl_srcdir}/type_traits \
427         ${tr1_impl_srcdir}/unordered_map \
428         ${tr1_impl_srcdir}/unordered_set \
429         ${tr1_impl_srcdir}/utility
430
431 C_INCLUDE_DIR = ${glibcxx_srcdir}/include/c_global
432 c_base_srcdir = $(C_INCLUDE_DIR)
433 c_base_builddir = .
434 c_base_headers = \
435         ${c_base_srcdir}/cassert \
436         ${c_base_srcdir}/ccomplex \
437         ${c_base_srcdir}/cctype \
438         ${c_base_srcdir}/cerrno \
439         ${c_base_srcdir}/cfenv \
440         ${c_base_srcdir}/cfloat \
441         ${c_base_srcdir}/cinttypes \
442         ${c_base_srcdir}/ciso646 \
443         ${c_base_srcdir}/climits \
444         ${c_base_srcdir}/clocale \
445         ${c_base_srcdir}/cmath \
446         ${c_base_srcdir}/csetjmp \
447         ${c_base_srcdir}/csignal \
448         ${c_base_srcdir}/cstdarg \
449         ${c_base_srcdir}/cstdatomic \
450         ${c_base_srcdir}/cstdbool \
451         ${c_base_srcdir}/cstddef \
452         ${c_base_srcdir}/cstdint \
453         ${c_base_srcdir}/cstdio \
454         ${c_base_srcdir}/cstdlib \
455         ${c_base_srcdir}/cstring \
456         ${c_base_srcdir}/ctgmath \
457         ${c_base_srcdir}/ctime \
458         ${c_base_srcdir}/cwchar \
459         ${c_base_srcdir}/cwctype
460
461 c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility
462 c_compatibility_builddir = .
463 c_compatibility_headers = \
464         ${c_compatibility_srcdir}/complex.h \
465         ${c_compatibility_srcdir}/fenv.h \
466         ${c_compatibility_srcdir}/tgmath.h \
467         ${c_compatibility_srcdir}/stdatomic.h
468
469
470 debug_srcdir = ${glibcxx_srcdir}/include/debug
471 debug_builddir = ./debug
472 debug_headers = \
473         ${debug_srcdir}/bitset \
474         ${debug_srcdir}/debug.h \
475         ${debug_srcdir}/deque \
476         ${debug_srcdir}/formatter.h \
477         ${debug_srcdir}/functions.h \
478         ${debug_srcdir}/list \
479         ${debug_srcdir}/map \
480         ${debug_srcdir}/macros.h \
481         ${debug_srcdir}/map.h \
482         ${debug_srcdir}/multimap.h \
483         ${debug_srcdir}/multiset.h \
484         ${debug_srcdir}/safe_base.h \
485         ${debug_srcdir}/safe_iterator.h \
486         ${debug_srcdir}/safe_iterator.tcc \
487         ${debug_srcdir}/safe_sequence.h \
488         ${debug_srcdir}/set \
489         ${debug_srcdir}/set.h \
490         ${debug_srcdir}/string \
491         ${debug_srcdir}/unordered_map \
492         ${debug_srcdir}/unordered_set \
493         ${debug_srcdir}/vector
494
495
496 c_base_headers_extra_builddir = bits
497 c_base_headers_extra_headers = ${c_base_srcdir}/cmath.tcc
498
499
500 host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
501 host_builddir = ./${host_alias}/bits
502 host_installdir = ${gxx_include_dir}/${host_alias}$(MULTISUBDIR)/bits
503 host_headers = \
504         ${host_srcdir}/ctype_base.h \
505         ${host_srcdir}/ctype_inline.h \
506         ${host_srcdir}/ctype_noninline.h \
507         ${host_srcdir}/os_defines.h \
508         ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \
509         ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h \
510         ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h \
511         ${glibcxx_srcdir}/$(ERROR_CONSTANTS_SRCDIR)/error_constants.h \
512         ${glibcxx_srcdir}/include/precompiled/stdc++.h \
513         ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h \
514         ${glibcxx_srcdir}/include/precompiled/extc++.h
515
516 # c++locale <- c_locale.h
517 TARGETHDRS=     io/basic_file_stdio.h
518 TARGETHDRSNAME_basic_file_stdio.h=      basic_file.h
519 TARGETHDRS+=    allocator/new_allocator_base.h
520 TARGETHDRSNAME_new_allocator_base.h=    c++allocator.h
521 TARGETHDRS+=    io/c_io_stdio.h
522 TARGETHDRSNAME_c_io_stdio.h=            c++io.h
523 TARGETHDRS+=    locale/generic/c_locale.h locale/generic/c++locale_internal.h
524 TARGETHDRSNAME_c_locale.h=              c++locale.h
525 TARGETHDRS+=    locale/generic/messages_members.h
526 TARGETHDRS+=    locale/generic/time_members.h
527
528 TARGETHDRS+=    os/generic/error_constants.h
529 TARGETHDRS+=    os/bsd/dragonfly/ctype_inline.h
530 TARGETHDRS+=    os/bsd/dragonfly/ctype_base.h
531 TARGETHDRS+=    os/bsd/dragonfly/ctype_noninline.h
532 TARGETHDRS+=    os/bsd/dragonfly/os_defines.h
533 TARGETHDRS:=    ${TARGETHDRS:S;^;${SRCDIR}/config/;}
534 TARGETHDRS+=    c++config.h
535 TARGETHDRSDIR=  ${HD}/bits
536
537 MARCHHDRS=      atomic_word.h cxxabi_tweaks.h cpu_defines.h
538
539 .for h in ${MARCHHDRS}
540 .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h})
541 TARGETHDRS+=    ${SRCDIR}/config/cpu/${MARCHDIR}/${h}
542 .else
543 TARGETHDRS+=    ${SRCDIR}/config/cpu/generic/${h}
544 .endif
545 .endfor
546
547 THRHDRS=        gthr.h gthr-single.h gthr-posix.h gthr-default.h
548 THRHDRSDIR=     ${HD}/bits
549
550 gthr.h: ${GCCDIR}/gcc/gthr.h
551         sed -e '/^#pragma/b' \
552             -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCXX_\1/g' \
553             -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
554             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
555             < ${GCCDIR}/gcc/gthr.h > gthr.h
556
557 gthr-single.h: ${GCCDIR}/gcc/gthr-single.h
558         sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
559             -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
560             < ${GCCDIR}/gcc/gthr-single.h > gthr-single.h
561
562 gthr-posix.h: ${GCCDIR}/gcc/gthr-posix.h
563         sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
564             -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
565             -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
566             -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
567             < ${GCCDIR}/gcc/gthr-posix.h > gthr-posix.h
568
569 gthr-default.h: ${GCCDIR}/gcc/gthr-posix.h
570         sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
571             -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
572             -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
573             -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
574             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
575             < ${GCCDIR}/gcc/gthr-posix.h > gthr-default.h
576
577 c++config.h: config.h ${SRCDIR}/include/bits/c++config DATESTAMP
578         date=`cat ${.ALLSRC:M*DATESTAMP}` ; \
579         nsa_version=0 ;\
580         visibility=1 ;\
581         sed -e "s,define __GLIBCXX__, define __GLIBCXX__ $$date," \
582         -e "s,define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION, define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION $$nsa_version," \
583         -e "s,define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY, define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY $$visibility," \
584         < ${.ALLSRC:M*c++config} > ${.TARGET}
585         sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
586             -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
587             -e 's/VERSION/_GLIBCXX_VERSION/g' \
588             -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
589             -e 's/ICONV_CONST/_GLIBCXX_ICONV_CONST/g' \
590             -e '/[      ]_GLIBCXX_LONG_DOUBLE_COMPAT[   ]/d' \
591             < ${.ALLSRC:M*config.h} >> ${.TARGET}
592         echo "" >> ${.TARGET}
593         echo "#endif // _GLIBCXX_CXX_CONFIG_H" >> ${.TARGET}
594
595 CLEANFILES+=    ${THRHDRS} c++config.h
596
597 .include <bsd.lib.mk>