freebsd-dev/sys/boot/i386/boot0/Makefile
Robert Nordier 4025ae9d2a Get this building as a.out or ELF.
With thanks to: jdp
1998-10-09 17:19:51 +00:00

28 lines
537 B
Makefile

# $Id: Makefile,v 1.2 1998/10/05 19:20:36 rnordier Exp $
PROG= boot0
NOMAN=
STRIP=
BINDIR?= /boot
M4?= m4
ORG= 0x600
boot0: boot0.o
.if ${OBJFORMAT} == aout
${LD} -N -s -T ${ORG} -o boot0.out boot0.o
dd if=boot0.out of=${.TARGET} ibs=32 skip=1
.else
${LD} -N -e start -Ttext ${ORG} -o boot0.out boot0.o
/usr/libexec/elf/objcopy -S -O binary boot0.out ${.TARGET}
.endif
boot0.o: boot0.m4 boot0.s
(cd ${.CURDIR}; ${M4} boot0.m4 boot0.s) | \
${AS} ${AFLAGS} -o ${.TARGET}
CLEANFILES+= boot0.out boot0.o
.include <bsd.prog.mk>