|
|
1.1 root 1: # makefile.vax 6.3 9/25/83
2: #
3: # Makefile for 4.2 BSD
4: #
5: # This makefile is constructed from a machine description:
6: # config machine
7: # Most changes should be made in the machine description
8: # /sys/conf/``machineid''
9: # after which you should do
10: # config machineid
11: # Generic makefile changes should be made in
12: # /sys/conf/makefile
13: # after which config should be rerun for all machines.
14: #
15: # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
16: # IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
17: #
18: # -DTRACE compile in kernel tracing hooks
19: # -DQUOTA compile in file system quotas
20: # -DUUDMA compile in unibus tu58 pseudo-dma code
21: # -DSWABIPS compile in code to byte swap ip packets on 3Mb/s Ethernet
22: #
23: C2= /lib/c2
24: LD= /bin/ld
25: TOUCH= touch -f -c
26:
27: COPTS= ${IDENT} -DKERNEL
28: CFLAGS= -O ${COPTS}
29:
30: AHEADS= ../vax/pcb.m
31:
32: %OBJS
33:
34: %CFILES
35:
36: %LOAD
37:
38: clean:
39: rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \
40: errs linterrs makelinks
41:
42: lint: /tmp
43: @lint -hbxn -I. -DGENERIC ${COPTS} ../vax/Locore.c \
44: ${CFILES} ../vax/swapgeneric.c ioconf.c | \
45: grep -v 'struct/union .* never defined' | \
46: grep -v 'possible pointer alignment problem'
47:
48: ../vax/symbols.sort: ../vax/symbols.raw
49: grep -v '^#' ../vax/symbols.raw \
50: | sed 's/^ //' | sort -u > ../vax/symbols.sort
51:
52: locore.o: assym.s ${AHEADS} ../vax/rpb.s ../vax/scb.s ../vax/locore.s \
53: ubglue.s ../vax/mtpr.h ../vax/trap.h ../machine/psl.h \
54: ../machine/pte.h ../vax/cpu.h mba.h
55: cat assym.s ../vax/rpb.s ../vax/scb.s ../vax/locore.s \
56: ubglue.s > locore.c
57: cc -E -I. -DLOCORE ${COPTS} locore.c > locore.i
58: @echo 'as -o locore.o $${AHEADS} locore.i'
59: @as -o locore.o ${AHEADS} locore.i
60: @rm locore.i
61:
62: # the following is necessary because autoconf.o depends on #if GENERIC
63: autoconf.o tu.o: makefile
64:
65: # the following are necessary because the files depend on the types of
66: # vax cpu's included in the system configuration
67: clock.o machdep.o autoconf.o conf.o cons.o flp.o mba.o uba.o vaxcpu.o : makefile
68: # depend on network configuration
69: af.o : makefile
70: # depend on maxusers
71: assym.s: makefile
72:
73: assym.s: ../h/param.h ../machine/pte.h ../h/buf.h ../h/vmparam.h \
74: ../h/vmmeter.h ../h/dir.h ../h/cmap.h ../h/map.h ../vaxuba/ubavar.h \
75: ../h/proc.h ../h/msgbuf.h
76: cc ${IDENT} ${PARAM} ../vax/genassym.c; ./a.out >assym.s; rm -f a.out
77:
78: ../h/param.h: /usr/include/signal.h
79: ${TOUCH} ../h/param.h
80: ../h/tty.h: ../h/ttychars.h ../h/ttydev.h
81: ${TOUCH} ../h/tty.h
82: ../h/ioctl.h: /usr/include/sgtty.h ../h/ttychars.h ../h/ttydev.h
83: ${TOUCH} ../h/ioctl.h
84: ../h/user.h: ../vax/pcb.h ../h/dmap.h ../h/types.h \
85: /usr/include/errno.h
86: ${TOUCH} ../h/user.h
87: ../h/vm.h: ../h/vmmac.h ../h/vmmeter.h ../h/vmparam.h ../h/vmsystm.h
88: ${TOUCH} ../h/vm.h
89:
90: depend:
91: grep '^#include' ${CFILES} | grep -v '<' | \
92: sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
93: -e 's/\.c/.o/' \
94: -e 's,../[a-zA-Z]*/,,' | \
95: awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
96: else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
97: else rec = rec " " $$2 } } \
98: END { print rec } ' > makedep
99: echo '$$r makedep' >>eddep
100: echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
101: echo '$$r makedep' >>eddep
102: echo 'w' >>eddep
103: cp makefile makefile.bak
104: ed - makefile < eddep
105: rm eddep makedep
106:
107:
108: links:
109: egrep '#if' ${CFILES} | sed -f ../conf/defines | \
110: sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
111: echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
112: sort -u | comm -23 - dontlink | \
113: sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
114: echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks
115: echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks
116: sh makelinks && rm -f dontlink
117:
118: tags:
119: /usr/ucb/ctags ${CFILES}
120:
121: print:
122: @pr -f makefile ../sys/TODO linterrs
123: @/usr/ucb/ctags -x ${CFILES} | pr -f -h XREF
124: @(size vmunix *.o) | pr -f -h sizes
125: @ls -ls | pr -f
126: @cd ../h; ls -ls | pr -f ; pr -f *.m *.h
127: @echo 'once upon a time ...'
128: @cd ../sys; pr -f asm.sed Locore.c scb.s locore.s
129: @pr -f ${CFILES}
130:
131: ioconf.o: ioconf.c ../h/param.h ../machine/pte.h ../h/buf.h ../h/map.h \
132: ../vaxmba/mbavar.h ../h/vm.h ../vaxuba/ubavar.h
133: ${CC} -I. -c -S ${COPTS} ioconf.c
134: ${C2} ioconf.s | sed -f ../vax/asm.sed | ${AS} -o ioconf.o
135: rm -f ioconf.s
136:
137: param.c: ../conf/param.c
138: cp ../conf/param.c .
139:
140: param.o: param.c makefile
141: ${CC} -I. -c ${CFLAGS} ${PARAM} param.c
142:
143: %RULES
144:
145: # DO NOT DELETE THIS LINE -- make depend uses it
146:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.