1 # $DragonFly: src/gnu/lib/gcc41/libstdc++/Makefile,v 1.4 2007/08/23 06:13:30 corecode Exp $
3 .
include "../Makefile.inc"
5 .if
${MACHINE_ARCH} == "i386" && !empty
(MACHINE_CPU
:Mi486
)
7 .elif
${MACHINE_ARCH} == "amd64"
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}
18 .PATH
: ${SUPDIR} ${GCCDIR}/gcc
${GCCDIR}/libiberty
25 CFLAGS
+= -DIN_GLIBCPP_V3
-DHAVE_CONFIG_H
26 CFLAGS
+= -I.
-I
${.CURDIR
}
27 CFLAGS
+= -I
${SUPDIR} -I
${GCCDIR}/gcc
-I
${GCCDIR}/include
28 CXXFLAGS
+= -I
${SRCDIR}/config
/cpu
/${MARCHDIR}
29 CXXFLAGS
+= -fno-implicit-templates
-ffunction-sections
-fdata-sections \
35 # libstdc++ sources (libstdc++/src/Makefile.in, do not reorder)
94 host_sources_extra
= \
98 SRCS
+= ctype_noninline.h ctype_base.h
101 echo
'#include "atomicity.h"' > ${.TARGET
}
103 CLEANFILES
+= atomicity.
cc
108 # Embedded copy of libsupc++
144 unwind.h
: unwind-generic.h
145 cp
${.ALLSRC
} ${.TARGET
}
147 CLEANFILES
+= unwind.h
150 strstream.
cc: ${SRCDIR}/src
/strstream.
cc
151 sed
-e
's,^#include <strstream>,#include <backward/strstream>,g' \
152 < ${.ALLSRC
} > ${.TARGET
}
154 CLEANFILES
+= strstream.
cc
157 INCSGROUPS
= BITSHDRS BKWHDRS DEBUGHDRS EXTHDRS TR1HDRS \
158 BASEHDRS BASEXHDRS STDHDRS TARGETHDRS THRHDRS
191 STDHDRSNAME_
$h=${h
:R
:S
;^std_
;;}
193 STDHDRS
:= ${STDHDRS
:S
;^
;${SRCDIR}/include/std
/;}
194 STDHDRSDIR
= ${INCLUDEDIR}/c
++/4.1
204 boost_concept_check.h \
227 streambuf_iterator.h \
238 stl_iterator_base_funcs.h \
239 stl_iterator_base_types.h \
247 stl_raw_storage_iter.h \
253 stl_uninitialized.h \
262 BITSHDRS
:= ${BITSHDRS
:S
;^
;${SRCDIR}/include/bits
/;}
263 BITSHDRSDIR
= ${INCLUDEDIR}/c
++/4.1/bits
303 BKWHDRS
:= ${BKWHDRS
:S
;^
;${SRCDIR}/include/backward
/;}
304 BKWHDRSDIR
= ${INCLUDEDIR}/c
++/4.1/backward
311 codecvt_specializations.h \
314 stdio_sync_filebuf.h \
339 EXTHDRS
:= ${EXTHDRS
:S
;^
;${SRCDIR}/include/ext
/;}
340 EXTHDRSDIR
= ${INCLUDEDIR}/c
++/4.1/ext
350 functional_iterate.h \
363 TR1HDRS
:= ${TR1HDRS
:S
;^
;${SRCDIR}/include/tr1
/;}
364 TR1HDRSDIR
= ${INCLUDEDIR}/c
++/4.1/tr1
367 # This is the common subset of files that all three "C" header models use.
387 .for h in
${BASEHDRS}
388 BASEHDRSNAME_
$h=${h
:R
:S
;^std_
;;}
390 BASEHDRS
:= ${BASEHDRS
:S
;^
;${SRCDIR}/include/c_std
/;}
391 BASEHDRSDIR
= ${INCLUDEDIR}/c
++/4.1
393 # Some of the different "C" header models need extra files.
394 BASEXHDRS
= ${SRCDIR}/include/c_std
/cmath.tcc
395 BASEXHDRSDIR
= ${INCLUDEDIR}/c
++/4.1/bits
424 DEBUGHDRS
:= ${DEBUGHDRS
:S
;^
;${SRCDIR}/include/debug
/;}
425 DEBUGHDRSDIR
= ${INCLUDEDIR}/c
++/4.1/debug
428 # c++locale <- c_locale.h
429 TARGETHDRS
= io
/basic_file_stdio.h
430 TARGETHDRSNAME_basic_file_stdio.h
= basic_file.h
431 TARGETHDRS
+= allocator
/new_allocator_base.h
432 TARGETHDRSNAME_new_allocator_base.h
= c
++allocator.h
433 TARGETHDRS
+= io
/c_io_stdio.h
434 TARGETHDRSNAME_c_io_stdio.h
= c
++io.h
435 TARGETHDRS
+= locale
/generic
/c_locale.h locale
/generic
/c
++locale_internal.h
436 TARGETHDRSNAME_c_locale.h
= c
++locale.h
437 TARGETHDRS
+= locale
/generic
/messages_members.h
438 TARGETHDRS
+= locale
/generic
/time_members.h
439 TARGETHDRS
+= os
/bsd
/netbsd
/ctype_inline.h
440 TARGETHDRS
:= ${TARGETHDRS
:S
;^
;${SRCDIR}/config
/;}
441 TARGETHDRS
+= ctype_base.h ctype_noninline.h os_defines.h
442 TARGETHDRS
+= c
++config.h
443 TARGETHDRSDIR
= ${INCLUDEDIR}/c
++/4.1/bits
445 MARCHHDRS
= atomic_word.h cxxabi_tweaks.h cpu_defines.h
447 .for h in
${MARCHHDRS}
448 .if exists
(${SRCDIR}/config
/cpu
/${MARCHDIR}/${h})
449 TARGETHDRS
+= ${SRCDIR}/config
/cpu
/${MARCHDIR}/${h}
451 TARGETHDRS
+= ${SRCDIR}/config
/cpu
/generic
/${h}
455 THRHDRS
= gthr.h gthr-single.h gthr-posix.h gthr-default.h
456 THRHDRSDIR
= ${INCLUDEDIR}/c
++/4.1/bits
458 gthr.h
: ${GCCDIR}/gcc
/gthr.h
459 sed
-e
'/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \
460 -e
's,^#include "\(.*\)",#include <bits/\1>,g' \
461 < ${GCCDIR}/gcc
/gthr.h
> gthr.h
463 gthr-single.h
: ${GCCDIR}/gcc
/gthr-single.h
464 sed
-e
's/\(UNUSED\)/_GLIBCPP_\1/g' \
465 -e
's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
466 < ${GCCDIR}/gcc
/gthr-single.h
> gthr-single.h
468 gthr-posix.h
: ${GCCDIR}/gcc
/gthr-posix.h
469 sed
-e
's/\(UNUSED\)/_GLIBCPP_\1/g' \
470 -e
's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
471 -e
's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
472 < ${GCCDIR}/gcc
/gthr-posix.h
> gthr-posix.h
474 gthr-default.h
: ${GCCDIR}/gcc
/gthr-posix.h
475 sed
-e
's/\(UNUSED\)/_GLIBCPP_\1/g' \
476 -e
's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
477 -e
's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
478 -e
's,^#include "\(.*\)",#include <bits/\1>,g' \
479 < ${GCCDIR}/gcc
/gthr-posix.h
> gthr-default.h
481 ctype_base.h
: ${SRCDIR}/config
/os
/bsd
/netbsd
/ctype_base.h ctype_base.h.patch
482 patch
-o
${.TARGET
} -i
${.CURDIR
}/ctype_base.h.patch
${SRCDIR}/config
/os
/bsd
/netbsd
/ctype_base.h
484 ctype_noninline.h
: ${SRCDIR}/config
/os
/bsd
/netbsd
/ctype_noninline.h ctype_noninline.h.patch
485 patch
-o
${.TARGET
} -i
${.CURDIR
}/ctype_noninline.h.patch
${SRCDIR}/config
/os
/bsd
/netbsd
/ctype_noninline.h
487 c
++config.h
: config.h
${SRCDIR}/include/bits
/c
++config DATESTAMP
488 cat
${.ALLSRC
:M
*c
++config
} > ${.TARGET
}
489 sed
-e
's/^/#define __GLIBCXX__ /' < ${.ALLSRC
:M
*DATESTAMP
} >> ${.TARGET
}
490 sed
-e
's/HAVE_/_GLIBCXX_HAVE_/g' \
491 -e
's/PACKAGE/_GLIBCXX_PACKAGE/g' \
492 -e
's/VERSION/_GLIBCXX_VERSION/g' \
493 -e
's/WORDS_/_GLIBCXX_WORDS_/g' \
494 < ${.ALLSRC
:M
*config.h
} >> ${.TARGET
}
495 echo
"#endif // _CXXCONFIG_" >> ${.TARGET
}
497 CLEANFILES
+= ${THRHDRS} ctype_noninline.h ctype_base.h c
++config.h
499 .
include <bsd.lib.mk
>