1994-10-27 00:08:38 +03:00
|
|
|
# $NetBSD: Makefile.booters,v 1.4 1994/10/26 21:10:48 cgd Exp $
|
|
|
|
# @(#)Makefile 8.3 (Berkeley) 2/16/94
|
1993-10-12 06:22:19 +03:00
|
|
|
|
|
|
|
DESTDIR=
|
|
|
|
STAND= ../../stand
|
1994-05-27 12:40:50 +04:00
|
|
|
INCPATH=-I. -I/sys
|
1993-10-12 06:22:19 +03:00
|
|
|
VPATH= ${STAND}
|
|
|
|
|
|
|
|
# RELOC=80200000 allows for boot prog up to 1D0000 (1900544) bytes long
|
|
|
|
RELOC= 80200000
|
|
|
|
|
1994-05-27 12:40:50 +04:00
|
|
|
DEFS= -DSTANDALONE -DSMALL
|
|
|
|
CFLAGS= -O2 ${INCPATH} ${DEFS}
|
|
|
|
AFLAGS= -O2 ${INCPATH} ${DEFS} -DLOCORE
|
1993-10-12 06:22:19 +03:00
|
|
|
|
|
|
|
DRIVERS= rz.c
|
|
|
|
SRCS= ${DRIVERS}
|
|
|
|
LIBS= libdrive.a libsa/libsa.a ../../libkern/obj/libkern.a
|
|
|
|
|
1994-05-27 12:40:50 +04:00
|
|
|
ALL= boot mkboot mkboottape dec_label
|
1993-10-12 06:22:19 +03:00
|
|
|
|
|
|
|
.s.o:
|
|
|
|
${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
|
|
|
|
${AS} -o ${.TARGET}
|
|
|
|
|
|
|
|
all: ${ALL}
|
|
|
|
|
|
|
|
boot: ${LIBS}
|
|
|
|
|
|
|
|
libsa/libsa.a::
|
|
|
|
cd libsa; make
|
|
|
|
|
|
|
|
libdrive.a: conf.o ${DRIVERS:.c=.o}
|
|
|
|
ar crv $@ $?
|
|
|
|
ranlib $@
|
|
|
|
|
|
|
|
# depend on DEFS
|
|
|
|
|
|
|
|
# bootable from real disks
|
|
|
|
|
|
|
|
boot: start.o boot.o bootconf.o ${LIBS}
|
|
|
|
ld -N -Ttext ${RELOC} -e start start.o boot.o bootconf.o ${LIBS} -o $@
|
|
|
|
|
|
|
|
start.o: start.s
|
|
|
|
${CPP} -E ${CFLAGS:M-[ID]*} -DLOCORE ${AINC} ${.IMPSRC} | \
|
|
|
|
${AS} -o ${.TARGET}
|
|
|
|
|
|
|
|
bootconf.o: conf.o
|
|
|
|
rm -f bootconf.c
|
|
|
|
ln -s conf.c bootconf.c
|
|
|
|
${CC} -c ${CFLAGS} -DBOOT bootconf.c
|
|
|
|
rm -f bootconf.c
|
|
|
|
|
|
|
|
mkboot: mkboot.c
|
|
|
|
${CC} ${CFLAGS} -o mkboot mkboot.c
|
|
|
|
|
|
|
|
mkboottape: mkboottape.c
|
|
|
|
${CC} ${CFLAGS} -o mkboottape mkboottape.c
|
|
|
|
|
1994-05-27 12:40:50 +04:00
|
|
|
dec_label: dec_label.c
|
|
|
|
${CC} ${CFLAGS} -o dec_label dec_label.c
|
|
|
|
|
1993-10-12 06:22:19 +03:00
|
|
|
# utilities
|
|
|
|
|
|
|
|
clean cleandir:
|
|
|
|
rm -f .depend *.o *.exe *.i errs make.out core*
|
1994-05-27 12:40:50 +04:00
|
|
|
rm -f a.out ${ALL}
|
1993-10-12 06:22:19 +03:00
|
|
|
rm -f boot[a-z][a-z] [a-z][a-z]boot
|
1994-05-27 12:40:50 +04:00
|
|
|
rm -f libdrive.a
|
1993-10-12 06:22:19 +03:00
|
|
|
cd libsa; make cleandir
|
|
|
|
|
|
|
|
install:
|
|
|
|
./mkboot boot rzboot bootrz
|
1994-05-27 12:40:50 +04:00
|
|
|
install -o bin -g bin -m 444 rzboot ${DESTDIR}/usr/mdec
|
|
|
|
install -o bin -g bin -m 444 bootrz ${DESTDIR}/usr/mdec
|
1993-10-12 06:22:19 +03:00
|
|
|
|
|
|
|
depend: ${SRCS}
|
|
|
|
mkdep ${INCPATH} ${DEFS} ${SRCS}
|
|
|
|
mkdep -a -p ${INCPATH} ${DEFS} mkboot.c mkboottape.c
|
|
|
|
cd libsa; make depend
|