1 # $DragonFly: src/gnu/lib/gcc34/libstdc++/Makefile,v 1.2 2005/04/21 13:42:33 joerg Exp $
3 .include "../Makefile.inc"
5 .if ${MACHINE_ARCH} == "sparc64"
7 .elif ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU} != 'i386'
10 MARCHDIR= ${MACHINE_ARCH}
13 SRCDIR= ${GCCDIR}/libstdc++-v3
14 SUPDIR= ${SRCDIR}/libsupc++
16 .PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io
17 .PATH: ${SRCDIR}/config/locale/generic ${SRCDIR} ${SRCDIR}/std
18 .PATH: ${SUPDIR} ${GCCDIR}/gcc ${GCCDIR}/libiberty
25 CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
26 CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR}/gcc -I${GCCDIR}/include
27 CXXFLAGS+= -I${SRCDIR}/config/cpu/${MARCHDIR}
28 CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \
30 #LDFLAGS+= -Wl,-version-info,4:0:0 -Wl,--version-script=${SRCDIR}/src/linker.map
35 # libstdc++ sources (libstdc++/src/Makefile.in, do not reorder)
36 SRCS+= allocator.cc codecvt.cc complex_io.cc ctype.cc debug.cc debug_list.cc
37 SRCS+= functexcept.cc globals_locale.cc globals_io.cc ios.cc ios_failure.cc
38 SRCS+= ios_init.cc ios_locale.cc limits.cc list.cc locale.cc locale_init.cc
39 SRCS+= locale_facets.cc localename.cc stdexcept.cc strstream.cc tree.cc
40 SRCS+= allocator-inst.cc concept-inst.cc fstream-inst.cc ext-inst.cc
41 SRCS+= io-inst.cc istream-inst.cc locale-inst.cc locale-misc-inst.cc
42 SRCS+= misc-inst.cc ostream-inst.cc sstream-inst.cc streambuf-inst.cc
43 SRCS+= string-inst.cc valarray-inst.cc wlocale-inst.cc
44 SRCS+= basic_file_stdio.cc c_locale.cc
47 SRCS+= codecvt_members.cc collate_members.cc ctype_members.cc
48 SRCS+= messages_members.cc monetary_members.cc numeric_members.cc
49 SRCS+= time_members.cc
52 echo '#include "atomicity.h"' > ${.TARGET}
55 CLEANFILES+= atomicity.cc
58 SRCS+= signbit.c signbitf.c stubs.c
60 # Embedded copy of libsupc++
61 SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc
62 SRCS+= eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc
63 SRCS+= eh_globals.cc eh_personality.cc eh_term_handler.cc eh_terminate.cc
64 SRCS+= eh_throw.cc eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc
65 SRCS+= new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc
66 SRCS+= tinfo2.cc vec.cc vterminate.cc
72 strstream-fixed.cc: ${SRCDIR}/src/strstream.cc
73 sed -e 's,^#include <strstream>,#include <backward/strstream>,g' \
74 < ${SRCDIR}/src/strstream.cc > strstream-fixed.cc
76 CLEANFILES+= strstream-fixed.cc
78 INCSGROUPS= BITSHDRS BKWHDRS DEBUGHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \
81 BITSHDRS= allocator.h atomicity.h basic_ios.h basic_ios.tcc
82 BITSHDRS+= basic_string.h basic_string.tcc boost_concept_check.h
83 BITSHDRS+= char_traits.h codecvt.h concept_check.h
84 BITSHDRS+= concurrence.h cpp_type_traits.h deque.tcc fstream.tcc
85 BITSHDRS+= functexcept.h gslice.h gslice_array.h indirect_array.h
86 BITSHDRS+= ios_base.h istream.tcc list.tcc locale_classes.h
87 BITSHDRS+= locale_facets.h locale_facets.tcc localefwd.h mask_array.h
88 BITSHDRS+= ostream.tcc postypes.h slice_array.h sstream.tcc stl_algo.h
89 BITSHDRS+= stl_algobase.h stl_bvector.h stl_construct.h stl_deque.h
90 BITSHDRS+= stl_function.h stl_heap.h stl_iterator.h
91 BITSHDRS+= stl_iterator_base_funcs.h stl_iterator_base_types.h stl_list.h
92 BITSHDRS+= stl_map.h stl_multimap.h stl_multiset.h stl_numeric.h
93 BITSHDRS+= stl_pair.h stl_queue.h stl_raw_storage_iter.h stl_relops.h
94 BITSHDRS+= stl_set.h stl_stack.h stl_tempbuf.h stl_threads.h stl_tree.h
95 BITSHDRS+= stl_uninitialized.h stl_vector.h stream_iterator.h
96 BITSHDRS+= streambuf.tcc streambuf_iterator.h stringfwd.h type_traits.h
97 BITSHDRS+= valarray_after.h valarray_array.h valarray_array.tcc
98 BITSHDRS+= valarray_before.h vector.tcc
100 BITSHDRS:= ${BITSHDRS:S;^;${SRCDIR}/include/bits/;}
101 BITSHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
103 BKWHDRS= algo.h algobase.h alloc.h backward_warning.h bvector.h
104 BKWHDRS+= complex.h defalloc.h deque.h fstream.h function.h hash_map.h
105 BKWHDRS+= hash_set.h hashtable.h heap.h iomanip.h iostream.h istream.h
106 BKWHDRS+= iterator.h list.h map.h multimap.h multiset.h new.h ostream.h
107 BKWHDRS+= pair.h queue.h rope.h set.h slist.h stack.h stream.h
108 BKWHDRS+= streambuf.h strstream tempbuf.h tree.h vector.h
109 BKWHDRS:= ${BKWHDRS:S;^;${SRCDIR}/include/backward/;}
110 BKWHDRSDIR= ${INCLUDEDIR}/c++/3.4/backward
112 DEBUGHDRS= bitset debug.h deque formatter.h hash_map hash_map.h
113 DEBUGHDRS+= hash_multimap.h hash_multiset.h hash_set hash_set.h list map
114 DEBUGHDRS+= map.h multimap.h multiset.h safe_base.h safe_iterator.h
115 DEBUGHDRS+= safe_iterator.tcc safe_sequence.h set set.h string vector
116 DEBUGHDRS:= ${DEBUGHDRS:S;^;${SRCDIR}/include/debug/;}
117 DEBUGHDRSDIR= ${INCLUDEDIR}/c++/3.4/debug
119 EXTHDRS= algorithm bitmap_allocator.h debug_allocator.h demangle.h
120 EXTHDRS+= enc_filebuf.h functional hash_fun.h hash_map hash_set
121 EXTHDRS+= hashtable.h iterator malloc_allocator.h memory mt_allocator.h
122 EXTHDRS+= new_allocator.h numeric pod_char_traits.h pool_allocator.h
123 EXTHDRS+= rb_tree rope ropeimpl.h slist stdio_filebuf.h
124 EXTHDRS+= stdio_sync_filebuf.h
125 EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;}
126 EXTHDRSDIR= ${INCLUDEDIR}/c++/3.4/ext
128 # This is the common subset of files that all three "C" header models use.
129 BASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h
130 BASEHDRS+= std_ciso646.h std_climits.h std_clocale.h std_cmath.h
131 BASEHDRS+= std_csetjmp.h std_csignal.h std_cstdarg.h std_cstddef.h
132 BASEHDRS+= std_cstdio.h std_cstdlib.h std_cstring.h std_ctime.h
133 BASEHDRS+= std_cwchar.h std_cwctype.h
134 .for h in ${BASEHDRS}
135 BASEHDRSNAME_$h=${h:R:S;^std_;;}
137 BASEHDRS:= ${BASEHDRS:S;^;${SRCDIR}/include/c_std/;}
138 BASEHDRSDIR= ${INCLUDEDIR}/c++/3.4
140 # Some of the different "C" header models need extra files.
141 BASEXHDRS= ${SRCDIR}/include/c_std/cmath.tcc
142 BASEXHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
144 STDHDRS= std_algorithm.h std_bitset.h std_complex.h std_deque.h
145 STDHDRS+= std_fstream.h std_functional.h std_iomanip.h std_ios.h
146 STDHDRS+= std_iosfwd.h std_iostream.h std_istream.h std_iterator.h
147 STDHDRS+= std_limits.h std_list.h std_locale.h std_map.h std_memory.h
148 STDHDRS+= std_numeric.h std_ostream.h std_queue.h std_set.h
149 STDHDRS+= std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h
150 STDHDRS+= std_string.h std_utility.h std_valarray.h std_vector.h
152 STDHDRSNAME_$h=${h:R:S;^std_;;}
154 STDHDRS:= ${STDHDRS:S;^;${SRCDIR}/include/std/;}
155 STDHDRSDIR= ${INCLUDEDIR}/c++/3.4
157 # c++locale <- c_locale.h
158 TARGETHDRS= io/basic_file_stdio.h io/c_io_stdio.h
159 TARGETHDRS+= allocator/new_allocator_base.h
160 TARGETHDRS+= os/bsd/freebsd/ctype_inline.h os/bsd/freebsd/ctype_noninline.h
161 TARGETHDRS+= os/bsd/freebsd/os_defines.h os/bsd/freebsd/ctype_base.h
162 TARGETHDRS+= locale/generic/messages_members.h locale/generic/time_members.h
163 TARGETHDRS+= locale/generic/codecvt_specializations.h
164 TARGETHDRS+= locale/generic/c_locale.h
165 TARGETHDRS:= ${TARGETHDRS:S;^;${SRCDIR}/config/;}
167 TARGETHDRSNAME_c_io_stdio.h= c++io.h
168 TARGETHDRSNAME_new_allocator_base.h= c++allocator.h
169 TARGETHDRSNAME_basic_file_stdio.h= basic_file.h
170 TARGETHDRSNAME_c_locale.h= c++locale.h
171 TARGETHDRS+= ${.CURDIR}/c++config.h
172 TARGETHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
174 MARCHHDRS= atomic_word.h
176 .for h in ${MARCHHDRS}
177 .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h})
178 TARGETHDRS+= ${SRCDIR}/config/cpu/${MARCHDIR}/${h}
180 TARGETHDRS+= ${SRCDIR}/config/cpu/generic/${h}
184 THRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-default.h
185 THRHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
187 gthr.h: ${GCCDIR}/gcc/gthr.h
188 sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \
189 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
190 < ${GCCDIR}/gcc/gthr.h > gthr.h
192 gthr-single.h: ${GCCDIR}/gcc/gthr-single.h
193 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
194 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
195 < ${GCCDIR}/gcc/gthr-single.h > gthr-single.h
197 gthr-posix.h: ${GCCDIR}/gcc/gthr-posix.h
198 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
199 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
200 -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
201 < ${GCCDIR}/gcc/gthr-posix.h > gthr-posix.h
203 gthr-default.h: ${GCCDIR}/gcc/gthr-posix.h
204 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
205 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
206 -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
207 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
208 < ${GCCDIR}/gcc/gthr-posix.h > gthr-default.h
210 CLEANFILES+= ${THRHDRS}
212 .include <bsd.lib.mk>