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 27L=${LOADER_DEFAULT_INTERP} 28LOADERBIN= ${BOOTOBJ}/i386/loader_${L}/loader_${L}.bin 29 30CLEANFILES+= ${BOOT}.tmp 31 32${BOOT}: ${LDR} ${LOADER} 33 cat ${LDR} ${LOADER} > ${.TARGET}.tmp 34 ${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync 35 rm ${.TARGET}.tmp 36 37LDFLAGS+=${LDFLAGS_BIN} 38 39CLEANFILES+= ${LOADER} 40 41${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} 42 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 43 -b ${BTXKERN} ${LOADERBIN} 44 45.include <bsd.prog.mk> 46 47# XXX: clang integrated-as doesn't grok .codeNN directives yet 48CFLAGS.pxeldr.S= ${CLANG_NO_IAS} 49