1ca987d46SWarner Losh# $FreeBSD$ 2ca987d46SWarner Losh 3ca987d46SWarner Losh.include <bsd.init.mk> 4ca987d46SWarner Losh 5ca987d46SWarner LoshPROG= ${LDR} 6ca987d46SWarner LoshINTERNALPROG= 7ca987d46SWarner LoshFILES= ${BOOT} 8ca987d46SWarner LoshMAN= ${BOOT}.8 9ca987d46SWarner LoshSRCS= ${LDR}.S 10ca987d46SWarner LoshCLEANFILES+= ${BOOT} 11ca987d46SWarner Losh 12ca987d46SWarner LoshBOOT= pxeboot 13ca987d46SWarner LoshLDR= pxeldr 14ca987d46SWarner LoshORG= 0x7c00 15ca987d46SWarner LoshLOADER= loader 16ca987d46SWarner Losh 17ca987d46SWarner Losh.if defined(BOOT_PXELDR_PROBE_KEYBOARD) 18ca987d46SWarner LoshCFLAGS+=-DPROBE_KEYBOARD 19ca987d46SWarner Losh.endif 20ca987d46SWarner Losh 21ca987d46SWarner Losh.if defined(BOOT_PXELDR_ALWAYS_SERIAL) 22ca987d46SWarner LoshCFLAGS+=-DALWAYS_SERIAL 23ca987d46SWarner Losh.endif 24ca987d46SWarner Losh 25ca987d46SWarner LoshCFLAGS+=-I${BOOTSRC}/i386/common 26ca987d46SWarner Losh 279d45c24cSWarner LoshL=${LOADER_DEFAULT_INTERP} 289d45c24cSWarner LoshLOADERBIN= ${BOOTOBJ}/i386/loader_${L}/loader_${L}.bin 29ca987d46SWarner Losh 30ca987d46SWarner LoshCLEANFILES+= ${BOOT}.tmp 31ca987d46SWarner Losh 32ca987d46SWarner Losh${BOOT}: ${LDR} ${LOADER} 33ca987d46SWarner Losh cat ${LDR} ${LOADER} > ${.TARGET}.tmp 34*87c5e64cSAlex Richardson ${DD} if=${.TARGET}.tmp of=${.TARGET} bs=2048 conv=sync 35ca987d46SWarner Losh rm ${.TARGET}.tmp 36ca987d46SWarner Losh 37ca987d46SWarner LoshLDFLAGS+=${LDFLAGS_BIN} 38ca987d46SWarner Losh 39ca987d46SWarner LoshCLEANFILES+= ${LOADER} 40ca987d46SWarner Losh 41ca987d46SWarner Losh${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} 42ca987d46SWarner Losh btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 43ca987d46SWarner Losh -b ${BTXKERN} ${LOADERBIN} 44ca987d46SWarner Losh 45ca987d46SWarner Losh.include <bsd.prog.mk> 46