1 # $NetBSD: Makefile.hooks,v 1.11 2025/09/07 04:08:23 mrg Exp $ 2 3 # 4 # Makefile fragment to build genhooks and *target-hooks*.h 5 # 6 7 .for f in hooks 8 gen${f}.lo: ${HH} gen${f}.cc ${G_D_TARGET_DEF} 9 gen${f}: gen${f}.lo ${GENPROG_ERROR_DEPENDS} 10 ${_MKTARGET_LINK} 11 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} 12 CLEANFILES+= genhooks gen${f}.lo 13 .endfor 14 CLEANFILES+= ${GENPROG_ERROR_DEPENDS} 15 16 # and now the outputs of genhooks 17 target-hooks-def.h: genhooks 18 ./genhooks "Target Hook" >${.TARGET} 19 c-family/c-target-hooks-def.h: genhooks 20 mkdir -p c-family 21 ./genhooks "C Target Hook" >${.TARGET} 22 common/common-target-hooks-def.h: genhooks 23 mkdir -p common 24 ./genhooks "Common Target Hook" >${.TARGET} 25 26 CLEANFILES+= target-hooks-def.h \ 27 c-family/c-target-hooks-def.h \ 28 common/common-target-hooks-def.h 29