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