freebsd-dev/sys/boot/i386/liloldr/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

43 lines
930 B
Makefile

# $FreeBSD$
ORG= 0x0
LDR= liloldr
BSECT= lilobsect
BOOT= liloboot
PROG= ${BOOT}
NOMAN= 1
STRIP=
BINDIR?= /boot
.if exists(${.OBJDIR}/../loader)
LOADER= ${.OBJDIR}/../loader/loader
.else
LOADER= ${.CURDIR}/../loader/loader
.endif
.if exists(${LOADER})
LOADER_SIZE != wc -c ${LOADER} | awk '{print int(($$1 + 15) / 16)}'
AFLAGS= --defsym LOADER_SIZE=${LOADER_SIZE}
.endif
${BOOT}: ${BSECT} ${LDR} ${LOADER}
cat ${BSECT} ${LDR} ${LOADER} > ${.TARGET}.tmp
dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
rm ${.TARGET}.tmp
${LDR}: ${LDR}.o
${LD} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o
objcopy -S -O binary ${LDR}.out ${.TARGET}
${BSECT}: ${BSECT}.o
${LD} -N -e start -Ttext ${ORG} -o ${BSECT}.out ${BSECT}.o
objcopy -S -O binary ${BSECT}.out ${.TARGET}
${BSECT}.o: ${BSECT}.s ${LOADER}
CLEANFILES+= ${LDR} ${LDR}.out ${LDR}.o \
${BSECT} ${BSECT}.out ${BSECT}.o ${BOOT}.tmp
.include <bsd.prog.mk>