1# @(#)Makefile.hp300 7.4 (Berkeley) 12/16/90 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 22OAS= oas 23CC= cc -Dconst=__const__ -Dvolatile=__volatile__ \ 24 -Dsigned=__signed__ -Dinline=__inline__ -Uunix -fpcc-struct-return 25LD= /bin/ld 26TOUCH= touch -f -c 27 28S= ../.. 29HP300= ../../hp300 30 31INCLUDES= -I. -I$S -I$S/sys 32COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Dhp300 -DFPCOPROC -DREFBIT 33CFLAGS= -O ${COPTS} 34 35%OBJS 36 37%CFILES 38 39%LOAD 40 41clean: 42 rm -f eddep *vmunix tags *.o locore.i [a-z]*.s \ 43 Errs errs linterrs makelinks 44 45lint: /tmp param.c 46 @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ 47 ${HP300}/hp300/Locore.c ${CFILES} ${HP300}/hp300/swapgeneric.c \ 48 ioconf.c param.c| \ 49 grep -v 'struct/union .* never defined' | \ 50 grep -v 'possible pointer alignment problem' 51 52symbols.sort: ${HP300}/hp300/symbols.raw 53 grep -v '^#' ${HP300}/hp300/symbols.raw \ 54 | sed 's/^ //' | sort -u > symbols.sort 55 56locore.o: assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s 57locore.o: ${HP300}/include/trap.h ${HP300}/include/psl.h ${HP300}/include/pte.h 58locore.o: ${HP300}/include/cpu.h 59 cat assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s > locore.c 60 ${CC} -E -DLOCORE ${COPTS} locore.c > locore.i 61 @echo 'as -o locore.o locore.i' 62 @${OAS} -o locore.o locore.i 63 @rm locore.i 64 65# the following is necessary because autoconf.o depends on #if GENERIC 66autoconf.o: Makefile 67 68# the following are necessary because the files depend on the types of 69# hp cpu's included in the system configuration 70clock.o machdep.o autoconf.o conf.o: Makefile 71 72# depend on network configuration 73af.o uipc_proto.o locore.o: Makefile 74 75# depend on maxusers 76assym.s: Makefile 77 78assym.s: genassym 79 ./genassym >assym.s 80 81genassym: 82 ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 -o genassym \ 83 ${HP300}/hp300/genassym.c 84 85depend: assym.s param.c 86 mkdep ${COPTS} ${CFILES} ioconf.c 87 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${HP300}/hp300/genassym.c 88 89links: 90 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 91 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 92 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 93 sort -u | comm -23 - dontlink | \ 94 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 95 sh makelinks && rm -f dontlink 96 97tags: 98 @echo "see $S/kern/Makefile for tags" 99 100ioconf.o: ioconf.c 101 ${CC} -c ${CFLAGS} ioconf.c 102 103param.c: $S/conf/param.c 104 rm -f param.c 105 cp $S/conf/param.c . 106 107param.o: param.c Makefile 108 ${CC} -c ${CFLAGS} ${PARAM} param.c 109 110%RULES 111