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