Makefile revision 4184
1# $Id: Makefile,v 1.14 1994/11/06 00:10:00 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 pwd 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 reboot 14CPIO1+= 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+= root_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 strip -x ${.CURDIR}/../sys/compile/GENERIC/kernel 51 cp ${.CURDIR}/../sys/compile/GENERIC/kernel ${MNT}/kernel 52 cp ${DESTDIR}/usr/mdec/sdboot ${DESTDIR}/usr/mdec/bootsd ${MNT}/stand 53 ( cd ${DESTDIR}/dev ; \ 54 ls console tty ttyv1 null zero \ 55 sd[0123][a-h] wd[0123][a-h] fd[01] \ 56 rsd[0123][a-h] rwd[0123][a-h] rfd[01] \ 57 | cpio -dumpv ${MNT}/dev \ 58 ) 59 gzip -9 < boot_flp > ${MNT}/stand/sysinstall 60 chmod 755 ${MNT}/stand/sysinstall 61 ln ${MNT}/stand/sysinstall ${MNT}/stand/newfs 62 gzip -9 -c ${.CURDIR}/../COPYRIGHT > ${MNT}/COPYRIGHT.gz 63 gzip -9 -c ${.CURDIR}/../README > ${MNT}/README.gz 64 gzip -9 -c ${.CURDIR}/../share/FAQ/DISKSPACE.FAQ > \ 65 ${MNT}/DISKSPACE.FAQ.gz 66 gzip -9 -c ${.CURDIR}/../share/FAQ/RELNOTES.FreeBSD > \ 67 ${MNT}/RELNOTES.FreeBSD.gz 68 touch ${MNT}/this_is_boot_flp 69 -umount ${MNT} 70 fsck /dev/r${FLOPPY} 71 dd if=/dev/r${FLOPPY} bs=${DDBS} count=${DDCOUNT} of=boot.flp 72 gzip -9 -v < boot.flp > boot.flp.gz 73 ls -l boot.flp* 74 75cpio.flp: 76 ( cd /${DESTDIR} ; ls ${CPIO2} | cpio -H newc -oa ) | cpio -ivd 77 for i in ${CPIO1} ; do rm -f ./$$i ; ln cpio_flp_1 ./$$i ; done 78 ls ${CPIO1} ${CPIO2} | cpio -H newc -oa | gzip -9 > cpio.flp 79 gzip -9 -v < cpio.flp > cpio.flp.gz 80 ls -l cpio.flp* 81 82crunch: 83 crunchgen ${.CURDIR}/boot_flp.conf 84 ${MAKE} -f boot_flp.mk objs exe 85 crunchgen ${.CURDIR}/cpio_flp_1.conf 86 ${MAKE} -f cpio_flp_1.mk objs exe 87 88floppies: crunch boot.flp cpio.flp 89 90release20: 91 ( cd ${.CURDIR} ; ${MAKE} cleandist) 92 ( cd ${.CURDIR} ; ${MAKE} obj) 93 -mkdir ${RELEASEDIR} 94 chflags -R noschg ${RELEASEDIR}/. 95 rm -rf ${RELEASEDIR}/* 96 ( cd ${.CURDIR}/.. ; \ 97 ${MAKE} world NOCRYPT=yes) 98 ( cd ${.CURDIR}/../etc ; \ 99 ${MAKE} release-dirs ) 100 ( cd ${.CURDIR} ; \ 101 ${MAKE} kernel DESTDIR=${RELEASEDIR}/filesys ) 102 install ${COPY} -m 644 ${.CURDIR}/../sys/compile/GENERIC/kernel \ 103 ${RELEASEDIR}/filesys/kernel 104 ( cd ${.CURDIR} ; \ 105 ${MAKE} hierarchy DESTDIR=${RELEASEDIR}/filesys ) 106 ( cd ${.CURDIR}/../etc ; \ 107 ${MAKE} distribution DESTDIR=${RELEASEDIR}/filesys \ 108 NOCRYPT=yes SHARED=copies) 109 ( cd ${.CURDIR}/../etc ; \ 110 ${MAKE} bin-tarball DESTDIR=${RELEASEDIR}/filesys ) 111 ( cd ${.CURDIR} ; \ 112 ${MAKE} floppies ) 113 114.include <bsd.prog.mk> 115