freebsd-skq/sys/boot/i386/pxeldr/Makefile
imp 7f785018c1 dd is currently a bootstrap tool. It really doesn't have any business
being a bootstrap tool. However, for reproducible build output,
FreeBSD added dd status=none because it was otherwise difficult to
suppress the status information, but retain any errors that might
happen. There's no real reason that dd has to be a build tool, other
than we use status=none unconditional. Remove dd from a bootstrap tool
entirely by only using status=none when available. This may also help
efforts to build the system on non-FreeBSD hosts as well.

Differential Revision: https://reviews.freebsd.org/D8605
2016-12-02 14:44:38 +00:00

49 lines
920 B
Makefile

# $FreeBSD$
# Pick up ../Makefile.inc early.
.include <bsd.init.mk>
PROG= ${LDR}
INTERNALPROG=
FILES= ${BOOT}
MAN= ${BOOT}.8
SRCS= ${LDR}.S
CLEANFILES= ${BOOT}
BOOT= pxeboot
LDR= pxeldr
ORG= 0x7c00
LOADER= loader
.if defined(BOOT_PXELDR_PROBE_KEYBOARD)
CFLAGS+=-DPROBE_KEYBOARD
.endif
.if defined(BOOT_PXELDR_ALWAYS_SERIAL)
CFLAGS+=-DALWAYS_SERIAL
.endif
CFLAGS+=-I${.CURDIR}/../common
LOADERBIN= ${.OBJDIR}/../loader/loader.bin
CLEANFILES+= ${BOOT}.tmp
${BOOT}: ${LDR} ${LOADER}
cat ${LDR} ${LOADER} > ${.TARGET}.tmp
${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
rm ${.TARGET}.tmp
LDFLAGS+=${LDFLAGS_BIN}
CLEANFILES+= ${LOADER}
${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-b ${BTXKERN} ${LOADERBIN}
.include <bsd.prog.mk>
# XXX: clang integrated-as doesn't grok .codeNN directives yet
CFLAGS.pxeldr.S= ${CLANG_NO_IAS}