Makefile revision 125503
150472Speter# $FreeBSD: head/gnu/lib/libstdc++/Makefile 125503 2004-02-05 22:44:25Z ru $ 218666Speter 397433SpeterGCCDIR= ${.CURDIR}/../../../contrib/gcc 497433SpeterSRCDIR= ${.CURDIR}/../../../contrib/libstdc++ 597433SpeterSUPDIR= ${SRCDIR}/libsupc++ 697433Speter 796340Sobrien.PATH: ${SRCDIR}/src ${SRCDIR}/libmath ${SRCDIR}/config/io \ 897433Speter ${SRCDIR}/config/locale/generic ${SRCDIR} ${SRCDIR}/std \ 997523Sobrien ${SUPDIR} ${GCCDIR} 1018666Speter 1198413Sobrien#SUBDIR= doc 1245337Sobrien 1318666SpeterLIB= stdc++ 1496340SobrienSHLIB_MAJOR= 4 1518666Speter 1697433SpeterCFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H 1797433SpeterCFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} 1897433SpeterCXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections -Wno-deprecated 1997433Speter#LDFLAGS+= -Wl,-version-info,4:0:0 -Wl,--version-script=${SRCDIR}/src/linker.map 2018666Speter 21125503SruLDADD= -lm 22125503SruDPADD= ${LIBM} 2340204Speter 2497433Speter# libstdc++ sources (libstdc++/src/Makefile.in, do not reorder) 25117429SkanSRCS+= bitset.cc codecvt.cc complex_io.cc concept-inst.cc ctype.cc \ 26117429Skan ext-inst.cc fstream.cc fstream-inst.cc functexcept.cc \ 27117429Skan globals.cc io-inst.cc ios.cc istream-inst.cc limits.cc \ 28117429Skan locale.cc locale-inst.cc localename.cc misc-inst.cc \ 29117429Skan ostream-inst.cc sstream-inst.cc stdexcept.cc stl-inst.cc \ 30117429Skan streambuf-inst.cc string-inst.cc strstream-fixed.cc \ 31117429Skan valarray-inst.cc vterminate.cc wstring-inst.cc 3218666Speter 33117429Skan# target sources 34117429SkanSRCS+= codecvt_members.cc collate_members.cc ctype_members.cc \ 35117429Skan messages_members.cc monetary_members.cc numeric_members.cc \ 36117429Skan time_members.cc 37117429Skan 38117429Skan# target sources extra 39117429SkanSRCS+= basic_file_stdio.cc c_locale.cc 40117429Skan 4196340Sobrien# C parts of math 4297745SobrienSRCS+= nan.c signbit.c signbitf.c signbitl.c stubs.c 4396340Sobrien 4497433Speter# Embedded copy of libsupc++ 4597433SpeterSRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \ 4697433Speter eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc \ 4797433Speter eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.cc eh_type.cc \ 48117429Skan guard.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ 4997433Speter pure.cc tinfo.cc tinfo2.cc vec.cc 5096340Sobrien 5197433Speter# from libiberty: 5297523SobrienSRCS+= cp-demangle.c dyn-string.c 5318666Speter 5497433Speterstrstream-fixed.cc: ${SRCDIR}/src/strstream.cc 55102806Skan sed -e 's,^#include <strstream>,#include <backward/strstream>,g' \ 5697433Speter < ${SRCDIR}/src/strstream.cc > strstream-fixed.cc 5718666Speter 5897433SpeterCLEANFILES+= strstream-fixed.cc 5918666Speter 6097657SruINCSGROUPS= BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \ 6197657Sru TARGETHDRS THRHDRS 6218666Speter 6397657SruBITSHDRS= basic_ios.h basic_ios.tcc basic_string.h basic_string.tcc \ 6497657Sru boost_concept_check.h char_traits.h codecvt.h concept_check.h \ 65117429Skan cpp_type_traits.h deque.tcc fpos.h fstream.tcc functexcept.h \ 66124153Skan gslice.h gslice_array.h indirect_array.h \ 67117429Skan ios_base.h istream.tcc list.tcc \ 68117429Skan locale_classes.h locale_facets.h locale_facets.tcc \ 6997657Sru localefwd.h mask_array.h ostream.tcc pthread_allocimpl.h \ 70124153Skan slice_array.h sstream.tcc stl_algo.h stl_algobase.h \ 7197657Sru stl_alloc.h stl_bvector.h stl_construct.h stl_deque.h \ 7297657Sru stl_function.h stl_heap.h stl_iterator.h \ 7397657Sru stl_iterator_base_funcs.h stl_iterator_base_types.h \ 7497657Sru stl_list.h stl_map.h stl_multimap.h stl_multiset.h \ 7597657Sru stl_numeric.h stl_pair.h stl_pthread_alloc.h stl_queue.h \ 7697657Sru stl_raw_storage_iter.h stl_relops.h stl_set.h stl_stack.h \ 7797657Sru stl_tempbuf.h stl_threads.h stl_tree.h stl_uninitialized.h \ 7897657Sru stl_vector.h stream_iterator.h streambuf.tcc \ 7997657Sru streambuf_iterator.h stringfwd.h type_traits.h \ 80117429Skan valarray_array.h valarray_array.tcc valarray_meta.h \ 81117429Skan vector.tcc 8297657SruBITSHDRS:= ${BITSHDRS:S;^;${SRCDIR}/include/bits/;} 83117429SkanBITSHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits 8418666Speter 8597657SruBKWHDRS= algo.h algobase.h alloc.h backward_warning.h bvector.h \ 8697657Sru complex.h defalloc.h deque.h fstream.h function.h \ 8797657Sru hash_map.h hash_set.h hashtable.h heap.h iomanip.h \ 8897657Sru iostream.h istream.h iterator.h list.h map.h multimap.h \ 8997657Sru multiset.h new.h ostream.h pair.h queue.h rope.h set.h \ 90124153Skan slist.h stack.h stream.h streambuf.h strstream \ 9197657Sru tempbuf.h tree.h vector.h 9297657SruBKWHDRS:= ${BKWHDRS:S;^;${SRCDIR}/include/backward/;} 93117429SkanBKWHDRSDIR= ${INCLUDEDIR}/c++/3.3/backward 9497657Sru 9597657SruEXTHDRS= algorithm enc_filebuf.h functional hash_map hash_set \ 9697657Sru iterator memory numeric rb_tree rope ropeimpl.h slist \ 9797657Sru stdio_filebuf.h stl_hash_fun.h stl_hashtable.h stl_rope.h 9897657SruEXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;} 99117429SkanEXTHDRSDIR= ${INCLUDEDIR}/c++/3.3/ext 10097657Sru 10197657Sru# This is the common subset of files that all three "C" header models use. 10297657SruBASEHDRS= std_cassert.h std_cctype.h std_cerrno.h std_cfloat.h \ 10397657Sru std_ciso646.h std_climits.h std_clocale.h std_cmath.h \ 10497657Sru std_csetjmp.h std_csignal.h std_cstdarg.h std_cstddef.h \ 10597657Sru std_cstdio.h std_cstdlib.h std_cstring.h std_ctime.h \ 10697657Sru std_cwchar.h std_cwctype.h 10797657Sru.for h in ${BASEHDRS} 10897657SruBASEHDRSNAME_$h=${h:R:S;^std_;;} 10997657Sru.endfor 11097657SruBASEHDRS:= ${BASEHDRS:S;^;${SRCDIR}/include/c_std/;} 111117429SkanBASEHDRSDIR= ${INCLUDEDIR}/c++/3.3 11297657Sru 11397657Sru# Some of the different "C" header models need extra files. 11497657SruBASEXHDRS= ${SRCDIR}/include/c_std/cmath.tcc 115117429SkanBASEXHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits 11697657Sru 11797657SruSTDHDRS= std_algorithm.h std_bitset.h std_complex.h std_deque.h \ 11897657Sru std_fstream.h std_functional.h std_iomanip.h std_ios.h \ 11997657Sru std_iosfwd.h std_iostream.h std_istream.h std_iterator.h \ 12097657Sru std_limits.h std_list.h std_locale.h std_map.h std_memory.h \ 12197657Sru std_numeric.h std_ostream.h std_queue.h std_set.h \ 12297657Sru std_sstream.h std_stack.h std_stdexcept.h std_streambuf.h \ 12397657Sru std_string.h std_utility.h std_valarray.h std_vector.h 12497657Sru.for h in ${STDHDRS} 12597657SruSTDHDRSNAME_$h=${h:R:S;^std_;;} 12697657Sru.endfor 12797657SruSTDHDRS:= ${STDHDRS:S;^;${SRCDIR}/include/std/;} 128117429SkanSTDHDRSDIR= ${INCLUDEDIR}/c++/3.3 12997657Sru 13097657SruTARGETHDRS= io/basic_file_stdio.h io/c_io_stdio.h \ 13197657Sru locale/generic/c_locale.h \ 132103456Skan locale/generic/c++locale_internal.h \ 13397657Sru locale/generic/codecvt_specializations.h \ 13497657Sru locale/generic/messages_members.h \ 135110632Skan locale/generic/time_members.h \ 136117429Skan os/bsd/freebsd/ctype_base.h \ 137117429Skan os/bsd/freebsd/ctype_inline.h \ 138117429Skan os/bsd/freebsd/ctype_noninline.h \ 139117429Skan os/bsd/freebsd/os_defines.h 14097657SruTARGETHDRS:= ${TARGETHDRS:S;^;${SRCDIR}/config/;} 14197657SruTARGETHDRS+= ${.CURDIR}/c++config.h 14297657SruTARGETHDRSNAME_basic_file_stdio.h= basic_file.h 14397657SruTARGETHDRSNAME_c_io_stdio.h= c++io.h 14497657SruTARGETHDRSNAME_c_locale.h= c++locale.h 145117429SkanTARGETHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits 14697657Sru 147117429SkanMARCHHDRS= atomicity.h 14897657Sru.if ${MACHINE_ARCH} == "sparc64" 149117429SkanMARCHDIR= sparc 150117429Skan.elif ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU} != 'i386' 151117429SkanMARCHDIR= i486 15297657Sru.else 153117429SkanMARCHDIR= ${MACHINE_ARCH} 15497657Sru.endif 155117429Skan 15697657Sru.for h in ${MARCHHDRS} 157117429Skan.if exists(${SRCDIR}/config/cpu/${MARCHDIR}/${h}) 158117429SkanTARGETHDRS+= ${SRCDIR}/config/cpu/${MARCHDIR}/${h} 15997657Sru.else 160124189SkanTARGETHDRS+= ${SRCDIR}/config/cpu/generic/${h} 16197657Sru.endif 16297657Sru.endfor 16397657Sru 16497657SruTHRHDRS= gthr.h gthr-single.h gthr-posix.h gthr-default.h 165117429SkanTHRHDRSDIR= ${INCLUDEDIR}/c++/3.3/bits 16697657Sru 16797433Spetergthr.h: ${GCCDIR}/gthr.h 16897433Speter sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \ 16997433Speter -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ 17097433Speter < ${GCCDIR}/gthr.h > gthr.h 17118666Speter 17297433Spetergthr-single.h: ${GCCDIR}/gthr-single.h 17397433Speter sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ 17497433Speter -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \ 17597433Speter < ${GCCDIR}/gthr-single.h > gthr-single.h 17696340Sobrien 17797433Spetergthr-posix.h: ${GCCDIR}/gthr-posix.h 17897433Speter sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ 17997433Speter -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \ 18097433Speter -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \ 18197433Speter < ${GCCDIR}/gthr-posix.h > gthr-posix.h 18296340Sobrien 18397433Spetergthr-default.h: ${GCCDIR}/gthr-posix.h 18497433Speter sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ 18597433Speter -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \ 18697433Speter -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \ 18797433Speter -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ 18897433Speter < ${GCCDIR}/gthr-posix.h > gthr-default.h 18996340Sobrien 19097657SruCLEANFILES+= ${THRHDRS} 19196340Sobrien 19218666Speter.include <bsd.lib.mk> 193