2000-03-28 01:19:53 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
# Pick up ../Makefile.inc early.
|
|
|
|
.include <bsd.init.mk>
|
2000-03-28 01:19:53 +00:00
|
|
|
|
2004-04-25 19:50:20 +00:00
|
|
|
PROG= ${LDR}
|
2004-02-09 14:11:58 +00:00
|
|
|
INTERNALPROG=
|
2004-02-06 21:58:32 +00:00
|
|
|
FILES= ${BOOT}
|
|
|
|
MAN= ${BOOT}.8
|
2004-02-11 08:42:38 +00:00
|
|
|
SRCS= ${LDR}.S
|
2004-02-06 21:58:32 +00:00
|
|
|
CLEANFILES= ${BOOT}
|
2000-03-28 01:19:53 +00:00
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
BOOT= pxeboot
|
|
|
|
LDR= pxeldr
|
|
|
|
ORG= 0x7c00
|
|
|
|
LOADER= loader
|
2000-03-28 01:19:53 +00:00
|
|
|
|
2000-11-30 14:55:10 +00:00
|
|
|
.if defined(BOOT_PXELDR_PROBE_KEYBOARD)
|
2004-02-11 08:42:38 +00:00
|
|
|
CFLAGS+=-DPROBE_KEYBOARD
|
2000-11-30 14:55:10 +00:00
|
|
|
.endif
|
2000-03-28 01:19:53 +00:00
|
|
|
|
2003-09-03 08:12:20 +00:00
|
|
|
.if defined(BOOT_PXELDR_ALWAYS_SERIAL)
|
2004-02-11 08:42:38 +00:00
|
|
|
CFLAGS+=-DALWAYS_SERIAL
|
2003-09-03 08:12:20 +00:00
|
|
|
.endif
|
|
|
|
|
2012-05-10 09:47:04 +00:00
|
|
|
CFLAGS+=-I${.CURDIR}/../common
|
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
LOADERBIN= ${.OBJDIR}/../loader/loader.bin
|
2000-03-28 01:19:53 +00:00
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
CLEANFILES+= ${BOOT}.tmp
|
2002-08-29 23:37:44 +00:00
|
|
|
|
2000-03-28 01:19:53 +00:00
|
|
|
${BOOT}: ${LDR} ${LOADER}
|
|
|
|
cat ${LDR} ${LOADER} > ${.TARGET}.tmp
|
|
|
|
dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
|
|
|
|
rm ${.TARGET}.tmp
|
|
|
|
|
2010-06-14 17:02:19 +00:00
|
|
|
LDFLAGS+=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary
|
2004-02-06 21:58:32 +00:00
|
|
|
|
|
|
|
CLEANFILES+= ${LOADER}
|
2000-11-30 14:55:10 +00:00
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
|
|
|
|
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
|
|
|
|
-b ${BTXKERN} ${LOADERBIN}
|
2000-03-28 01:19:53 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
2012-02-28 18:30:18 +00:00
|
|
|
|
|
|
|
# XXX: clang integrated-as doesn't grok .codeNN directives yet
|
|
|
|
CFLAGS.pxeldr.S= ${CLANG_NO_IAS}
|
|
|
|
CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
|