1999-02-13 05:54:17 +03:00
|
|
|
# $NetBSD: Makefile,v 1.4 1999/02/13 02:54:48 lukem 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
|
1999-01-22 17:05:05 +03:00
|
|
|
SRCS= start.S boot.c bootconf.c filesystem.c
|
|
|
|
CLEANFILES+=${PROG}.elf ${PROG}.map bootconf.c ${ALL}
|
|
|
|
|
|
|
|
DPADD+= ${LIBS}
|
1999-02-13 05:54:17 +03:00
|
|
|
MKMAN= no
|
1999-01-21 17:16:52 +03:00
|
|
|
LDBUG= -T $S/arch/mips/conf/stand.ldscript
|
1999-01-21 15:33:39 +03:00
|
|
|
|
1999-01-22 17:05:05 +03:00
|
|
|
# Tell boot code which drivers we want to link against
|
|
|
|
SRCS+= rz.c
|
|
|
|
|
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-22 17:05:05 +03:00
|
|
|
${PROG}: ${LIBS}
|
1999-01-21 15:33:39 +03:00
|
|
|
|
1999-01-22 17:05:05 +03:00
|
|
|
# before other deps on bootconf.o
|
|
|
|
bootconf.c: ${.CURDIR}/conf.c
|
1999-01-21 15:33:39 +03:00
|
|
|
ln -s ${.CURDIR}/conf.c bootconf.c
|
1999-01-22 17:05:05 +03:00
|
|
|
|
|
|
|
bootconf.o: ${.CURDIR}/conf.c
|
|
|
|
${CC} -c ${CFLAGS} ${CPPFLAGS} -DBOOT bootconf.c
|
1999-01-21 15:33:39 +03:00
|
|
|
|
|
|
|
# bootable from real disks
|
1999-01-22 17:05:05 +03:00
|
|
|
${PROG}: ${OBJS} ${LIBS}
|
|
|
|
ld -Map ${PROG}.map -N -Ttext ${RELOC} ${LDBUG} -e start \
|
|
|
|
${OBJS} ${LIBS} -o ${PROG}.elf
|
|
|
|
elf2aout ${PROG}.elf ${PROG}
|
1999-01-21 15:33:39 +03:00
|
|
|
|
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
|
|
|
|
|
1999-01-22 17:05:05 +03:00
|
|
|
rzboot bootrz: mkboot ${PROG}
|
|
|
|
./mkboot ${PROG} rzboot bootrz
|
1999-01-21 15:33:39 +03:00
|
|
|
|
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 <bsd.prog.mk>
|
1999-01-22 17:05:05 +03:00
|
|
|
.include "../Makefile.inc" # XXX after <bsd.prog.mk> to reset CFLAGS, etc
|
|
|
|
.include "../Makefile.booters"
|