1# Makefile.vax 4.4 12/17/82 2# 3# Makefile for 4.1c 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# /usr/sys/conf/``machineid'' 9# after which you should do 10# config machineid 11# Generic makefile changes should be made in 12# /usr/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# 20C2= /lib/c2 21LD= /bin/ld 22TOUCH= touch -f -c 23 24COPTS= ${IDENT} -DKERNEL 25CFLAGS= -O ${COPTS} 26 27AHEADS= ../vax/pcb.m 28 29%OBJS 30 31%CFILES 32 33%LOAD 34 35clean: 36 rm -f eddep *vmunix* tags *.o locore.i [a-tv-z]*.s \ 37 errs linterrs makelinks 38 39lint: /tmp 40 @lint -hbxn -I. -DGENERIC ${COPTS} ../vax/Locore.c \ 41 ${CFILES} ../vax/swapgeneric.c ioconf.c | \ 42 grep -v 'struct/union .* never defined' | \ 43 grep -v 'possible pointer alignment problem' 44 45../conf/symbols.sort: ../conf/symbols.raw 46 grep -v '^#' ../conf/symbols.raw \ 47 | sed 's/^ //' | sort -u > ../conf/symbols.sort 48 49locore.o: assym.s ${AHEADS} ../vax/scb.s ../vax/locore.s ubglue.s \ 50 ../vax/mtpr.h ../vax/trap.h ../machine/psl.h ../machine/pte.h \ 51 ../vax/cpu.h mba.h 52 cat assym.s ../vax/scb.s ../vax/locore.s ubglue.s > locore.c 53 cc -E -I. -DLOCORE ${COPTS} locore.c > locore.i 54 @echo 'as -o locore.o $${AHEADS} locore.i' 55 @as -o locore.o ${AHEADS} locore.i 56 @rm locore.i 57 58# the following is necessary because autoconf.o depends on #if GENERIC 59autoconf.o tu.o: makefile 60 61# the following are necessary because the files depend on the types of 62# vax cpu's included in the system configuration 63clock.o machdep.o autoconf.o conf.o cons.o flp.o mba.o uba.o vaxcpu.o : makefile 64# depend on network configuration 65af.o : makefile 66 67assym.s: ../h/param.h ../machine/pte.h ../h/buf.h ../h/vmparam.h \ 68 ../h/vmmeter.h ../h/dir.h ../h/cmap.h ../h/map.h ../vaxuba/ubavar.h \ 69 ../h/proc.h ../h/msgbuf.h 70 cc ${IDENT} ../vax/genassym.c; ./a.out >assym.s; rm -f a.out 71 72../h/param.h: /usr/include/signal.h 73 ${TOUCH} ../h/param.h 74../h/tty.h: ../h/ttychars.h ../h/ttydev.h 75 ${TOUCH} ../h/tty.h 76../h/ioctl.h: /usr/include/sgtty.h ../h/ttychars.h ../h/ttydev.h 77 ${TOUCH} ../h/ioctl.h 78../h/user.h: ../vax/pcb.h ../h/dmap.h ../h/types.h \ 79 /usr/include/errno.h 80 ${TOUCH} ../h/user.h 81../h/vm.h: ../h/vmmac.h ../h/vmmeter.h ../h/vmparam.h ../h/vmsystm.h 82 ${TOUCH} ../h/vm.h 83 84depend: 85 grep '^#include' ${CFILES} | grep -v '<' | \ 86 sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \ 87 sed 's/\.c/.o/' | sed 's,../[a-z]*/,,' | \ 88 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 89 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 90 else rec = rec " " $$2 } } \ 91 END { print rec } ' > makedep 92 echo '$$r makedep' >>eddep 93 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep 94 echo '$$r makedep' >>eddep 95 echo 'w' >>eddep 96 cp makefile makefile.bak 97 ed - makefile < eddep 98 rm eddep makedep 99 100 101links: 102 egrep '#if' ${CFILES} | sed -f ../conf/defines | \ 103 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 104 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 105 sort -u | comm -23 - dontlink | \ 106 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 107 echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks 108 echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks 109 sh makelinks && rm -f dontlink 110 111tags: 112 /usr/ucb/ctags ${CFILES} 113 114print: 115 @pr -f makefile ../sys/TODO linterrs 116 @/usr/ucb/ctags -x ${CFILES} | pr -f -h XREF 117 @(size vmunix *.o) | pr -f -h sizes 118 @ls -ls | pr -f 119 @cd ../h; ls -ls | pr -f ; pr -f *.m *.h 120 @echo 'once upon a time ...' 121 @cd ../sys; pr -f asm.sed Locore.c scb.s locore.s 122 @pr -f ${CFILES} 123 124ioconf.o: ioconf.c ../h/param.h ../machine/pte.h ../h/buf.h ../h/map.h \ 125 ../vaxmba/mbavar.h ../h/vm.h ../vaxuba/ubavar.h 126 ${CC} -I. -c -S ${COPTS} ioconf.c 127 ${C2} ioconf.s | sed -f ../vax/asm.sed | ${AS} -o ioconf.o 128 rm -f ioconf.s 129 130param.c: ../conf/param.c 131 cp ../conf/param.c . 132 133param.o: param.c makefile 134 ${CC} -I. -c ${CFLAGS} ${PARAM} param.c 135 136%RULES 137 138# DO NOT DELETE THIS LINE -- make depend uses it 139 140