1# 2# Copyright (c) 1987 Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that this notice is preserved and that due credit is given 7# to the University of California at Berkeley. The name of the University 8# may not be used to endorse or promote products derived from this 9# software without specific prior written permission. This software 10# is provided ``as is'' without express or implied warranty. 11# 12# @(#)Makefile 7.8 (Berkeley) 05/24/88 13# 14RELOC= 800 15MTBOOTRELOC= e0000 16BOOTRELOC= e0000 17LDT1MBSYSOPT= -T ${MTBOOTRELOC} -x 18LDTSYSOPT= -T ${BOOTRELOC} -x 19LDTOPT= -T ${RELOC} -e _entry -x 20 21DESTDIR= 22VPATH= ../stand 23LIBS= libsa.a ${DESTDIR}/lib/libc.a 24COPTS= -O -I. -I../stand -I../h 25CFLAGS= -DSTANDALONE -DCOMPAT_42 -DTAHOE -DRELOC=0x${RELOC} ${COPTS} 26SUBDIR= vdformat 27ALL= boot cat copy ls 28 29SRCS= boot.c cat.c conf.c copy.c dev.c getfile.c gets.c ls.c prf.c \ 30 srt0.c sys.c vd.c cy.c hdc.c 31DRIVERS=cy.o vd.o hdc.o 32 33#all: srt0.o libsa.a ${ALL} ${SUBDIR} 34all: srt0.o libsa.a ${ALL} 35 36${SUBDIR}: FRC 37 cd $@; make ${MFLAGS} 38 39machdep.o: machdep.c ../tahoe/mtpr.h ../tahoe/mem.h ../tahoe/SYS.h 40 ${CC} -E ${CFLAGS} machdep.c | ${AS} -o machdep.o 41 42libsa.a: conf.o dev.o getfile.o gets.o machdep.o prf.o printn.o sys.o \ 43 ${DRIVERS} 44 ar crv $@ $? 45 ranlib $@ 46 47boot: boot.o bootsrt0.o ${LIBS} 48 ld ${LDTSYSOPT} bootsrt0.o boot.o ${LIBS} 49 nm -u a.out 50 size a.out 51 dd if=a.out of=boot ibs=1024 skip=1 52 -rm -f a.out 53 54boot1mb: boot.o boot1mbsrt0.o ${LIBS} 55 ld ${LDT1MBSYSOPT} boot1mbsrt0.o boot.o ${LIBS} 56 nm -u a.out 57 size a.out 58 dd if=a.out of=boot1mb ibs=1024 skip=1 59 -rm -f a.out 60 61cat: cat.o srt0.o ${LIBS} 62 ld ${LDTOPT} -o $@ -s srt0.o cat.o ${LIBS} 63 64copy: copy.o srt0.o ncy.o ${LIBS} 65 ld ${LDTOPT} -o $@ srt0.o copy.o ncy.o ${LIBS} 66 67xpformat: xpformat.o srt0.o ${LIBS} 68 ld ${LDTOPT} -o $@ srt0.o xpformat.o ${LIBS} 69 70ls: ls.o srt0.o ${LIBS} 71 ld ${LDTOPT} -o $@ -s srt0.o ls.o ${LIBS} 72 73srt0.o: srt0.c 74 ${CC} -E ${CFLAGS} srt0.c | ${AS} -o srt0.o 75 76bootsrt0.o: srt0.c 77 ${CC} -E -DBOOTRELOC=0x${BOOTRELOC} -DREL ${CFLAGS} srt0.c | \ 78 ${AS} -o bootsrt0.o 79 80boot1mbsrt0.o: srt0.c 81 ${CC} -E -DBOOTRELOC=0x${MTBOOTRELOC} -DREL ${CFLAGS} srt0.c | \ 82 ${AS} -o boot1mbsrt0.o 83 84ncy.c: cy.c 85 rm -f ncy.c 86 ln cy.c ncy.c 87 88ncy.o: ncy.c 89 ${CC} -DNOBLOCK ${CFLAGS} -c ncy.c 90 91clean: FRC 92 rm -f ${ALL} *.o *.map *.bak a.out ncy.c libsa.a 93 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done 94 95depend: ${SRCS} FRC 96 mkdep ${COPTS} ${SRCS} 97 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done 98 99install: FRC 100 -mkdir ${DESTDIR}/stand 101 for i in ${ALL}; do \ 102 install -o bin -g bin -m 644 $$i ${DESTDIR}/stand/$$i; \ 103 done 104 rm -f ${DESTDIR}/boot; 105 cp ${DESTDIR}/stand/boot ${DESTDIR}/boot 106 for i in ${SUBDIR}; do \ 107 (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install) \ 108 done 109 110tags: ${SRCS} FRC 111 ctags ${SRCS} 112 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} tags); done 113 114FRC: 115 116# DO NOT DELETE THIS LINE -- mkdep uses it. 117# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. 118 119boot.o: boot.c ../machine/mtpr.h ../h/param.h /usr/include/sys/types.h 120boot.o: ../h/signal.h /usr/include/machine/trap.h 121boot.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h 122boot.o: ../h/inode.h ../h/fs.h ../h/vm.h /usr/include/sys/vmparam.h 123boot.o: /usr/include/machine/vmparam.h /usr/include/sys/vmmac.h 124boot.o: /usr/include/sys/vmmeter.h /usr/include/sys/vmsystm.h ../stand/saio.h 125boot.o: ../stand/saioctl.h ../stand/saerrno.h ../h/reboot.h 126boot.o: /usr/include/a.out.h /usr/include/sys/exec.h 127cat.o: ../stand/cat.c 128conf.o: conf.c ../h/param.h /usr/include/sys/types.h ../h/signal.h 129conf.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h 130conf.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../stand/saio.h 131conf.o: ../stand/saioctl.h ../stand/saerrno.h 132copy.o: ../stand/copy.c 133dev.o: ../stand/dev.c ../h/param.h /usr/include/sys/types.h ../h/signal.h 134dev.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h 135dev.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../stand/saio.h 136dev.o: ../stand/saioctl.h ../stand/saerrno.h 137getfile.o: ../stand/getfile.c ../h/param.h /usr/include/sys/types.h 138getfile.o: ../h/signal.h /usr/include/machine/trap.h 139getfile.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h 140getfile.o: ../h/inode.h ../h/fs.h ../stand/saio.h ../stand/saioctl.h 141getfile.o: ../stand/saerrno.h 142gets.o: ../stand/gets.c 143ls.o: ../stand/ls.c ../h/param.h /usr/include/sys/types.h ../h/signal.h 144ls.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h 145ls.o: /usr/include/machine/endian.h ../h/inode.h ../h/dir.h ../h/fs.h 146ls.o: ../stand/saio.h ../stand/saioctl.h ../stand/saerrno.h 147prf.o: prf.c ../machine/mtpr.h ../h/param.h /usr/include/sys/types.h 148prf.o: ../h/signal.h /usr/include/machine/trap.h 149prf.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h 150prf.o: ../tahoe/cp.h 151srt0.o: srt0.c ../machine/mtpr.h 152sys.o: ../stand/sys.c ../h/param.h /usr/include/sys/types.h ../h/signal.h 153sys.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h 154sys.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/dir.h 155sys.o: ../h/reboot.h ../stand/saio.h ../stand/saioctl.h ../stand/saerrno.h 156vd.o: vd.c ../machine/mtpr.h ../h/param.h /usr/include/sys/types.h 157vd.o: ../h/signal.h /usr/include/machine/trap.h 158vd.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h 159vd.o: ../h/inode.h ../h/fs.h ../h/buf.h ../h/disklabel.h ../stand/saio.h 160vd.o: ../stand/saioctl.h ../stand/saerrno.h ../tahoevba/vdreg.h 161vd.o: ../tahoevba/vbaparam.h 162cy.o: cy.c ../machine/pte.h ../machine/mtpr.h ../h/param.h 163cy.o: /usr/include/sys/types.h ../h/signal.h /usr/include/machine/trap.h 164cy.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h 165cy.o: ../h/inode.h ../h/fs.h ../stand/saio.h ../stand/saioctl.h 166cy.o: ../stand/saerrno.h ../tahoevba/cyreg.h ../tahoevba/vbaparam.h 167hdc.o: hdc.c /usr/include/machine/mtpr.h ../h/param.h ../h/types.h 168hdc.o: ../h/signal.h /usr/include/machine/trap.h ../h/../machine/machparam.h 169hdc.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/buf.h 170hdc.o: ../h/ioctl.h ../h/ttychars.h ../h/ttydev.h ../h/disklabel.h 171hdc.o: ../stand/saio.h ../stand/saioctl.h ../stand/saerrno.h ../tahoevba/hdc.h 172 173# IF YOU PUT ANYTHING HERE IT WILL GO AWAY 174