1# Copyright (c) 1988 University of Utah. 2# Copyright (c) 1990 The Regents of the University of California. 3# All rights reserved. 4# 5# This code is derived from software contributed to Berkeley by 6# the Systems Programming Group of the University of Utah Computer 7# Science Department. 8# 9# %sccs.include.redist.sh 10# 11# @(#)Makefile.hp300 7.2 (Berkeley) 11/01/90 12# 13# 14# Makefile for 4.4 BSD 15# 16# This makefile is constructed from a machine description: 17# config machineid 18# Most changes should be made in the machine description 19# /sys/conf/``machineid'' 20# after which you should do 21# config machineid 22# Generic makefile changes should be made in 23# /sys/conf/Makefile.``machinetype'' 24# after which config should be rerun for all machines. 25# 26# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE 27# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 28# 29# -DTRACE compile in kernel tracing hooks 30# -DQUOTA compile in file system quotas 31# 32AS= as 33OAS= oas 34CC= cc -Dconst=__const__ -Dvolatile=__volatile__ \ 35 -Dsigned=__signed__ -Dinline=__inline__ \ 36 -Uunix -fpcc-struct-return 37LD= /bin/ld 38TOUCH= touch -f -c 39 40INCLUDES= -I. -I../sys 41COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Dhp300 -DFPCOPROC -DREFBIT 42CFLAGS= -O ${COPTS} 43 44AHEADS= 45 46%OBJS 47 48%CFILES 49 50%LOAD 51 52clean: 53 rm -f eddep *vmunix tags *.o locore.i [a-z]*.s \ 54 errs linterrs makelinks 55 56lint: param.c FRC 57 @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ 58 ../hp300/Locore.c ${CFILES} ../hp300/swapgeneric.c ioconf.c param.c|\ 59 grep -v 'struct/union .* never defined' | \ 60 grep -v 'possible pointer alignment problem' 61 62../hp300/symbols.sort: ../hp300/symbols.raw 63 grep -v '^#' ../hp300/symbols.raw \ 64 | sed 's/^ //' | sort -u > ../hp300/symbols.sort 65 66locore.o: assym.s ${AHEADS} ../hp300/vectors.s ../hp300/locore.s \ 67 ../hp300/trap.h machine/psl.h machine/pte.h ../hp300/cpu.h 68 cat assym.s ../hp300/vectors.s ../hp300/locore.s > locore.c 69 ${CC} -E -DLOCORE -I../hp300 ${COPTS} locore.c > locore.i 70 @echo 'as -o locore.o $${AHEADS} locore.i' 71 @${OAS} -o locore.o ${AHEADS} locore.i 72 @rm locore.i 73 74FRC: 75 76# the following is necessary because autoconf.o depends on #if GENERIC 77autoconf.o: Makefile 78 79# the following are necessary because the files depend on the types of 80# hp cpu's included in the system configuration 81clock.o machdep.o autoconf.o conf.o: Makefile 82 83# depend on network configuration 84af.o uipc_proto.o locore.o: Makefile 85 86# depend on maxusers 87assym.s: Makefile 88 89assym.s: genassym 90 ./genassym >assym.s 91 92genassym: 93 ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 ../hp300/genassym.c 94 95depend: assym.s param.c 96 mkdep ${COPTS} ${CFILES} ioconf.c 97 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} -o genassym ../hp300/genassym.c 98 99links: 100 egrep '#if' ${CFILES} | sed -f ../conf/defines | \ 101 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 102 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 103 sort -u | comm -23 - dontlink | \ 104 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 105 sh makelinks && rm -f dontlink 106 107tags: 108 @echo "see ../kern/Makefile for tags" 109 110print: 111 @pr -f Makefile ../sys/TODO linterrs 112 @ctags -x ${CFILES} | pr -f -h XREF 113 @(size vmunix *.o) | pr -f -h sizes 114 @ls -ls | pr -f 115 @cd ../sys; ls -ls | pr -f ; pr -f *.h 116 @echo 'once upon a time ...' 117 @cd ../hp300; pr -f Locore.c vectors.s locore.s 118 @pr -f ${CFILES} 119 120ioconf.o: ioconf.c 121 ${CC} -c ${CFLAGS} ioconf.c 122 123param.c: ../conf/param.c 124 -rm -f param.c 125 cp ../conf/param.c . 126 127param.o: param.c Makefile 128 ${CC} -c ${CFLAGS} ${PARAM} param.c 129 130%RULES 131