1 1.25 mrg # $NetBSD: Makefile,v 1.25 2021/08/16 06:56:27 mrg Exp $ 2 1.1 mrg 3 1.6 matt .include <bsd.init.mk> 4 1.1 mrg 5 1.6 matt .include "${.CURDIR}/../../arch/${GCC_MACHINE_ARCH}/defs.mk" 6 1.1 mrg 7 1.1 mrg .cc: # disable .cc->NULL transform 8 1.1 mrg 9 1.13 mrg GNUHOSTDIST= ${DIST} 10 1.1 mrg 11 1.23 mrg GTHRINCS= gthr.h gthr-single.h gthr-posix.h 12 1.23 mrg 13 1.10 mrg BUILDINCS= basic_file.h c++allocator.h c++io.h c++locale.h 14 1.20 mrg BUILDINCS+= messages_members.h time_members.h opt_random.h 15 1.23 mrg BUILDINCS+= ${GTHRINCS} 16 1.8 mrg 17 1.18 mrg INCS= ${G_bits_headers} ${G_c_base_headers_extra} ${G_host_headers} 18 1.10 mrg INCS+= ${BUILDINCS} 19 1.8 mrg 20 1.25 mrg # These are handled with special rules 21 1.25 mrg #INCS+= ${G_bits_host_headers} ${G_host_headers_extra} 22 1.25 mrg 23 1.8 mrg # libsupc++ 24 1.22 mrg # XXX use bits_sup_headers from libstdc++/include/Makefile.am 25 1.22 mrg INCS+= atomic_lockfree_defines.h \ 26 1.22 mrg cxxabi_forced.h \ 27 1.22 mrg cxxabi_init_exception.h \ 28 1.22 mrg exception.h \ 29 1.22 mrg exception_defines.h \ 30 1.22 mrg exception_ptr.h \ 31 1.22 mrg hash_bytes.h \ 32 1.22 mrg nested_exception.h 33 1.8 mrg 34 1.23 mrg # Build the gthr*.h files 35 1.23 mrg gthr.h: ${DIST}/libgcc/gthr.h Makefile 36 1.23 mrg ${TOOL_SED} \ 37 1.23 mrg -e '/^#pragma/b' \ 38 1.23 mrg -e '/^#/s/\([A-Z_][A-Z_]*\)/_GLIBCXX_\1/g' \ 39 1.23 mrg -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \ 40 1.23 mrg -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \ 41 1.23 mrg -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ 42 1.23 mrg < ${DIST}/libgcc/gthr.h > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET} 43 1.23 mrg 44 1.23 mrg gthr-single.h: ${DIST}/libgcc/gthr-single.h Makefile 45 1.23 mrg ${TOOL_SED} \ 46 1.23 mrg -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ 47 1.23 mrg -e 's/\(GCC[A-Z_]*_H\)/_GLIBCXX_\1/g' \ 48 1.23 mrg < ${DIST}/libgcc/gthr-single.h > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET} 49 1.23 mrg 50 1.23 mrg gthr-posix.h: ${DIST}/libgcc/gthr-posix.h Makefile 51 1.23 mrg ${TOOL_SED} \ 52 1.23 mrg -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ 53 1.23 mrg -e 's/\(GCC[A-Z_]*_H\)/_GLIBCXX_\1/g' \ 54 1.23 mrg -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ 55 1.23 mrg -e 's/\([A-Z_]*USE_WEAK\)/_GLIBCXX_\1/g' \ 56 1.23 mrg < ${DIST}/libgcc/gthr-posix.h > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET} 57 1.23 mrg 58 1.23 mrg .for _f in ${GTHRINCS} 59 1.23 mrg CLEANFILES+= ${.TARGET} ${.TARGET}.tmp 60 1.23 mrg .endfor 61 1.23 mrg 62 1.16 christos .if ${MKCOMPAT} != no && !empty(MACHINE_ARCH:M*64*) 63 1.8 mrg SUBDIR+= arch 64 1.8 mrg .else 65 1.4 mrg INCS+= c++config.h 66 1.8 mrg .endif 67 1.8 mrg 68 1.1 mrg INCSDIR= /usr/include/g++/bits 69 1.1 mrg 70 1.22 mrg INCSYMLINKS+= gthr-posix.h ${INCSDIR}/gthr-default.h 71 1.21 mrg 72 1.8 mrg .include "${.CURDIR}/../Makefile.includes" 73 1.8 mrg 74 1.19 mrg CLEANFILES+= ${BUILDINCS} 75 1.1 mrg 76 1.12 mrg CXXDIST= ${DIST}/libstdc++-v3 77 1.12 mrg COPYHEADERS= \ 78 1.13 mrg opt_random.h ${CXXDIST}/${G_CPU_OPT_BITS_RANDOM} \ 79 1.13 mrg basic_file.h ${CXXDIST}/${G_BASIC_FILE_H} \ 80 1.13 mrg c++allocator.h ${CXXDIST}/${G_ALLOCATOR_H} \ 81 1.13 mrg c++locale.h ${CXXDIST}/${G_CLOCALE_H} \ 82 1.13 mrg c++io.h ${CXXDIST}/${G_CSTDIO_H} \ 83 1.13 mrg messages_members.h ${CXXDIST}/${G_CMESSAGES_H} \ 84 1.13 mrg time_members.h ${CXXDIST}/${G_CTIME_H} 85 1.13 mrg 86 1.12 mrg .for _h _s in ${COPYHEADERS} 87 1.13 mrg ${_h}: ${_s} 88 1.14 gdt cp -pf ${.ALLSRC} ${.TARGET} 89 1.12 mrg .endfor 90 1.8 mrg 91 1.8 mrg .PATH: ${.CURDIR}/../../arch/${GCC_MACHINE_ARCH} \ 92 1.8 mrg ${DIST}/libstdc++-v3/include \ 93 1.8 mrg ${DIST}/libstdc++-v3/config \ 94 1.8 mrg ${DIST}/libstdc++-v3/ \ 95 1.8 mrg ${DIST}/libstdc++-v3/libsupc++ 96 1.1 mrg 97 1.8 mrg .include <bsd.subdir.mk> 98