xref: /minix/external/gpl3/gcc/Makefile.hooks (revision 0a6a1f1d)
1#	$NetBSD: Makefile.hooks,v 1.1 2014/03/01 10:00:31 mrg Exp $
2
3#
4# Makefile fragment to build genhooks and *target-hooks*.h
5#
6
7.for f in hooks
8gen${f}.lo: ${HH} gen${f}.c
9gen${f}: gen${f}.lo ${GENPROG_ERROR_DEPENDS}
10	${_MKTARGET_LINK}
11	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
12CLEANFILES+=	genhooks
13.endfor
14
15# and now the outputs of genhooks
16target-hooks-def.h: genhooks
17	./genhooks "Target Hook" >${.TARGET}
18c-family/c-target-hooks-def.h: genhooks
19	mkdir -p c-family
20	./genhooks "C Target Hook" >${.TARGET}
21common/common-target-hooks-def.h: genhooks
22	mkdir -p common
23	./genhooks "Common Target Hook" >${.TARGET}
24
25CLEANFILES+=	target-hooks-def.h \
26		c-family/c-target-hooks-def.h \
27		common/common-target-hooks-def.h
28