Makefile revision 97523
150472Speter# $FreeBSD: head/gnu/lib/libstdc++/Makefile 97523 2002-05-29 22:26:05Z obrien $ 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 1145337SobrienSUBDIR= doc 1245337Sobrien 1318666SpeterLIB= stdc++ 1496340SobrienSHLIB_MAJOR= 4 1518666SpeterSHLIB_MINOR= 0 1618666Speter 1797433SpeterCFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H 1897433SpeterCFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} 1997433SpeterCXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections -Wno-deprecated 2097433Speter#LDFLAGS+= -Wl,-version-info,4:0:0 -Wl,--version-script=${SRCDIR}/src/linker.map 2118666Speter 2297433SpeterLDADD+= -lm 2397433SpeterDPADD+= ${LIBM} 2440204Speter 2597433Speter# libstdc++ sources (libstdc++/src/Makefile.in, do not reorder) 2696340SobrienSRCS+= globals.cc limits.cc basic_file_stdio.cc complex_io.cc ios.cc \ 2797433Speter strstream-fixed.cc cmath.cc bitset.cc functexcept.cc stdexcept.cc \ 2896340Sobrien vterminate.cc c_locale.cc locale.cc localename.cc codecvt.cc \ 2996340Sobrien collate_members.cc ctype_members.cc messages_members.cc \ 3096340Sobrien monetary_members.cc numeric_members.cc time_members.cc concept-inst.cc \ 3196340Sobrien locale-inst.cc misc-inst.cc stl-inst.cc string-inst.cc wstring-inst.cc \ 3296340Sobrien valarray-inst.cc ext-inst.cc 3318666Speter 3496340Sobrien# C parts of math 3596340SobrienSRCS+= nan.c signbit.c signbitf.c signbitl.c # stubs.c 3696340Sobrien 3797433Speter# Embedded copy of libsupc++ 3897433SpeterSRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \ 3997433Speter eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc \ 4097433Speter eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.cc eh_type.cc \ 4197433Speter new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \ 4297433Speter pure.cc tinfo.cc tinfo2.cc vec.cc 4396340Sobrien 4497433Speter# from libiberty: 4597523SobrienSRCS+= cp-demangle.c dyn-string.c 4618666Speter 4797433Speterstrstream-fixed.cc: ${SRCDIR}/src/strstream.cc 4897433Speter sed -e 's,^#include <strstream.h>,#include <backward/strstream.h>,g' \ 4997433Speter < ${SRCDIR}/src/strstream.cc > strstream-fixed.cc 5018666Speter 5197433SpeterCLEANFILES+= strstream-fixed.cc 5218666Speter 5397433SpeterINCSDIR= ${INCLUDEDIR}/g++ 5497433SpeterBUILDHDRS= gthr.h gthr-single.h gthr-posix.h gthr-default.h 5518666Speter 5697433SpeterBASELINKS!= awk '$$0 !~ /^\#/ {print "include/" $$1, $$2}' ${.CURDIR}/includes.map 5797433SpeterCONFIGLINKS!= awk '$$0 !~ /^\#/ {print "config/" $$1, $$2}' ${.CURDIR}/configs.map 5897433SpeterCPULINKS!= awk '$$0 !~ /^\#/ {print "config/" $$1, $$2}' ${.CURDIR}/${MACHINE_ARCH}.map 5997433SpeterINCLUDES= ${BASELINKS} ${CONFIGLINKS} ${CPULINKS} 6018666Speter 6197433Spetergthr.h: ${GCCDIR}/gthr.h 6297433Speter sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \ 6397433Speter -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ 6497433Speter < ${GCCDIR}/gthr.h > gthr.h 6518666Speter 6697433Spetergthr-single.h: ${GCCDIR}/gthr-single.h 6797433Speter sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ 6897433Speter -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \ 6997433Speter < ${GCCDIR}/gthr-single.h > gthr-single.h 7096340Sobrien 7197433Spetergthr-posix.h: ${GCCDIR}/gthr-posix.h 7297433Speter sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ 7397433Speter -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \ 7497433Speter -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \ 7597433Speter < ${GCCDIR}/gthr-posix.h > gthr-posix.h 7696340Sobrien 7797433Spetergthr-default.h: ${GCCDIR}/gthr-posix.h 7897433Speter sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ 7997433Speter -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \ 8097433Speter -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \ 8197433Speter -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ 8297433Speter < ${GCCDIR}/gthr-posix.h > gthr-default.h 8396340Sobrien 8497433SpeterCLEANFILES+= ${BUILDHDRS} 8597433Speterbuildincludes: ${BUILDHDRS} 8696340Sobrien 8797433Speterinstallincludes: 8897433Speter @set ${INCLUDES}; \ 8997433Speter while test $$# -ge 2; do \ 9097433Speter l=${SRCDIR}/$$1; \ 9197433Speter shift; \ 9297433Speter t=$$1; \ 9397433Speter shift; \ 9497433Speter ${ECHO} $$l -\> ${DESTDIR}${INCSDIR}/$$t; \ 9597433Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ 9697433Speter $$l ${DESTDIR}${INCSDIR}/$$t; \ 9797433Speter done; true 9897433Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ 9997433Speter ${BUILDHDRS} ${.CURDIR}/c++config.h ${DESTDIR}${INCSDIR}/bits 10018666Speter 10118666Speter.include <bsd.lib.mk> 102