1# @(#)Makefile.hp300 7.9 (Berkeley) 05/08/91 2# 3# Makefile for 4.4 BSD 4# 5# This makefile is constructed from a machine description: 6# config machineid 7# Most changes should be made in the machine description 8# /sys/conf/``machineid'' 9# after which you should do 10# config machineid 11# Machine generic makefile changes should be made in 12# /sys/conf/Makefile.``machinetype'' 13# after which config should be rerun for all machines of that type. 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# 21AS= as ${PROF} 22CC= cc ${PROF} 23CPP= cpp 24LD= ld 25TOUCH= touch -f -c 26 27S= ../.. 28HP300= ../../hp300 29 30INCLUDES= -I. -I$S -I$S/sys 31COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Dhp300 -DFPCOPROC -DREFBIT 32CFLAGS= -O ${COPTS} 33 34%OBJS 35 36%CFILES 37 38%LOAD 39 40clean: 41 rm -f eddep *vmunix tags *.o locore.i [a-z]*.s \ 42 Errs errs linterrs makelinks 43 44lint: /tmp param.c 45 @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ 46 ${HP300}/hp300/Locore.c ${CFILES} ${HP300}/hp300/swapgeneric.c \ 47 ioconf.c param.c| \ 48 grep -v 'struct/union .* never defined' | \ 49 grep -v 'possible pointer alignment problem' 50 51symbols.sort: ${HP300}/hp300/symbols.raw 52 grep -v '^#' ${HP300}/hp300/symbols.raw \ 53 | sed 's/^ //' | sort -u > symbols.sort 54 55locore.o: assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s 56locore.o: ${HP300}/include/trap.h ${HP300}/include/psl.h ${HP300}/hp300/pte.h 57locore.o: ${HP300}/include/cpu.h 58 ${CPP} -DLOCORE ${COPTS} ${HP300}/hp300/locore.s | ${AS} -o locore.o 59 60# the following is necessary because autoconf.o depends on #if GENERIC 61autoconf.o: Makefile 62 63# the following are necessary because the files depend on the types of 64# hp cpu's included in the system configuration 65clock.o machdep.o autoconf.o conf.o: Makefile 66 67# depend on network configuration 68af.o uipc_proto.o locore.o: Makefile 69 70# depend on maxusers 71assym.s: Makefile 72 73assym.s: genassym 74 ./genassym >assym.s 75 76genassym: 77 ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 -o genassym \ 78 ${HP300}/hp300/genassym.c 79 80depend: assym.s param.c 81 mkdep ${COPTS} ${CFILES} ioconf.c param.c 82 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${HP300}/hp300/genassym.c 83 84links: 85 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 86 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 87 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 88 sort -u | comm -23 - dontlink | \ 89 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 90 sh makelinks && rm -f dontlink 91 92tags: 93 @echo "see $S/kern/Makefile for tags" 94 95ioconf.o: ioconf.c 96 ${CC} -c ${CFLAGS} ioconf.c 97 98param.c: $S/conf/param.c 99 rm -f param.c 100 cp $S/conf/param.c . 101 102param.o: param.c Makefile 103 ${CC} -c ${CFLAGS} ${PARAM} param.c 104 105%RULES 106