Consolidate most constant memory addresses in bootasm.h part1/2. Convert
[dragonfly.git] / sys / boot / i386 / pxeldr / Makefile
CommitLineData
5ee58eed 1# $FreeBSD: src/sys/boot/i386/pxeldr/Makefile,v 1.9 2003/09/03 08:12:20 phk Exp $
409cbc03 2# $DragonFly: src/sys/boot/i386/pxeldr/Attic/Makefile,v 1.5 2004/07/18 23:40:09 dillon Exp $
984263bc
MD
3
4ORG= 0x7c00
5
6LDR= pxeldr
7BOOT= pxeboot
5ee58eed 8LOADER= loader
984263bc
MD
9PROG= ${BOOT}
10MAN= ${BOOT}.8
11STRIP=
12BINDIR?= /boot
984263bc
MD
13
14.if defined(BOOT_PXELDR_PROBE_KEYBOARD)
409cbc03 15AFLAGS+= -DPROBE_KEYBOARD
984263bc
MD
16.endif
17
5ee58eed 18.if defined(BOOT_PXELDR_ALWAYS_SERIAL)
409cbc03 19AFLAGS+= -DALWAYS_SERIAL
5ee58eed
MD
20.endif
21
22
984263bc 23.if exists(${.OBJDIR}/../loader)
5ee58eed 24LOADERBIN= ${.OBJDIR}/../loader/loader.bin
984263bc 25.else
5ee58eed 26LOADERBIN= ${.CURDIR}/../loader/loader.bin
984263bc
MD
27.endif
28
5ee58eed
MD
29# BTX components
30.if exists(${.OBJDIR}/../btx)
31BTXDIR= ${.OBJDIR}/../btx
32.else
33BTXDIR= ${.CURDIR}/../btx
34.endif
35BTXLDR= ${BTXDIR}/btxldr/btxldr
36BTXKERN= ${BTXDIR}/btx/btx
37BTXCRT= ${BTXDIR}/lib/crt0.o
38
984263bc
MD
39${BOOT}: ${LDR} ${LOADER}
40 cat ${LDR} ${LOADER} > ${.TARGET}.tmp
41 dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
42 rm ${.TARGET}.tmp
43
5ee58eed
MD
44${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} ${BTXCRT}
45 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
46 -b ${BTXKERN} ${LOADERBIN}
47
984263bc 48${LDR}: ${LDR}.o
984263bc
MD
49 ${LD} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o
50 objcopy -S -O binary ${LDR}.out ${.TARGET}
984263bc 51
409cbc03
MD
52${LDR}.o: ${LDR}.S
53 ${CC} ${CFLAGS} ${AFLAGS} ${.IMPSRC} -o ${LDR}.o -c
984263bc 54
5ee58eed 55CLEANFILES+= ${LDR} ${LDR}.out ${LDR}.o ${BOOT}.tmp ${LOADER}
984263bc
MD
56
57.include <bsd.prog.mk>