xref: /netbsd-src/external/gpl3/gcc/lib/Makefile.hacks (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1#	$NetBSD: Makefile.hacks,v 1.2 2011/07/03 07:23:19 mrg Exp $
2
3# some random crap we need in a few places
4
5# these aren't necessary but are #include'd
6FAKEHEADERS=	${EXTRA_FAKEHEADERS} insn-flags.h insn-constants.h sysroot-suffix.h
7${FAKEHEADERS}:
8	${_MKTARGET_CREATE}
9	touch ${.TARGET}
10tm.h ${SRCS}: ${FAKEHEADERS}
11CLEANFILES+=	${FAKEHEADERS}
12
13# arm.h wants MACHMODE aka "enum machine_mode" so we provide a hackful
14# one here to help build libs before gcc itself is built.
15
16# XXX arm hack
17.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb"
18${OBJS}: insn-modes.h
19# XXX XXX
20${__DPSRCS.d}: insn-modes.h
21insn-modes.h:
22	${_MKTARGET_CREATE}
23	echo "enum machine_mode { X };" > ${.TARGET}
24DPSRCS+=	insn-modes.h
25CLEANFILES+=	insn-modes.h
26.endif
27