1# @(#)Makefile.hp300 7.6 (Berkeley) 01/27/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 22CC= cc -Dconst=__const__ -Dvolatile=__volatile__ \ 23 -Dsigned=__signed__ -Dinline=__inline__ -Uunix -fpcc-struct-return 24LD= /bin/ld 25TOUCH= touch -f -c 26 27S= ../.. 28HP300= ../../hp300 29 30INCLUDES= -I. -I$S -I$S/sys 31COPTS= ${INCLUDES} ${IDENT} -DNVM -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}/include/pte.h 57locore.o: ${HP300}/include/cpu.h 58 cat assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s > locore.c 59 ${CC} -E -DLOCORE ${COPTS} locore.c > locore.i 60 @echo 'as -o locore.o locore.i' 61 @${AS} -o locore.o locore.i 62 @rm locore.i 63 64# the following is necessary because autoconf.o depends on #if GENERIC 65autoconf.o: Makefile 66 67# the following are necessary because the files depend on the types of 68# hp cpu's included in the system configuration 69clock.o machdep.o autoconf.o conf.o: Makefile 70 71# depend on network configuration 72af.o uipc_proto.o locore.o: Makefile 73 74# depend on maxusers 75assym.s: Makefile 76 77assym.s: genassym 78 ./genassym >assym.s 79 80genassym: 81 ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 -o genassym \ 82 ${HP300}/hp300/genassym.c 83 84depend: assym.s param.c 85 mkdep ${COPTS} ${CFILES} ioconf.c 86 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${HP300}/hp300/genassym.c 87 88links: 89 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 90 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 91 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 92 sort -u | comm -23 - dontlink | \ 93 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 94 sh makelinks && rm -f dontlink 95 96tags: 97 @echo "see $S/kern/Makefile for tags" 98 99ioconf.o: ioconf.c 100 ${CC} -c ${CFLAGS} ioconf.c 101 102param.c: $S/conf/param.c 103 rm -f param.c 104 cp $S/conf/param.c . 105 106param.o: param.c Makefile 107 ${CC} -c ${CFLAGS} ${PARAM} param.c 108 109%RULES 110