1999-01-21 17:16:52 +03:00
|
|
|
# $NetBSD: Makefile,v 1.2 1999/01/21 14:16:52 simonb Exp $
|
1999-01-21 15:33:39 +03:00
|
|
|
# @(#)Makefile 8.3 (Berkeley) 2/16/94
|
|
|
|
|
|
|
|
|
1999-01-21 17:16:52 +03:00
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
PROG= boot
|
|
|
|
NOMAN= noman # XXX: Should have one
|
|
|
|
LDBUG= -T $S/arch/mips/conf/stand.ldscript
|
1999-01-21 15:33:39 +03:00
|
|
|
|
|
|
|
|
|
|
|
ALL= boot mkboot rzboot bootrz
|
|
|
|
#ALL+= mkboottape XXX not used now
|
|
|
|
|
1999-01-21 17:16:52 +03:00
|
|
|
all: ${ALL}
|
1999-01-21 15:33:39 +03:00
|
|
|
|
1999-01-21 17:16:52 +03:00
|
|
|
boot: ${LIBS}
|
|
|
|
DPADD+= ${LIBS}
|
1999-01-21 15:33:39 +03:00
|
|
|
|
1999-01-21 17:16:52 +03:00
|
|
|
.PATH: ${.CURDIR}/../libsa
|
1999-01-21 15:33:39 +03:00
|
|
|
|
|
|
|
# Tell boot code which drivers we want to link against
|
1999-01-21 17:16:52 +03:00
|
|
|
DRIVERS=rz.c
|
|
|
|
LIBS+= libdrive.a
|
1999-01-21 15:33:39 +03:00
|
|
|
|
|
|
|
|
|
|
|
#before other deps on bootconf.o
|
|
|
|
bootconf.o: ${.CURDIR}/conf.c
|
|
|
|
rm -f bootconf.c
|
|
|
|
ln -s ${.CURDIR}/conf.c bootconf.c
|
|
|
|
${CC} -c ${CFLAGS} -DBOOT bootconf.c
|
|
|
|
rm -f bootconf.c
|
|
|
|
|
|
|
|
|
|
|
|
# bootable from real disks
|
|
|
|
|
|
|
|
boot: start.o boot.o bootconf.o filesystem.o ${LIBS}
|
1999-01-21 17:16:52 +03:00
|
|
|
ld -Map boot.map -N -Ttext ${RELOC} ${LDBUG} -e start \
|
|
|
|
start.o boot.o bootconf.o filesystem.o ${LIBS} -o boot.elf
|
1999-01-21 15:33:39 +03:00
|
|
|
elf2aout boot.elf boot
|
|
|
|
|
|
|
|
start.o: ${.CURDIR}/start.S
|
|
|
|
|
1999-01-21 17:16:52 +03:00
|
|
|
mkboot: ${.CURDIR}/mkboot.c
|
1999-01-21 15:33:39 +03:00
|
|
|
${CC} ${CPPFLAGS} ${INCPATH} -o mkboot ${.CURDIR}/mkboot.c
|
|
|
|
|
|
|
|
mkboottape: ${.CURDIR}/mkboottape.c
|
|
|
|
${CC} ${CPPFLAGS} ${INCPATH} -o mkboottape ${.CURDIR}/mkboottape.c
|
|
|
|
|
|
|
|
rzboot bootrz: mkboot boot
|
|
|
|
./mkboot boot rzboot bootrz
|
|
|
|
|
|
|
|
# utilities
|
|
|
|
|
|
|
|
clean cleandir:
|
|
|
|
rm -f .depend *.o *.exe *.i errs make.out core*
|
|
|
|
rm -f a.out boot.elf ${ALL}
|
|
|
|
rm -f boot[a-z][a-z] [a-z][a-z]boot
|
|
|
|
rm -f libdrive.a
|
|
|
|
rm -f boot.map
|
|
|
|
|
1999-01-21 17:16:52 +03:00
|
|
|
proginstall:: bootrz rzboot
|
|
|
|
@echo "Sorry, bootblocks too large to install"
|
|
|
|
# ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
|
|
|
# ${.ALLSRC} ${DESTDIR}${BINDIR}
|
1999-01-21 15:33:39 +03:00
|
|
|
|
|
|
|
.include "../Makefile.booters"
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.include "../Makefile.inc" # XXX after to reset CFLAGS, etc
|