1996-06-26 21:44:21 +04:00
|
|
|
# $NetBSD: Makefile,v 1.20 1996/06/26 17:44:21 thorpej Exp $
|
1994-10-26 10:22:45 +03:00
|
|
|
|
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/10/93
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1995-08-04 11:55:34 +04:00
|
|
|
NOPROG= noprog
|
|
|
|
NOMAN= noman
|
|
|
|
|
|
|
|
SUBDIR= libsa
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
|
|
|
|
RELOC= FFF00000
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1995-02-21 12:16:34 +03:00
|
|
|
CONS= -DDCACONSOLE -DITECONSOLE -DDCMCONSOLE
|
|
|
|
DEFS= -DSTANDALONE -DCOMPAT_NOLABEL ${CONS} -Dhp300 # -DROMPRF
|
1995-09-02 09:04:14 +04:00
|
|
|
#DEFS+= -DNETIF_DEBUG -DRPC_DEBUG -DNFS_DEBUG -DRARP_DEBUG -DNET_DEBUG
|
|
|
|
#DEFS+= -DLE_DEBUG
|
1995-02-19 22:17:01 +03:00
|
|
|
CFLAGS= -O3 ${INCPATH} ${DEFS}
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1995-02-19 22:17:01 +03:00
|
|
|
SRCS= autoconf.c cons.c devopen.c machdep.c prf.c
|
|
|
|
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
|
|
|
DSRCS= ct.c dca.c dcm.c fhpib.c hil.c hpib.c if_le.c \
|
1994-06-19 05:49:49 +04:00
|
|
|
ite.c ite_dv.c ite_gb.c ite_rb.c ite_subr.c ite_tc.c ite_hy.c \
|
1994-01-26 05:38:16 +03:00
|
|
|
nhpib.c rd.c scsi.c sd.c
|
1995-02-19 22:17:01 +03:00
|
|
|
DOBJS= ${DSRCS:N*.h:R:S/$/.o/g}
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
S= ${.CURDIR}/../../..
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
|
1995-08-04 11:55:34 +04:00
|
|
|
.PATH: ${S}/stand
|
1994-01-26 05:38:16 +03:00
|
|
|
|
|
|
|
INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
|
|
|
|
### find out what to use for libkern
|
1995-08-04 11:55:34 +04:00
|
|
|
KERNREL=
|
1994-01-26 05:38:16 +03:00
|
|
|
.include "$S/lib/libkern/Makefile.inc"
|
|
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
|
1995-08-04 11:55:34 +04:00
|
|
|
.include "${.CURDIR}/libsa/Makefile.inc"
|
1994-01-26 05:38:16 +03:00
|
|
|
LIBSA= ${SA_LIB}
|
|
|
|
|
1995-02-19 22:17:01 +03:00
|
|
|
LIBS= ${OBJS} libdrive.a ${LIBSA} ${LIBKERN}
|
1994-01-26 05:38:16 +03:00
|
|
|
|
1996-06-26 21:44:21 +04:00
|
|
|
BOOTS= uboot inst
|
1994-01-26 05:38:16 +03:00
|
|
|
ALL= ${BOOTS} mkboot installboot
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
all: ${ALL}
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
${BOOTS}: ${LIBS}
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1995-02-19 22:17:01 +03:00
|
|
|
libdrive.a: ${DOBJS}
|
1994-09-19 04:23:36 +04:00
|
|
|
rm -f $@
|
1995-02-19 22:17:01 +03:00
|
|
|
${AR} cq $@ ${DOBJS}
|
1994-09-19 04:23:36 +04:00
|
|
|
${RANLIB} $@
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
# depend on DEFS
|
|
|
|
|
|
|
|
devopen.o machdep.o srt0.o: Makefile
|
|
|
|
cons.o dca.o hil.o: Makefile
|
|
|
|
ite.o ite_subr.o ite_dv.o ite_gb.o ite_hy.o ite_rb.o ite_tc.o: Makefile
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
# startups
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
srt0.o: ${.CURDIR}/srt0.s
|
|
|
|
${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.s
|
|
|
|
|
1996-06-26 21:44:21 +04:00
|
|
|
# unified boot program (disk, network, tape)
|
|
|
|
uboot: srt0.o uboot.o tgets.o netio.o clock.o conf.o ${LIBS}
|
|
|
|
${LD} -N -T ${RELOC} -e begin srt0.o uboot.o tgets.o netio.o clock.o \
|
|
|
|
conf.o ${LIBS} -o $@
|
1995-09-23 21:40:54 +04:00
|
|
|
@size $@
|
|
|
|
@echo $@ total size should not exceed 1044480 bytes
|
|
|
|
|
1996-06-26 21:44:21 +04:00
|
|
|
# miniroot installation program
|
|
|
|
inst: srt0.o inst.o clock.o conf.o netio.o tgets.o ${LIBS}
|
|
|
|
${LD} -N -T ${RELOC} -e begin srt0.o inst.o clock.o conf.o netio.o \
|
|
|
|
tgets.o ${LIBS} -o $@
|
1995-02-19 22:17:01 +03:00
|
|
|
@size $@
|
|
|
|
@echo $@ total size should not exceed 1044480 bytes
|
1995-09-23 21:40:54 +04:00
|
|
|
|
1996-06-26 21:44:21 +04:00
|
|
|
# helper program ... turns OMAGIC into LIF
|
1994-01-26 05:38:16 +03:00
|
|
|
mkboot: ${.CURDIR}/mkboot.c
|
1995-02-19 22:17:01 +03:00
|
|
|
${CC} ${CFLAGS} ${.CURDIR}/mkboot.c -o $@
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-08-04 23:42:16 +04:00
|
|
|
installboot: ${.CURDIR}/installboot.sh
|
|
|
|
@rm -f installboot
|
|
|
|
cp -p ${.CURDIR}/installboot.sh installboot
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
# utilities
|
|
|
|
|
1995-08-04 11:55:34 +04:00
|
|
|
clean::
|
1996-06-26 21:44:21 +04:00
|
|
|
rm -f *.o *.i
|
|
|
|
rm -f a.out ${BOOTS}
|
|
|
|
rm -f libdrive.a mkboot installboot *.lif
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
install: mkboot installboot ${ALL}
|
1996-06-26 21:44:21 +04:00
|
|
|
./mkboot uboot uboot.lif
|
|
|
|
./mkboot inst inst.lif
|
|
|
|
install -d -m 755 -o ${BINOWN} -g ${BINGRP} ${DESTDIR}/usr/mdec/rbootd
|
1996-01-15 04:41:37 +03:00
|
|
|
install -c -o ${BINOWN} -g ${BINGRP} -m 555 installboot \
|
|
|
|
${DESTDIR}/usr/mdec
|
1996-06-26 21:44:21 +04:00
|
|
|
install -c -o ${BINOWN} -g ${BINGRP} -m 444 uboot.lif \
|
|
|
|
${DESTDIR}/usr/mdec
|
|
|
|
rm -f ${DESTDIR}/usr/mdec/rdboot
|
|
|
|
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/rdboot
|
1994-01-26 05:38:16 +03:00
|
|
|
rm -f ${DESTDIR}/usr/mdec/bootrd
|
1996-06-26 21:44:21 +04:00
|
|
|
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootrd
|
1994-01-26 05:38:16 +03:00
|
|
|
rm -f ${DESTDIR}/usr/mdec/sdboot
|
1996-06-26 21:44:21 +04:00
|
|
|
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/sdboot
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f ${DESTDIR}/usr/mdec/bootsd
|
1996-06-26 21:44:21 +04:00
|
|
|
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootsd
|
|
|
|
rm -f ${DESTDIR}/usr/mdec/ctboot
|
|
|
|
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/ctboot
|
|
|
|
rm -f ${DESTDIR}/usr/mdec/bootct
|
|
|
|
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootct
|
|
|
|
rm -f ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT
|
|
|
|
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT
|
|
|
|
install -c -o ${BINOWN} -g ${BINGRP} -m 444 inst.lif \
|
1996-01-15 04:41:37 +03:00
|
|
|
${DESTDIR}/usr/mdec/rbootd/SYS_INST
|
1994-01-26 05:38:16 +03:00
|
|
|
|
1995-08-04 11:55:34 +04:00
|
|
|
.include <bsd.prog.mk>
|
1994-08-15 10:42:04 +04:00
|
|
|
.include <bsd.subdir.mk>
|