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} bs=2048 conv=sync 35 rm ${.TARGET}.tmp 36 37LDFLAGS+=${LDFLAGS_BIN} 38 39CLEANFILES+= ${LOADER} 40 41# Note: pxeldr.S assumes a.out and will require changes for ELF if the output 42# format is changed to ELF. 43${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} 44 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 45 -b ${BTXKERN} ${LOADERBIN} 46 47.include <bsd.prog.mk> 48