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