diff --git a/sys/boot/pc98/pc98boot/Makefile b/sys/boot/pc98/pc98boot/Makefile index 0e33735e587..73bfba50fbb 100644 --- a/sys/boot/pc98/pc98boot/Makefile +++ b/sys/boot/pc98/pc98boot/Makefile @@ -1,14 +1,22 @@ # $FreeBSD$ FILES= ${BOOT} -SRCS= ${BOOT0} ${BOOT05} CLEANFILES= ${BOOT} ${BOOT}.part BOOT= pc98boot -BOOT0= ${.CURDIR}/../boot0/boot0 -BOOT05= ${.CURDIR}/../boot0.5/boot0.5 -${BOOT}: ${SRCS} ${BOOT}.part +.if exists(${.OBJDIR}/../boot0) +BOOT0= ${.OBJDIR}/../boot0/boot0 +.else +BOOT0= ${.CURDIR}/../boot0/boot0 +.endif +.if exists(${.OBJDIR}/../boot0.5) +BOOT05= ${.OBJDIR}/../boot0.5/boot0.5 +.else +BOOT05= ${.CURDIR}/../boot0.5/boot0.5 +.endif + +${BOOT}: ${BOOT0} ${BOOT05} ${BOOT}.part cat ${BOOT0} ${BOOT}.part ${BOOT05} > ${.TARGET} ${BOOT}.part: