|
|
1.1 root 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 the above copyright notice and this paragraph are
7: # duplicated in all such forms and that any documentation,
8: # advertising materials, and other materials related to such
9: # distribution and use acknowledge that the software was developed
10: # by the University of California, Berkeley. The name of the
11: # University may not be used to endorse or promote products derived
12: # from this software without specific prior written permission.
13: # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14: # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15: # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16: #
17: # @(#)Makefile 7.10 (Berkeley) 5/1/89
18: #
19:
20: RELOC= 800
21: MTBOOTRELOC= e0000
22: BOOTRELOC= e0000
23: LDT1MBSYSOPT= -T ${MTBOOTRELOC} -x
24: LDTSYSOPT= -T ${BOOTRELOC} -x
25: LDTOPT= -T ${RELOC} -e _entry -x
26:
27: DESTDIR=
28: VPATH= ../stand
29: LIBS= libsa.a ${DESTDIR}/lib/libc.a
30: COPTS= -O -I. -I../stand -I../h
31: CFLAGS= -DSTANDALONE -DCOMPAT_42 -DTAHOE -DRELOC=0x${RELOC} ${COPTS}
32: SUBDIR= vdformat
33: ALL= boot cat copy ls
34:
35: SRCS= boot.c cat.c conf.c copy.c dev.c getfile.c gets.c ls.c prf.c \
36: srt0.c sys.c vd.c cy.c hd.c
37: DRIVERS=cy.o vd.o hd.o
38:
39: #all: srt0.o libsa.a ${ALL} ${SUBDIR}
40: all: srt0.o libsa.a ${ALL}
41:
42: ${SUBDIR}:
43: cd $@; make ${MFLAGS}
44:
45: machdep.o: machdep.c ../tahoe/mtpr.h ../tahoe/mem.h ../tahoe/SYS.h
46: ${CC} -E ${CFLAGS} machdep.c | ${AS} -o machdep.o
47:
48: libsa.a: conf.o dev.o getfile.o gets.o machdep.o prf.o printn.o sys.o \
49: ${DRIVERS}
50: ar crv $@ $?
51: ranlib $@
52:
53: boot: boot.o bootsrt0.o ${LIBS}
54: ld ${LDTSYSOPT} bootsrt0.o boot.o ${LIBS}
55: nm -u a.out
56: size a.out
57: dd if=a.out of=boot ibs=1024 skip=1
58: -rm -f a.out
59:
60: boot1mb: boot.o boot1mbsrt0.o ${LIBS}
61: ld ${LDT1MBSYSOPT} boot1mbsrt0.o boot.o ${LIBS}
62: nm -u a.out
63: size a.out
64: dd if=a.out of=boot1mb ibs=1024 skip=1
65: -rm -f a.out
66:
67: cat: cat.o srt0.o ${LIBS}
68: ld ${LDTOPT} -o $@ -s srt0.o cat.o ${LIBS}
69:
70: copy: copy.o srt0.o ncy.o ${LIBS}
71: ld ${LDTOPT} -o $@ srt0.o copy.o ncy.o ${LIBS}
72:
73: xpformat: xpformat.o srt0.o ${LIBS}
74: ld ${LDTOPT} -o $@ srt0.o xpformat.o ${LIBS}
75:
76: ls: ls.o srt0.o ${LIBS}
77: ld ${LDTOPT} -o $@ -s srt0.o ls.o ${LIBS}
78:
79: srt0.o: srt0.c
80: ${CC} -E ${CFLAGS} srt0.c | ${AS} -o srt0.o
81:
82: bootsrt0.o: srt0.c
83: ${CC} -E -DBOOTRELOC=0x${BOOTRELOC} -DREL ${CFLAGS} srt0.c | \
84: ${AS} -o bootsrt0.o
85:
86: boot1mbsrt0.o: srt0.c
87: ${CC} -E -DBOOTRELOC=0x${MTBOOTRELOC} -DREL ${CFLAGS} srt0.c | \
88: ${AS} -o boot1mbsrt0.o
89:
90: ncy.c: cy.c
91: rm -f ncy.c
92: ln cy.c ncy.c
93:
94: ncy.o: ncy.c
95: ${CC} -DNOBLOCK ${CFLAGS} -c ncy.c
96:
97: clean:
98: rm -f ${ALL} *.o *.map *.bak a.out ncy.c libsa.a
99: for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
100:
101: cleandir: clean
102: rm -f ${MAN} tags .depend
103: for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} cleandir); done
104:
105: depend: ${SRCS}
106: mkdep ${COPTS} ${SRCS}
107: for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done
108:
109: install:
110: -mkdir ${DESTDIR}/stand
111: for i in ${ALL}; do \
112: install -o bin -g bin -m 644 $$i ${DESTDIR}/stand/$$i; \
113: done
114: rm -f ${DESTDIR}/boot;
115: cp ${DESTDIR}/stand/boot ${DESTDIR}/boot
116: # for i in ${SUBDIR}; do \
117: # (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install) \
118: # done
119:
120: tags: ${SRCS}
121: ctags ${SRCS}
122: for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} tags); done
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.