|
|
Initial revision
# Copyright (c) 1988 University of Utah.
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
#
# This code is derived from software contributed to Berkeley by
# the Systems Programming Group of the University of Utah Computer
# Science Department.
#
# %sccs.include.redist.sh
#
# @(#)Makefile.hp300 7.1 (Berkeley) 5/8/90
#
#
# Makefile for 4.4 BSD
#
# This makefile is constructed from a machine description:
# config machineid
# Most changes should be made in the machine description
# /sys/conf/``machineid''
# after which you should do
# config machineid
# Generic makefile changes should be made in
# /sys/conf/Makefile.``machinetype''
# after which config should be rerun for all machines.
#
# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
#
# -DTRACE compile in kernel tracing hooks
# -DQUOTA compile in file system quotas
# -DSWABIPS compile in code to byte swap ip packets on 3Mb/s Ethernet
#
AS= as
OAS= oas
CC= cc -Dconst=__const__ -Dvolatile=__volatile__ \
-Dsigned=__signed__ -Dinline=__inline__ \
-Uunix -fpcc-struct-return
LD= /bin/ld
TOUCH= touch -f -c
INCLUDES= -I. -I../sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Dhp300 -DFPCOPROC -DREFBIT
CFLAGS= -O ${COPTS}
AHEADS=
%OBJS
%CFILES
%LOAD
clean:
rm -f eddep *vmunix tags *.o locore.i [a-z]*.s \
errs linterrs makelinks
lint: param.c FRC
@lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
../hp300/Locore.c ${CFILES} ../hp300/swapgeneric.c ioconf.c param.c|\
grep -v 'struct/union .* never defined' | \
grep -v 'possible pointer alignment problem'
../hp300/symbols.sort: ../hp300/symbols.raw
grep -v '^#' ../hp300/symbols.raw \
| sed 's/^ //' | sort -u > ../hp300/symbols.sort
locore.o: assym.s ${AHEADS} ../hp300/vectors.s ../hp300/locore.s \
../hp300/trap.h machine/psl.h machine/pte.h ../hp300/cpu.h
cat assym.s ../hp300/vectors.s ../hp300/locore.s > locore.c
${CC} -E -DLOCORE -I../hp300 ${COPTS} locore.c > locore.i
@echo 'as -o locore.o $${AHEADS} locore.i'
@${OAS} -o locore.o ${AHEADS} locore.i
@rm locore.i
FRC:
# the following is necessary because autoconf.o depends on #if GENERIC
autoconf.o: Makefile
# the following are necessary because the files depend on the types of
# hp cpu's included in the system configuration
clock.o machdep.o autoconf.o conf.o: Makefile
# depend on network configuration
af.o uipc_proto.o locore.o: Makefile
# depend on maxusers
assym.s: Makefile
assym.s: ../sys/param.h machine/pte.h ../sys/buf.h ../sys/vmparam.h \
../sys/vmmeter.h ../sys/dir.h ../sys/cmap.h ../sys/map.h ../sys/syscall.h \
../sys/proc.h ../sys/msgbuf.h ../sys/text.h ../sys/user.h ../sys/mbuf.h \
machine/cpu.h machine/trap.h machine/psl.h machine/reg.h machine/clockreg.h
${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 ../hp300/genassym.c
./a.out >assym.s; rm -f a.out
depend: assym.s param.c
${CC} -M ${COPTS} ${CFILES} param.c ioconf.c | \
sed -e ':loop' \
-e 's/\.\.\/[^ /]*\/\.\./../' \
-e 's/ \.\// /' \
-e 't loop' | \
awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' > makedep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
cp Makefile Makefile.bak
ex - Makefile < eddep
rm eddep makedep
links:
egrep '#if' ${CFILES} | sed -f ../conf/defines | \
sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
sort -u | comm -23 - dontlink | \
sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
tags:
@echo "see ../kern/Makefile for tags"
print:
@pr -f Makefile ../sys/TODO linterrs
@/usr/ucb/ctags -x ${CFILES} | pr -f -h XREF
@(size vmunix *.o) | pr -f -h sizes
@ls -ls | pr -f
@cd ../h; ls -ls | pr -f ; pr -f *.h
@echo 'once upon a time ...'
@cd ../hp300; pr -f Locore.c vectors.s locore.s
@pr -f ${CFILES}
ioconf.o: ioconf.c
${CC} -c ${CFLAGS} ioconf.c
param.c: ../conf/param.c
-rm -f param.c
cp ../conf/param.c .
param.o: param.c Makefile
${CC} -c ${CFLAGS} ${PARAM} param.c
%RULES
# DO NOT DELETE THIS LINE -- make depend uses it
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.