846a4356ea
(John tells me there were problems when trying this before, but it appears to be safe these day.) OK'ed by: jhb Repocopied by: joe
49 lines
889 B
Makefile
49 lines
889 B
Makefile
# $FreeBSD$
|
|
|
|
# Pick up ../Makefile.inc early.
|
|
.include <bsd.init.mk>
|
|
|
|
PROG= ${LDR}.out
|
|
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
|
|
|
|
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
|
|
|
|
CLEANFILES+= ${LDR}
|
|
|
|
${LDR}: ${LDR}.out
|
|
objcopy -S -O binary ${LDR}.out ${.TARGET}
|
|
|
|
LDFLAGS+= -N -e start -Ttext ${ORG}
|
|
|
|
CLEANFILES+= ${LOADER}
|
|
|
|
${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
|
|
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
|
|
-b ${BTXKERN} ${LOADERBIN}
|
|
|
|
.include <bsd.prog.mk>
|