1# $FreeBSD: head/sys/boot/i386/pxeldr/Makefile 125537 2004-02-06 21:58:32Z ru $
| 1# $FreeBSD: head/sys/boot/i386/pxeldr/Makefile 125621 2004-02-09 14:11:58Z ru $
|
2 3# Pick up ../Makefile.inc early. 4.include <bsd.init.mk> 5
| 2 3# Pick up ../Makefile.inc early. 4.include <bsd.init.mk> 5
|
| 6PROG= ${LDR}.out 7INTERNALPROG=
|
6FILES= ${BOOT} 7MAN= ${BOOT}.8
| 8FILES= ${BOOT} 9MAN= ${BOOT}.8
|
| 10SRCS= ${LDR}.s
|
8CLEANFILES= ${BOOT} 9 10BOOT= pxeboot 11LDR= pxeldr 12ORG= 0x7c00 13LOADER= loader 14M4?= m4 15 16.if defined(BOOT_PXELDR_PROBE_KEYBOARD) 17M4FLAGS+= -DPROBE_KEYBOARD 18.endif 19 20.if defined(BOOT_PXELDR_ALWAYS_SERIAL) 21M4FLAGS+= -DALWAYS_SERIAL 22.endif 23
| 11CLEANFILES= ${BOOT} 12 13BOOT= pxeboot 14LDR= pxeldr 15ORG= 0x7c00 16LOADER= loader 17M4?= m4 18 19.if defined(BOOT_PXELDR_PROBE_KEYBOARD) 20M4FLAGS+= -DPROBE_KEYBOARD 21.endif 22 23.if defined(BOOT_PXELDR_ALWAYS_SERIAL) 24M4FLAGS+= -DALWAYS_SERIAL 25.endif 26
|
24.if exists(${.OBJDIR}/../loader)
| |
25LOADERBIN= ${.OBJDIR}/../loader/loader.bin
| 27LOADERBIN= ${.OBJDIR}/../loader/loader.bin
|
26.else 27LOADERBIN= ${.CURDIR}/../loader/loader.bin 28.endif
| |
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
| 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
|
37CLEANFILES+= ${LDR} ${LDR}.out ${LDR}.o
| 36CLEANFILES+= ${LDR}
|
38 39${LDR}: ${LDR}.out 40 objcopy -S -O binary ${LDR}.out ${.TARGET} 41
| 37 38${LDR}: ${LDR}.out 39 objcopy -S -O binary ${LDR}.out ${.TARGET} 40
|
42${LDR}.out: ${LDR}.o 43 ${LD} -N -e start -Ttext ${ORG} -o ${.TARGET} ${LDR}.o
| 41LDFLAGS+= -N -e start -Ttext ${ORG}
|
44 45${LDR}.o: ${LDR}.s 46 (cd ${.CURDIR}; ${M4} ${M4FLAGS} ${LDR}.s) | \ 47 ${AS} ${AFLAGS} -o ${.TARGET} 48 49CLEANFILES+= ${LOADER} 50 51${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} 52 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 53 -b ${BTXKERN} ${LOADERBIN} 54 55.include <bsd.prog.mk>
| 42 43${LDR}.o: ${LDR}.s 44 (cd ${.CURDIR}; ${M4} ${M4FLAGS} ${LDR}.s) | \ 45 ${AS} ${AFLAGS} -o ${.TARGET} 46 47CLEANFILES+= ${LOADER} 48 49${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} 50 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 51 -b ${BTXKERN} ${LOADERBIN} 52 53.include <bsd.prog.mk>
|