xref: /freebsd/stand/i386/pxeldr/Makefile (revision ca987d4641cdcd7f27e153db17c5bf064934faf5)
1*ca987d46SWarner Losh# $FreeBSD$
2*ca987d46SWarner Losh
3*ca987d46SWarner Losh.include <bsd.init.mk>
4*ca987d46SWarner Losh
5*ca987d46SWarner LoshPROG=	${LDR}
6*ca987d46SWarner LoshINTERNALPROG=
7*ca987d46SWarner LoshFILES=	${BOOT}
8*ca987d46SWarner LoshMAN=	${BOOT}.8
9*ca987d46SWarner LoshSRCS=	${LDR}.S
10*ca987d46SWarner LoshCLEANFILES+= ${BOOT}
11*ca987d46SWarner Losh
12*ca987d46SWarner LoshBOOT=	pxeboot
13*ca987d46SWarner LoshLDR=	pxeldr
14*ca987d46SWarner LoshORG=	0x7c00
15*ca987d46SWarner LoshLOADER=	loader
16*ca987d46SWarner Losh
17*ca987d46SWarner Losh.if defined(BOOT_PXELDR_PROBE_KEYBOARD)
18*ca987d46SWarner LoshCFLAGS+=-DPROBE_KEYBOARD
19*ca987d46SWarner Losh.endif
20*ca987d46SWarner Losh
21*ca987d46SWarner Losh.if defined(BOOT_PXELDR_ALWAYS_SERIAL)
22*ca987d46SWarner LoshCFLAGS+=-DALWAYS_SERIAL
23*ca987d46SWarner Losh.endif
24*ca987d46SWarner Losh
25*ca987d46SWarner LoshCFLAGS+=-I${BOOTSRC}/i386/common
26*ca987d46SWarner Losh
27*ca987d46SWarner LoshLOADERBIN= ${BOOTOBJ}/i386/loader/loader.bin
28*ca987d46SWarner Losh
29*ca987d46SWarner LoshCLEANFILES+= ${BOOT}.tmp
30*ca987d46SWarner Losh
31*ca987d46SWarner Losh${BOOT}: ${LDR} ${LOADER}
32*ca987d46SWarner Losh	cat ${LDR} ${LOADER} > ${.TARGET}.tmp
33*ca987d46SWarner Losh	${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
34*ca987d46SWarner Losh	rm ${.TARGET}.tmp
35*ca987d46SWarner Losh
36*ca987d46SWarner LoshLDFLAGS+=${LDFLAGS_BIN}
37*ca987d46SWarner Losh
38*ca987d46SWarner LoshCLEANFILES+= ${LOADER}
39*ca987d46SWarner Losh
40*ca987d46SWarner Losh${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
41*ca987d46SWarner Losh	btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
42*ca987d46SWarner Losh	    -b ${BTXKERN} ${LOADERBIN}
43*ca987d46SWarner Losh
44*ca987d46SWarner Losh.include <bsd.prog.mk>
45*ca987d46SWarner Losh
46*ca987d46SWarner Losh# XXX: clang integrated-as doesn't grok .codeNN directives yet
47*ca987d46SWarner LoshCFLAGS.pxeldr.S=	${CLANG_NO_IAS}
48