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