Makefile revision 4198
1# $Id: Makefile,v 1.17 1994/11/06 02:37:25 jkh 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 rcp rm rmdir sh sleep stty sync test [ -sh 12CPIO1+= badsect chown clri disklabel dump dmesg fdisk fsck ifconfig init 13CPIO1+= mknod mount mount_cd9660 mount_msdos mount_nfs ncftp newfs ping pwd 14CPIO1+= reboot restore slattach swapon umount route 15CPIO1+= rdump rrestore halt 16CPIO1+= ftp rsh sed telnet rlogin 17 18CPIO2= etc/services 19 20# Somewhat on the rough side... 21CLEANFILES+= *.o *.c *.cache *.mk *.lo ${CPIO1} *.flp *.gz 22CLEANFILES+= boot_flp cpio_flp_1 23 24MTREE_DIR= ${.CURDIR}/../etc/mtree 25 26hierarchy: 27 mtree -deU -f ${MTREE_DIR}/BSD.root.dist -p ${DESTDIR}/ 28 mtree -deU -f ${MTREE_DIR}/BSD.var.dist -p ${DESTDIR}/var 29 mtree -deU -f ${MTREE_DIR}/BSD.usr.dist -p ${DESTDIR}/usr 30.if defined(MAKE_LOCAL) 31 mtree -deU -f ${MTREE_DIR}/BSD.local.dist -p ${DESTDIR}/usr/local 32.endif 33 rm -f ${DESTDIR}/sys 34 ln -s usr/src/sys ${DESTDIR}/sys 35 36kernel: ${.CURDIR}/../sys/i386/conf/GENERIC 37 (cd ${.CURDIR}/../sys/i386/conf; config GENERIC) 38 (cd ${.CURDIR}/../sys/compile/GENERIC; ${MAKE} depend; ${MAKE} all; ) 39 40boot.flp: 41 -umount ${MNT} 42 -umount /dev/${FLOPPY} 43 echo y | fdformat ${FLOPPY} 44 disklabel -w -B \ 45 -b ${DESTDIR}/usr/mdec/fdboot -s ${DESTDIR}/usr/mdec/bootfd \ 46 /dev/r${FLOPPY} ${FDLABEL} 47 newfs -c 80 -b 4096 -f 512 -i 4096 -m 0 -o space /dev/r${FLOPPY} 48 mount -o async /dev/${FLOPPY} ${MNT} 49 mkdir ${MNT}/dev ${MNT}/stand ${MNT}/mnt 50 cp ${.CURDIR}/../sys/compile/GENERIC/kernel ${MNT}/kernel 51 cp ${DESTDIR}/usr/mdec/sdboot ${DESTDIR}/usr/mdec/bootsd ${MNT}/stand 52 ( cd ${DESTDIR}/dev ; \ 53 ls console tty ttyv1 null zero \ 54 sd[0123][a-h] wd[0123][a-h] fd[01] \ 55 rsd[0123][a-h] rwd[0123][a-h] rfd[01] \ 56 | cpio -dumpv ${MNT}/dev \ 57 ) 58 gzip -9 < boot_flp > ${MNT}/stand/sysinstall 59 chmod 755 ${MNT}/stand/sysinstall 60 ln ${MNT}/stand/sysinstall ${MNT}/stand/newfs 61 ln ${MNT}/stand/sysinstall ${MNT}/stand/gzip 62 install -m 500 -c ${.CURDIR}/bininst ${MNT}/stand/bininst 63 install -m 400 -c ${.CURDIR}/../COPYRIGHT ${MNT}/COPYRIGHT 64 install -m 400 -c ${.CURDIR}/../README ${MNT}/README 65 install -m 400 -c ${.CURDIR}/../share/FAQ/DISKSPACE.FAQ \ 66 ${MNT}/DISKSPACE.FAQ 67 install -m 400 -c ${.CURDIR}/../share/FAQ/RELNOTES.FreeBSD \ 68 ${MNT}/RELNOTES.FreeBSD 69 touch ${MNT}/this_is_boot_flp 70 -umount ${MNT} 71 fsck /dev/r${FLOPPY} 72 dd if=/dev/r${FLOPPY} bs=${DDBS} count=${DDCOUNT} of=boot.flp 73 gzip -9 -v < boot.flp > boot.flp.gz 74 ls -l boot.flp* 75 76cpio.flp: 77 ( cd /${DESTDIR} ; ls ${CPIO2} | cpio -H newc -oa ) | cpio -ivd 78 for i in ${CPIO1} ; do rm -f ./$$i ; ln cpio_flp_1 ./$$i ; done 79 ls ${CPIO1} ${CPIO2} | cpio -H newc -oa | gzip -9 > cpio.flp 80 gzip -9 -v < cpio.flp > cpio.flp.gz 81 ls -l cpio.flp* 82 83crunch: 84 crunchgen ${.CURDIR}/boot_flp.conf 85 ${MAKE} -f boot_flp.mk objs exe 86 crunchgen ${.CURDIR}/cpio_flp_1.conf 87 ${MAKE} -f cpio_flp_1.mk objs exe 88 89floppies: crunch boot.flp cpio.flp 90 91release20: 92 ( cd ${.CURDIR} ; ${MAKE} cleandist) 93 ( cd ${.CURDIR} ; ${MAKE} obj) 94 -mkdir ${RELEASEDIR} 95 chflags -R noschg ${RELEASEDIR}/. 96 rm -rf ${RELEASEDIR}/* 97 ( cd ${.CURDIR}/.. ; \ 98 ${MAKE} world NOCRYPT=yes) 99 ( cd ${.CURDIR}/../etc ; \ 100 ${MAKE} release-dirs ) 101 ( cd ${.CURDIR} ; \ 102 ${MAKE} kernel DESTDIR=${RELEASEDIR}/filesys ) 103 install ${COPY} -m 644 ${.CURDIR}/../sys/compile/GENERIC/kernel \ 104 ${RELEASEDIR}/filesys/kernel 105 ( cd ${.CURDIR} ; \ 106 ${MAKE} hierarchy DESTDIR=${RELEASEDIR}/filesys ) 107 ( cd ${.CURDIR}/../etc ; \ 108 ${MAKE} distribution DESTDIR=${RELEASEDIR}/filesys \ 109 NOCRYPT=yes SHARED=copies) 110 ( cd ${.CURDIR}/../etc ; \ 111 ${MAKE} bin-tarball DESTDIR=${RELEASEDIR}/filesys ) 112 ( cd ${.CURDIR} ; \ 113 ${MAKE} floppies ) 114 115.include <bsd.prog.mk> 116