Makefile revision 3884
1# $Id: Makefile,v 1.3 1994/10/09 20:31:01 rgrimes Exp $ 2# 3 4FLOPPY= fd0 5FDLABEL= fd1200 6DDBS= 15k 7DDCOUNT= 80 8MNT= /mnt 9 10CPIO1= cat chmod cp date dd df echo ed expr hostname kill ln ls mkdir 11CPIO1+= mt mv pwd rcp rm rmdir sh sleep stty sync test [ -sh 12CPIO1+= badsect chown clri disklabel dump dmesg fdisk fsck ifconfig init 13CPIO1+= mknod mount newfs ping reboot restore swapon umount route 14CPIO1+= rdump rrestore halt 15CPIO1+= ftp rsh sed telnet rlogin 16 17# Somewhat on the rough side... 18CLEANFILES= * 19 20MTREE_DIR= ${.CURDIR}/../etc/mtree 21 22hierarchy: 23 mtree -deU -f ${MTREE_DIR}/BSD.root.dist -p ${DESTDIR}/ 24 mtree -deU -f ${MTREE_DIR}/BSD.var.dist -p ${DESTDIR}/var 25 mtree -deU -f ${MTREE_DIR}/BSD.usr.dist -p ${DESTDIR}/usr 26.if defined(MAKE_LOCAL) 27 mtree -deU -f ${MTREE_DIR}/BSD.local.dist -p ${DESTDIR}/usr/local 28.endif 29 rm -f ${DESTDIR}/sys 30 ln -s usr/src/sys ${DESTDIR}/sys 31 32kernel: ${.CURDIR}/../sys/i386/conf/GENERIC 33 (cd ${.CURDIR}/../sys/i386/conf; config GENERIC) 34 (cd ${.CURDIR}/../sys/compile/GENERIC; ${MAKE} depend; ${MAKE} all; ) 35 (cp ${.CURDIR}/../sys/compile/GENERIC/kernel .) 36.if defined(DESTDIR) && !empty(DESTDIR) 37 (cd ${.CURDIR}/../sys/compile/GENERIC; \ 38 install -c -o ${BINOWN} -g ${BINGRP} -m 755 kernel {DESTDIR}/kernel ) 39.else 40 echo "WARNING: GENERIC kernel not installed to /kernel" 41.endif 42 43boot.flp: 44 -umount ${MNT} 45 -umount /dev/${FLOPPY} 46 # echo y | fdformat ${FLOPPY} 47 disklabel -w -B \ 48 -b ${DESTDIR}/usr/mdec/fdboot -s ${DESTDIR}/usr/mdec/bootfd \ 49 /dev/r${FLOPPY} ${FDLABEL} 50 newfs -c 80 -b 4096 -f 512 /dev/r${FLOPPY} 51 mount -o async /dev/${FLOPPY} ${MNT} 52 mkdir ${MNT}/dev ${MNT}/stand ${MNT}/mnt 53 cp ${.CURDIR}/../sys/compile/GENERIC/kernel ${MNT}/kernel 54 cp ${DESTDIR}/usr/mdec/sdboot ${DESTDIR}/usr/mdec/bootsd ${MNT}/stand 55 ( cd ${DESTDIR}/dev ; \ 56 ls console tty null zero \ 57 sd[0123][a-h] wd[0123][a-h] fd[01] \ 58 rsd[0123][a-h] rwd[0123][a-h] rfd[01] \ 59 | cpio -dumpv ${MNT}/dev \ 60 ) 61 gzip -9 < boot_flp > ${MNT}/stand/sysinstall 62 chmod 755 ${MNT}/stand/sysinstall 63 ln ${MNT}/stand/sysinstall ${MNT}/stand/newfs 64 install -c -m 400 ${.CURDIR}/../COPYRIGHT ${MNT}/COPYRIGHT 65 install -c -m 400 ${.CURDIR}/../README ${MNT}/README 66 touch ${MNT}/this_is_boot_flp 67 -umount ${MNT} 68 fsck /dev/r${FLOPPY} 69 dd if=/dev/r${FLOPPY} bs=${DDBS} count=${DDCOUNT} of=boot.flp 70 gzip -9 -v < boot.flp > boot.flp.gz 71 ls -l boot.flp* 72 73cpio.flp: 74 for i in ${CPIO1} ; do rm -f ./$$i ; ln cpio_flp_1 ./$$i ; done 75 ls ${CPIO1} | cpio -H newc -oa | gzip -9 > cpio.flp 76 gzip -9 -v < cpio.flp > cpio.flp.gz 77 ls -l cpio.flp* 78 79crunch: 80 crunchgen ${.CURDIR}/boot_flp.conf 81 ${MAKE} -f boot_flp.mk objs exe 82 crunchgen ${.CURDIR}/cpio_flp_1.conf 83 ${MAKE} -f cpio_flp_1.mk objs exe 84 85floppies: kernel crunch boot.flp cpio.flp 86 87.include <bsd.prog.mk> 88