Index: head/sys/boot/efi/boot1/Makefile =================================================================== --- head/sys/boot/efi/boot1/Makefile +++ head/sys/boot/efi/boot1/Makefile @@ -90,13 +90,16 @@ .include -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" -beforedepend ${OBJS}: machine x86 +beforedepend ${OBJS}: machine -CLEANFILES+= machine x86 +CLEANFILES+= machine machine: - ln -sf ${.CURDIR}/../../../amd64/include machine + ln -sf ${.CURDIR}/../../../${MACHINE}/include machine + +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +beforedepend ${OBJS}: x86 +CLEANFILES+= x86 x86: ln -sf ${.CURDIR}/../../../x86/include x86 Index: head/sys/boot/efi/loader/Makefile =================================================================== --- head/sys/boot/efi/loader/Makefile +++ head/sys/boot/efi/loader/Makefile @@ -111,12 +111,17 @@ .include -beforedepend ${OBJS}: machine x86 +beforedepend ${OBJS}: machine -CLEANFILES+= machine x86 +CLEANFILES+= machine machine: - ln -sf ${.CURDIR}/../../../amd64/include machine + ln -sf ${.CURDIR}/../../../${MACHINE}/include machine + +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +beforedepend ${OBJS}: x86 +CLEANFILES+= x86 x86: ln -sf ${.CURDIR}/../../../x86/include x86 +.endif