1# $FreeBSD$ 2 3.include <bsd.init.mk> 4 5PROG= ${LDR} 6INTERNALPROG= 7FILES= ${BOOT} 8MAN= ${BOOT}.8 9SRCS= ${LDR}.S 10CLEANFILES+= ${BOOT} 11 12BOOT= pxeboot 13LDR= pxeldr 14ORG= 0x7c00 15LOADER= loader 16 17.if defined(BOOT_PXELDR_PROBE_KEYBOARD) 18CFLAGS+=-DPROBE_KEYBOARD 19.endif 20 21.if defined(BOOT_PXELDR_ALWAYS_SERIAL) 22CFLAGS+=-DALWAYS_SERIAL 23.endif 24 25CFLAGS+=-I${BOOTSRC}/i386/common 26 27LOADERBIN= ${BOOTOBJ}/i386/loader/loader.bin 28 29CLEANFILES+= ${BOOT}.tmp 30 31${BOOT}: ${LDR} ${LOADER} 32 cat ${LDR} ${LOADER} > ${.TARGET}.tmp 33 ${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync 34 rm ${.TARGET}.tmp 35 36LDFLAGS+=${LDFLAGS_BIN} 37 38CLEANFILES+= ${LOADER} 39 40${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} 41 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 42 -b ${BTXKERN} ${LOADERBIN} 43 44.include <bsd.prog.mk> 45 46# XXX: clang integrated-as doesn't grok .codeNN directives yet 47CFLAGS.pxeldr.S= ${CLANG_NO_IAS} 48