freebsd-dev/sys/boot/i386/pxeldr/Makefile
Peter Wemm 66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00

56 lines
1.1 KiB
Makefile

# $FreeBSD$
MAINTAINER=jhb@FreeBSD.org
ORG= 0x7c00
LDR= pxeldr
BOOT= pxeboot
LOADER= loader
PROG= ${BOOT}
MAN= ${BOOT}.8
STRIP=
BINDIR?= /boot
M4?= m4
.if defined(BOOT_PXELDR_PROBE_KEYBOARD)
M4FLAGS+= -DPROBE_KEYBOARD
.endif
.if exists(${.OBJDIR}/../loader)
LOADERBIN= ${.OBJDIR}/../loader/loader.bin
.else
LOADERBIN= ${.CURDIR}/../loader/loader.bin
.endif
# BTX components
.if exists(${.OBJDIR}/../btx)
BTXDIR= ${.OBJDIR}/../btx
.else
BTXDIR= ${.CURDIR}/../btx
.endif
BTXLDR= ${BTXDIR}/btxldr/btxldr
BTXKERN= ${BTXDIR}/btx/btx
BTXCRT= ${BTXDIR}/lib/crt0.o
${BOOT}: ${LDR} ${LOADER}
cat ${LDR} ${LOADER} > ${.TARGET}.tmp
dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
rm ${.TARGET}.tmp
${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} ${BTXCRT}
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-b ${BTXKERN} ${LOADERBIN}
${LDR}: ${LDR}.o
${LD} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o
objcopy -S -O binary ${LDR}.out ${.TARGET}
${LDR}.o: ${LDR}.s
(cd ${.CURDIR}; ${M4} ${M4FLAGS} ${LDR}.s) | \
${AS} ${AFLAGS} -o ${.TARGET}
CLEANFILES+= ${LDR} ${LDR}.out ${LDR}.o ${BOOT}.tmp ${LOADER}
.include <bsd.prog.mk>