NetBSD/distrib/sun3/ramdisk/Makefile

82 lines
2.0 KiB
Makefile
Raw Normal View History

1999-04-22 08:32:12 +04:00
# $NetBSD: Makefile,v 1.8 1999/04/22 04:32:12 gwr Exp $
TOP= ${.CURDIR}/..
# This include just sets REV=XX
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk
CBIN= rd_bin
TREE= ${TOP}/common/${IMAGE}.tree
LISTS= ${TOP}/common/${CBIN}.list \
${TOP}/common/${IMAGE}.list
KERNEL3 = ${SRCSYSDIR}/arch/sun3/compile/RAMDISK/netbsd
KERNEL3X= ${SRCSYSDIR}/arch/sun3/compile/RAMDISK3X/netbsd
1995-11-22 00:18:48 +03:00
MOUNT_POINT= /mnt
#BDEV= /dev/md0
#CDEV= /dev/md0
BDEV= /dev/sd1b
CDEV= /dev/rsd1b
# These are all the parameters for the root fs: (256K)
1995-11-22 00:18:48 +03:00
DISKTYPE= rdroot
NBLKS= 512
1995-11-22 00:18:48 +03:00
# old format, minfree, opt, b/i trks, sects, cpg
1999-04-22 08:32:12 +04:00
NEWFSARGS= -B be -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16
CLEANFILES= netbsd-rd.sun3 netbsd-rd.sun3x rdsetroot ${IMAGE}.fs
all: netbsd-rd.sun3 netbsd-rd.sun3x
netbsd-rd.sun3 : rdsetroot ${IMAGE}.fs
cp ${KERNEL3} netbsd-tmp
./rdsetroot netbsd-tmp < ${IMAGE}.fs
-mv -f netbsd-tmp $@
netbsd-rd.sun3x : rdsetroot ${IMAGE}.fs
cp ${KERNEL3X} netbsd-tmp
./rdsetroot netbsd-tmp < ${IMAGE}.fs
-mv -f netbsd-tmp $@
rdsetroot: ${TOP}/common/rdsetroot.c
$(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c
1995-11-22 00:18:48 +03:00
${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN}
1999-04-22 08:32:12 +04:00
-newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
1995-11-22 00:18:48 +03:00
mount ${BDEV} ${MOUNT_POINT}
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${.CURDIR} \
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
sh ${TOP}/common/RunList.sh ${LISTS}
sync
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
-umount ${MOUNT_POINT}
dd if=${CDEV} of=$@ bs=16b \
count=`expr ${NBLKS} / 16`
1995-10-13 19:51:28 +03:00
# Do not delete this if I change my mind and kill make...
.PRECIOUS: ${IMAGE}.fs
# Rules for making ${CBIN} ...
.include "${TOP}/common/Make.crunch"
1995-11-22 00:18:48 +03:00
# This is listed in rd_bin.conf but is built here.
${CBIN} : libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC=${TOP}/../utils/libhack
.include "${HACKSRC}/Makefile.inc"
1998-09-05 18:46:13 +04:00
clean cleandir distclean:
1995-10-13 19:51:28 +03:00
-rm -f a.out core *.core *.o
-rm -f ${CLEANFILES}
# Standard rules needed by the above...
.include <bsd.obj.mk>