1 # $DragonFly: src/gnu/lib/gcc34/libstdc++/Makefile,v 1.6 2005/12/31 17:28:42 corecode 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 wstring-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
51 SRCS+= ctype_noninline.h ctype_base.h os_defines.h
54 echo '#include "atomicity.h"' > ${.TARGET}
57 CLEANFILES+= atomicity.cc
60 SRCS+= signbit.c signbitf.c stubs.c
62 # Embedded copy of libsupc++
63 SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc
64 SRCS+= eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc
65 SRCS+= eh_globals.cc eh_personality.cc eh_term_handler.cc eh_terminate.cc
66 SRCS+= eh_throw.cc eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc
67 SRCS+= new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc
68 SRCS+= tinfo2.cc vec.cc vterminate.cc
74 strstream-fixed.cc: ${SRCDIR}/src/strstream.cc
75 sed -e 's,^#include <strstream>,#include <backward/strstream>,g' \
76 < ${SRCDIR}/src/strstream.cc > strstream-fixed.cc
78 CLEANFILES+= strstream-fixed.cc
80 INCSGROUPS= BITSHDRS BKWHDRS DEBUGHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \
83 BITSHDRS= allocator.h atomicity.h basic_ios.h basic_ios.tcc
84 BITSHDRS+= basic_string.h basic_string.tcc boost_concept_check.h
85 BITSHDRS+= char_traits.h codecvt.h concept_check.h
86 BITSHDRS+= concurrence.h cpp_type_traits.h deque.tcc fstream.tcc
87 BITSHDRS+= functexcept.h gslice.h gslice_array.h indirect_array.h
88 BITSHDRS+= ios_base.h istream.tcc list.tcc locale_classes.h
89 BITSHDRS+= locale_facets.h locale_facets.tcc localefwd.h mask_array.h
90 BITSHDRS+= ostream.tcc postypes.h slice_array.h sstream.tcc stl_algo.h
91 BITSHDRS+= stl_algobase.h stl_bvector.h stl_construct.h stl_deque.h
92 BITSHDRS+= stl_function.h stl_heap.h stl_iterator.h
93 BITSHDRS+= stl_iterator_base_funcs.h stl_iterator_base_types.h stl_list.h
94 BITSHDRS+= stl_map.h stl_multimap.h stl_multiset.h stl_numeric.h
95 BITSHDRS+= stl_pair.h stl_queue.h stl_raw_storage_iter.h stl_relops.h
96 BITSHDRS+= stl_set.h stl_stack.h stl_tempbuf.h stl_threads.h stl_tree.h
97 BITSHDRS+= stl_uninitialized.h stl_vector.h stream_iterator.h
98 BITSHDRS+= streambuf.tcc streambuf_iterator.h stringfwd.h type_traits.h
99 BITSHDRS+= valarray_after.h valarray_array.h valarray_array.tcc
100 BITSHDRS+= valarray_before.h vector.tcc
102 BITSHDRS:= ${BITSHDRS:S;^;${SRCDIR}/include/bits/;}
103 BITSHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
105 BKWHDRS= algo.h algobase.h alloc.h backward_warning.h bvector.h
106 BKWHDRS+= complex.h defalloc.h deque.h fstream.h function.h hash_map.h
107 BKWHDRS+= hash_set.h hashtable.h heap.h iomanip.h iostream.h istream.h
108 BKWHDRS+= iterator.h list.h map.h multimap.h multiset.h new.h ostream.h
109 BKWHDRS+= pair.h queue.h rope.h set.h slist.h stack.h stream.h
110 BKWHDRS+= streambuf.h strstream tempbuf.h tree.h vector.h
111 BKWHDRS:= ${BKWHDRS:S;^;${SRCDIR}/include/backward/;}
112 BKWHDRSDIR= ${INCLUDEDIR}/c++/3.4/backward
114 DEBUGHDRS= bitset debug.h deque formatter.h hash_map hash_map.h
115 DEBUGHDRS+= hash_multimap.h hash_multiset.h hash_set hash_set.h list map
116 DEBUGHDRS+= map.h multimap.h multiset.h safe_base.h safe_iterator.h
117 DEBUGHDRS+= safe_iterator.tcc safe_sequence.h set set.h string vector
118 DEBUGHDRS:= ${DEBUGHDRS:S;^;${SRCDIR}/include/debug/;}
119 DEBUGHDRSDIR= ${INCLUDEDIR}/c++/3.4/debug
121 EXTHDRS= algorithm bitmap_allocator.h debug_allocator.h
122 EXTHDRS+= enc_filebuf.h functional hash_fun.h hash_map hash_set
123 EXTHDRS+= hashtable.h iterator malloc_allocator.h memory mt_allocator.h
124 EXTHDRS+= new_allocator.h numeric pod_char_traits.h pool_allocator.h
125 EXTHDRS+= rb_tree rope ropeimpl.h slist stdio_filebuf.h
126 EXTHDRS+= stdio_sync_filebuf.h
127 EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;}
128 EXTHDRSDIR= ${INCLUDEDIR}/c++/3.4/ext
130 # This is the common subset of files that all three "C" header models use.
131 BASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h
132 BASEHDRS+= std_ciso646.h std_climits.h std_clocale.h std_cmath.h
133 BASEHDRS+= std_csetjmp.h std_csignal.h std_cstdarg.h std_cstddef.h
134 BASEHDRS+= std_cstdio.h std_cstdlib.h std_cstring.h std_ctime.h
135 BASEHDRS+= std_cwchar.h std_cwctype.h
136 .for h in ${BASEHDRS}
137 BASEHDRSNAME_$h=${h:R:S;^std_;;}
139 BASEHDRS:= ${BASEHDRS:S;^;${SRCDIR}/include/c_std/;}
140 BASEHDRSDIR= ${INCLUDEDIR}/c++/3.4
142 # Some of the different "C" header models need extra files.
143 BASEXHDRS= ${SRCDIR}/include/c_std/cmath.tcc
144 BASEXHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
146 STDHDRS= std_algorithm.h std_bitset.h std_complex.h std_deque.h
147 STDHDRS+= std_fstream.h std_functional.h std_iomanip.h std_ios.h
148 STDHDRS+= std_iosfwd.h std_iostream.h std_istream.h std_iterator.h
149 STDHDRS+= std_limits.h std_list.h std_locale.h std_map.h std_memory.h
150 STDHDRS+= std_numeric.h std_ostream.h std_queue.h std_set.h
151 STDHDRS+= std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h
152 STDHDRS+= std_string.h std_utility.h std_valarray.h std_vector.h
154 STDHDRSNAME_$h=${h:R:S;^std_;;}
156 STDHDRS:= ${STDHDRS:S;^;${SRCDIR}/include/std/;}
157 STDHDRSDIR= ${INCLUDEDIR}/c++/3.4
159 # c++locale <- c_locale.h
160 TARGETHDRS= io/basic_file_stdio.h io/c_io_stdio.h
161 TARGETHDRS+= allocator/new_allocator_base.h
162 TARGETHDRS+= os/bsd/netbsd/ctype_inline.h
163 TARGETHDRS+= os/bsd/netbsd/os_defines.h
164 TARGETHDRS+= locale/generic/messages_members.h locale/generic/time_members.h
165 TARGETHDRS+= locale/generic/codecvt_specializations.h
166 TARGETHDRS+= locale/generic/c_locale.h
167 TARGETHDRS:= ${TARGETHDRS:S;^;${SRCDIR}/config/;} ctype_noninline.h \
168 ctype_base.h os_defines.h
170 TARGETHDRSNAME_c_io_stdio.h= c++io.h
171 TARGETHDRSNAME_new_allocator_base.h= c++allocator.h
172 TARGETHDRSNAME_basic_file_stdio.h= basic_file.h
173 TARGETHDRSNAME_c_locale.h= c++locale.h
174 TARGETHDRS+= ${.CURDIR}/c++config.h
175 TARGETHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
177 MARCHHDRS= atomic_word.h
179 .for h in ${MARCHHDRS}
180 .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h})
181 TARGETHDRS+= ${SRCDIR}/config/cpu/${MARCHDIR}/${h}
183 TARGETHDRS+= ${SRCDIR}/config/cpu/generic/${h}
187 THRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-default.h
188 THRHDRSDIR= ${INCLUDEDIR}/c++/3.4/bits
190 gthr.h: ${GCCDIR}/gcc/gthr.h
191 sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \
192 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
193 < ${GCCDIR}/gcc/gthr.h > gthr.h
195 gthr-single.h: ${GCCDIR}/gcc/gthr-single.h
196 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
197 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
198 < ${GCCDIR}/gcc/gthr-single.h > gthr-single.h
200 gthr-posix.h: ${GCCDIR}/gcc/gthr-posix.h
201 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
202 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
203 -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
204 < ${GCCDIR}/gcc/gthr-posix.h > gthr-posix.h
206 gthr-default.h: ${GCCDIR}/gcc/gthr-posix.h
207 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
208 -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
209 -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
210 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
211 < ${GCCDIR}/gcc/gthr-posix.h > gthr-default.h
213 ctype_base.h: ${SRCDIR}/config/os/bsd/netbsd/ctype_base.h ctype_base.h.patch
214 patch -o ${.TARGET} -i ${.CURDIR}/ctype_base.h.patch ${SRCDIR}/config/os/bsd/netbsd/ctype_base.h
216 ctype_noninline.h: ${SRCDIR}/config/os/bsd/netbsd/ctype_noninline.h ctype_noninline.h.patch
217 patch -o ${.TARGET} -i ${.CURDIR}/ctype_noninline.h.patch ${SRCDIR}/config/os/bsd/netbsd/ctype_noninline.h
219 os_defines.h: ${SRCDIR}/config/os/bsd/netbsd/os_defines.h os_defines.h.patch
220 patch -o ${.TARGET} -i ${.CURDIR}/os_defines.h.patch ${SRCDIR}/config/os/bsd/netbsd/os_defines.h
222 CLEANFILES+= ${THRHDRS} ctype_noninline.h ctype_base.h os_defines.h
224 .include <bsd.lib.mk>