1# @(#)Makefile 5.11 (Berkeley) 5/21/91 2 3LOCALTIME= US/Pacific 4TZDIR=/usr/share/zoneinfo 5 6NOOBJ= oobj 7 8# disktab may be wrong -- hcx9 is a tahoe, but gets its own. 9# -rw-r--r-- 10BINOWN= root 11BINGRP= wheel 12BIN1= aliases csh.cshrc csh.login csh.logout dm.conf \ 13 ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \ 14 inetd.conf motd myname netstart phones \ 15 printcap protocols rc rc.local remote security services shells \ 16 syslog.conf ttys etc.${MACHINE}/disktab rpc 17 18# -rw-rw-rw- 19BIN2= motd 20 21# -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel 22BIN3= daily weekly monthly 23 24MTREE= BSD.root.dist BSD.usr.dist BSD.var.dist 25NAMEDB= localhost.rev named.boot root.cache 26PCS= pcs750.bin 27WCS1= wcs fppwcs poc poc1 poc2 fppoc 28WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual 29 30# Special top level files for FreeBSD 31COPYRIGHT= COPYRIGHT 32FREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD ${COPYRIGHT} 33# 34# Floppy drive name and files for building FreeBSD Floppies 35FLOPPY?= fd0 36MOUNT= /mnt 37# 38MDEC= usr/mdec/bootfd usr/mdec/fdboot 39MDEC+= usr/mdec/bootsd usr/mdec/sdboot 40MDEC+= usr/mdec/bootwd usr/mdec/wdboot 41# 42KC_DIRS= dev mnt 43KC_FILES= ${COPYRIGHT} 44KC_FILES+= bin/[ bin/cp bin/echo bin/sh bin/test 45KC_FILES+= sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount 46# 47INST1_DIRS= dev mnt 48INST1_FILES= ${COPYRIGHT} 49INST1_FILES+= bin/[ bin/cat bin/df bin/expr bin/ls bin/mkdir 50INST1_FILES+= bin/sh bin/sync bin/test 51INST1_FILES+= dev/MAKEDEV dev/MAKEDEV.local 52INST1_FILES+= etc/disktab etc/group etc/master.passwd etc/passwd 53INST1_FILES+= etc/pwd.db etc/spwd.db 54INST1_FILES+= sbin/disklabel sbin/halt sbin/init sbin/mount sbin/umount 55INST1_FILES+= sbin/newfs sbin/reboot 56INST1_FILES+= usr/bin/cpio 57INST1_FILES+= ${MDEC} 58INST1_FILES+= usr/sbin/bad144 59 60INST2_FILES= ${COPYRIGHT} 61INST2_FILES+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat 62INST2_CPIO= bin/chmod bin/cp bin/dd bin/mv bin/pwd bin/rm bin/stty 63INST2_CPIO+= etc/protocols etc/services 64INST2_CPIO+= sbin/ifconfig sbin/fsck sbin/mknod 65#INST2_CPIO+= sbin/mount_pcfs sbin/mount_isofs 66INST2_CPIO+= sbin/route sbin/shutdown sbin/slattach 67INST2_CPIO+= tmp 68INST2_CPIO+= usr/bin/awk usr/bin/chgrp usr/bin/ftp 69INST2_CPIO+= usr/bin/more usr/bin/tar usr/bin/tip usr/bin/zcat 70INST2_CPIO+= usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view 71#INST2_CPIO+= usr/local/bin/mread usr/local/bin/rz 72INST2_CPIO+= usr/sbin/update usr/sbin/chown 73INST2_CPIO+= var 74 75all clean cleandir depend etc install lint: 76 77distribution: distrib-dirs 78 install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc 79 install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc 80 install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc 81 install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root 82 install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log 83 install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc 84 # 85 # This is broken, it always does /etc. It IGNORES the ${DESTDIR} for 86 # where to write the spwd.db pwd.db files. 87 #(cd ${DESTDIR}/etc; pwd_mkdb -p master.passwd) 88 # 89 # Work around for above problem. 90 install -c -o root -g wheel -m 644 pwd.db ${DESTDIR}/etc 91 install -c -o root -g wheel -m 600 spwd.db ${DESTDIR}/etc 92 install -c -o root -g wheel -m 644 passwd ${DESTDIR}/etc 93 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 94 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 95 (cd ${DESTDIR}/dev; sh MAKEDEV all) 96 (cd root; \ 97 install -c -o root -g wheel -m 644 dot.cshrc \ 98 ${DESTDIR}/root/.cshrc; \ 99 install -c -o root -g wheel -m 644 dot.klogin \ 100 ${DESTDIR}/root/.klogin; \ 101 install -c -o root -g wheel -m 644 dot.login \ 102 ${DESTDIR}/root/.login; \ 103 install -c -o root -g wheel -m 644 dot.profile \ 104 ${DESTDIR}/root/.profile; \ 105 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 106 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 107 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 108 cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \ 109 ${DESTDIR}/etc/mtree 110 cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ 111 ${DESTDIR}/etc/namedb 112 /bin/rm -f ${DESTDIR}/etc/localtime 113 ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 114 install -c -o ${BINOWN} -g operator -m 664 /dev/null \ 115 ${DESTDIR}/etc/dumpdates 116 install -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 117 ${DESTDIR}/var/db/locate.database 118 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 119 ${DESTDIR}/var/log/lpd-errs 120 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 121 ${DESTDIR}/var/log/maillog 122 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 123 ${DESTDIR}/var/log/lastlog 124 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 125 ${DESTDIR}/var/log/messages 126 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 127 ${DESTDIR}/var/log/wtmp 128 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 129 ${DESTDIR}/var/run/utmp 130 (cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ 131 fstab.* ${DESTDIR}/etc) 132.if ${MACHINE} == "tahoe" 133 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \ 134 ${DESTDIR}/) 135.endif 136.if ${MACHINE} == "vax" 137 (cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \ 138 ${DESTDIR}/) 139.endif 140.if ${MACHINE} == "i386" 141 (cd ../sys/i386/boot; \ 142 make depend all install cleandir) 143 (cd /; \ 144 ls ${MDEC} | cpio -pdalmuv ${DESTDIR}/) 145 (cd ../usr.sbin/sendmail/src; \ 146 make install; \ 147 cd ../cf/cf; \ 148 make tcpproto.cf; \ 149 install -o root -g wheel -m 644 tcpproto.cf \ 150 ${DESTDIR}/etc/sendmail.cf) 151 (cd ../; \ 152 install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/) 153 (cd ..; make install) 154 # the above make install clobers the /etc/localtime link 155 /bin/rm -f ${DESTDIR}/etc/localtime 156 ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 157 /bin/rm -f ${DESTDIR}/etc/termcap 158 ln -s /usr/share/misc/termcap ${DESTDIR}/etc/termcap 159 (cd ../sys/compile; rm -rf GENERICISA) 160 (cd ../sys/i386/conf; config GENERICISA) 161 (cd ../sys/compile/GENERICISA; make depend; make all; \ 162 install -c -o root -g wheel -m 755 386bsd \ 163 ${DESTDIR}/386bsd.GENERICISA) 164 (cd ../include; make copies) 165.endif 166 167hcx9-distribution: 168 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \ 169 ${DESTDIR}/) 170 171kc-ah-floppy: 172 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 173 newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space r${FLOPPY}a floppy5 174 mount /dev/${FLOPPY}a ${MOUNT} 175 (cd ${DESTDIR}/; \ 176 ls -d ${KC_DIRS} | cpio -pdalmuv ${MOUNT}) 177 (cd ${MOUNT}/dev; \ 178 sh ${DESTDIR}/dev/MAKEDEV std; \ 179 rm -rf fd; \ 180 sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0) 181 (cd ${DESTDIR}/; \ 182 ls ${KC_FILES} | cpio -pdalmuv ${MOUNT}) 183 install -c -o root -g wheel -m 755 etc.i386/kc.profile \ 184 ${MOUNT}/.profile 185 (cd ../sys/compile/GENERICISA; \ 186 install -c -o root -g wheel -m 755 386bsd ${MOUNT}/) 187 df -ik ${MOUNT} 188 umount /dev/${FLOPPY}a 189 fsck /dev/r${FLOPPY}a 190 191inst1-floppy: 192 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 193 newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space r${FLOPPY}a floppy5 194 mount /dev/${FLOPPY}a ${MOUNT} 195 (cd ${DESTDIR}/; \ 196 ls -d ${INST1_DIRS} | cpio -pdalmuv ${MOUNT}) 197 (cd ${MOUNT}/dev; \ 198 sh ${DESTDIR}/dev/MAKEDEV std; \ 199 rm -rf fd; \ 200 sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0) 201 (cd ${DESTDIR}/; \ 202 ls ${INST1_FILES} | cpio -pdalmuv ${MOUNT}) 203 install -c -o root -g wheel -m 755 etc.i386/inst1.profile \ 204 ${MOUNT}/.profile 205 install -c -o root -g wheel -m 755 etc.i386/inst1.install \ 206 ${MOUNT}/install 207 (cd ${MOUNT}/; \ 208 ls ${INST1_FILES} >/tmp/filelist; \ 209 find ${INST1_DIRS} | sort >>/tmp/filelist; \ 210 sort -u /tmp/filelist >filelist) 211 df -ik ${MOUNT} 212 umount /dev/${FLOPPY}a 213 fsck /dev/r${FLOPPY}a 214 215inst2-floppy: 216 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd 217 newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space r${FLOPPY}a floppy5 218 mount /dev/${FLOPPY}a ${MOUNT} 219 (cd ${DESTDIR}/; \ 220 ls ${INST2_FILES} | cpio -pdalmuv ${MOUNT}) 221 (cd ${DESTDIR}/; \ 222 find ${INST2_CPIO} | cpio -odalmuv | gzip -9 >${MOUNT}/inst2.cpio.gz) 223 install -c -o root -g wheel -m 755 etc.i386/inst2.profile \ 224 ${MOUNT}/.profile 225 install -c -o root -g wheel -m 755 etc.i386/inst2.install \ 226 ${MOUNT}/install 227 df -ik ${MOUNT} 228 umount /dev/${FLOPPY}a 229 fsck /dev/r${FLOPPY}a 230 231distrib-dirs: 232 mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/ 233 mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var 234 mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr 235 (cd ${DESTDIR}; rm -f ${DESTDIR}/sys; \ 236 ln -s usr/src/sys sys ) 237 238.include <bsd.prog.mk> 239