1# 2# Copyright (c) 1980, 1986 Regents of the University of California. 3# All rights reserved. The Berkeley software License Agreement 4# specifies the terms and conditions for redistribution. 5# 6# @(#)Makefile.vax 7.12 (Berkeley) 05/09/89 7# 8# Makefile for 4.3 BSD 9# 10# This makefile is constructed from a machine description: 11# config machineid 12# Most changes should be made in the machine description 13# /sys/conf/``machineid'' 14# after which you should do 15# config machineid 16# Generic makefile changes should be made in 17# /sys/conf/Makefile.``machinetype'' 18# after which config should be rerun for all machines. 19# 20# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE 21# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 22# 23# -DTRACE compile in kernel tracing hooks 24# -DQUOTA compile in file system quotas 25# -DUUDMA compile in unibus tu58 pseudo-dma code 26# 27C2= /usr/libexec/c2 28LD= /usr/bin/ld 29INLINECMD= ../vax/inline/inline 30INLINE= ${INLINECMD} ${INLINEOPTS} 31TOUCH= touch -f -c 32 33INCLUDES= -I. -I../sys 34COPTS= ${INCLUDES} ${IDENT} -DKERNEL 35CFLAGS= -O ${COPTS} 36 37AHEADS= ../vax/pcb.m 38 39%OBJS 40 41%CFILES 42 43%LOAD 44 45clean: 46 rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \ 47 errs linterrs makelinks 48 49lint: /tmp param.c 50 @lint -hbxn -DGENERIC ${COPTS} ${PARAM} \ 51 ../vax/Locore.c ${CFILES} ioconf.c param.c | \ 52 grep -v 'struct/union .* never defined' | \ 53 grep -v 'possible pointer alignment problem' 54 55../vax/symbols.sort: ../vax/symbols.raw 56 grep -v '^#' ../vax/symbols.raw \ 57 | sed 's/^ //' | sort -u > ../vax/symbols.sort 58 59../vax/inline/inline: ../vax/inline/inline.h ../vax/inline/langpats.c 60../vax/inline/inline: ../vax/inline/libcpats.c ../vax/inline/machdep.c 61../vax/inline/inline: ../vax/inline/machpats.c ../vax/inline/main.c 62 cd ../vax/inline; make 63 64locore.o: assym.s ${AHEADS} ../vax/rpb.s ../vax/scb.s ubvec.s \ 65 ../vax/locore.s ubglue.s ../vax/mtpr.h ../vax/trap.h machine/psl.h \ 66 machine/pte.h ../vax/cpu.h mba.h 67 cat assym.s ../vax/rpb.s ../vax/scb.s ubvec.s ../vax/locore.s \ 68 ubglue.s > locore.c 69 cc -E -DLOCORE -I../vax ${COPTS} locore.c > locore.i 70 @echo 'as -o locore.o $${AHEADS} locore.i' 71 @as -o locore.o ${AHEADS} locore.i 72 @rm locore.i 73 74emulate.o: ../vax/emulate.s 75 /lib/cpp -I. ${COPTS} ../vax/emulate.s | ${AS} -o emulate.o 76 77# the following is necessary because autoconf.o depends on #if GENERIC 78autoconf.o tu.o: Makefile 79 80# the following are necessary because the files depend on the types of 81# vax cpu's included in the system configuration 82clock.o machdep.o autoconf.o conf.o cons.o cpudata.o : Makefile 83crl.o flp.o mba.o uba.o vaxcpu.o : Makefile 84 85# depend on network configuration 86af.o uipc_proto.o uipc_domain.o locore.o: Makefile 87 88# depends on kdb being configured 89trap.o: Makefile 90 91# depend on maxusers 92assym.s: Makefile 93 94assym.s: ../sys/param.h machine/pte.h ../sys/buf.h ../sys/vmparam.h \ 95 ../sys/vmmeter.h ../ufs/dir.h ../sys/cmap.h ../sys/map.h \ 96 ../vaxuba/ubavar.h ../vaxuba/ubareg.h ../sys/proc.h ../sys/msgbuf.h \ 97 ../sys/text.h ../sys/user.h ../vax/rpb.h machine/vmparam.h 98 cc ${INCLUDES} ${IDENT} ${PARAM} ../vax/genassym.c 99 ./a.out >assym.s; rm -f a.out 100 101depend: assym.s 102 mkdep ${COPTS} ${CFILES} 103 104links: 105 egrep '#if' ${CFILES} | sed -f ../conf/defines | \ 106 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 107 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 108 sort -u | comm -23 - dontlink | \ 109 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 110 echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks 111 echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks 112 sh makelinks && rm -f dontlink 113 114tags: 115 @echo "see ../sys/Makefile for tags" 116 117print: 118 @pr -f Makefile ../sys/TODO linterrs 119 @/usr/ucb/ctags -x ${CFILES} | pr -f -h XREF 120 @(size vmunix *.o) | pr -f -h sizes 121 @ls -ls | pr -f 122 @cd ../sys; ls -ls | pr -f ; pr -f *.m *.h 123 @echo 'once upon a time ...' 124 @cd ../vax; pr -f Locore.c scb.s locore.s 125 @cd ../vax/inline; make print 126 @pr -f ${CFILES} 127 128ioconf.o: ioconf.c ../sys/param.h machine/pte.h ../sys/buf.h ../sys/map.h \ 129 ../vaxmba/mbavar.h ../sys/vm.h ../vaxuba/ubavar.h 130 ${CC} -c -S ${COPTS} ioconf.c 131 ${C2} ioconf.s | ../vax/inline/inline | ${AS} -o ioconf.o 132 rm -f ioconf.s 133 134param.c: ../conf/param.c 135 -rm -f param.c 136 cp ../conf/param.c . 137 138param.o: param.c Makefile 139 ${CC} -c ${CFLAGS} ${PARAM} param.c 140 141%RULES 142 143# DO NOT DELETE THIS LINE -- make depend uses it 144 145