File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / sys / conf / makefile.tahoe
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:29:40 2019 UTC (6 years, 11 months ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

#	makefile.tahoe	6.3	9/25/83
#
# Makefile for 4.2 BSD
#
# This makefile is constructed from a machine description:
#	config machine
# 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
# 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
# -DAUDITTRAIL  compile with audit trail hooks
# -DSWABIPS	compile in code to byte swap ip packets on 3Mb/s Ethernet
#
DESTDIR=
AS=/bin/as
CC=/bin/cc
LD=/bin/ld
INCLDIR=${DESTDIR}/usr/include
LIBDIR=${DESTDIR}/lib
ULIBDIR=${DESTDIR}/usr/lib

LCC=/bin/cc
TOUCH=	touch -c

COPTS=	${IDENT} -DKERNEL
CFLAGS=	-O ${COPTS}

LIBSYS = ${LIBDIR}/libc.a
SYS5_SYS = unix
SYS5_NODE = unix
SYS5_REL = 4.2/Vr2
SYS5_VER = Power6
SYS5_MACH = Power6

%OBJS

%CFILES

%LOAD

clean:
	rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \
		errs linterrs makelinks

lint: /tmp
	@lint -hbxn -I. -DGENERIC ${COPTS} ../machine/Locore.c \
	  ${CFILES} ${MCFILES} ../machine/swapgeneric.c ioconf.c | \
	    grep -v 'struct/union .* never defined' | \
	    grep -v 'possible pointer alignment problem'

../machine/symbols.sort: ../machine/symbols.raw
	grep -v '^#' ../machine/symbols.raw \
	    | sed 's/^	//' | sort -u > ../machine/symbols.sort

locore.o: assym.s ../machine/scb.s ../machine/locore.s \
    ubglue.s ../machine/mtpr.h ../machine/trap.h ../machine/psl.h \
    ../machine/pte.h ../machine/cp.h ../machine/mem.h
	cat assym.s ../machine/scb.s ../machine/locore.s \
	    ubglue.s > locore.c
	${CC} -E -I. -DLOCORE ${COPTS} locore.c > locore.i
	@echo 'as -o locore.o locore.i'
	@${AS} -o locore.o locore.i
	@rm locore.i

# the following is necessary because autoconf.o depends on #if GENERIC
autoconf.o tu.o: makefile

# depend on network configuration
af.o : makefile
# depend on maxusers
assym.s: makefile ../machine/genassym.c

assym.s: ../h/param.h ../machine/pte.h ../h/buf.h ../h/vmparam.h \
    ../h/vmmeter.h ../h/dir.h ../h/cmap.h ../h/map.h ../vba/vbavar.h \
    ../h/proc.h ../h/msgbuf.h ../h/user.h
	${LCC} -I${INCLDIR} ${IDENT} ${PARAM} -DKUTIL ../machine/genassym.c; ./a.out >assym.s; rm -f a.out

../h/param.h: ../machine/param.h ../h/signal.h ../h/types.h
	${TOUCH} ../h/param.h
../h/tty.h:  ../h/ttychars.h ../h/ttydev.h
	${TOUCH} ../h/tty.h
../h/ioctl.h: /usr/include/sgtty.h ../h/ttychars.h ../h/ttydev.h
	${TOUCH} ../h/ioctl.h
../h/user.h: ../machine/pcb.h ../h/dmap.h ../h/time.h ../h/resource.h \
    /usr/include/errno.h
	${TOUCH} ../h/user.h
../h/vm.h: ../h/vmmac.h ../h/vmmeter.h ../h/vmparam.h ../h/vmsystm.h
	${TOUCH} ../h/vm.h
../h/vmparam.h: ../machine/vmparam.h
	${TOUCH} ../h/vmparam.h

depend:
	grep '^#include' ${CFILES} > edfiles
	grep '^#include' ${MCFILES} >>  edfiles
	cat edfiles | grep -v '<' | \
	sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
	    -e 's/\.c/.o/' \
	    -e 's,../[a-zA-Z]*/,,' | \
	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 '$$r makedep' >>eddep
	echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
	echo '$$r makedep' >>eddep
	echo 'w' >>eddep
	cp makefile makefile.bak
	ed - makefile < eddep
	rm edfiles eddep makedep


links:
	egrep '#if' ${CFILES} | sed -f ../conf/defines | \
	  sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
	egrep '#if' ${MCFILES} | 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
	echo ${MCFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
	  sort -u | comm -23 - dontlink | \
	  sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' >> makelinks
	echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks
	echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks
	sh makelinks && rm -f dontlink

tags:
	/usr/ucb/ctags ${CFILES} ${MCFILES}

print:
	@pr -f makefile ../sys/TODO linterrs
	@/usr/ucb/ctags -x ${CFILES} ${MCFILES} | pr -f -h XREF
	@(size vmunix *.o) | pr -f -h sizes
	@ls -ls | pr -f
	@cd ../h; ls -ls | pr -f ; pr -f *.m *.h
	@echo 'once upon a time ...'
	@cd ../sys; pr -f asm.sed Locore.c scb.s locore.s
	@pr -f ${CFILES} ${MCFILES}

ioconf.o: ioconf.c ../h/param.h ../machine/pte.h ../h/buf.h ../h/map.h \
    ../h/vm.h ../vba/vbavar.h

param.c: ../conf/param.c
	rm -f param.c
	cp ../conf/param.c .

param.o: param.c makefile
	${CC} -I. -c ${CFLAGS} ${PARAM} param.c

# for uname system call

sys5_name.o: ../sys/sys5_name.c makefile
	${CC} -I. -c -O ${COPTS} \
		-DSYS5_SYS=\"`expr $(SYS5_SYS) : '\(.\{1,8\}\)'`\" \
		-DSYS5_NODE=\"`expr $(SYS5_NODE) : '\(.\{1,8\}\)'`\" \
		-DSYS5_REL=\"`expr $(SYS5_REL) : '\(.\{1,8\}\)'`\" \
		-DSYS5_VER=\"`expr $(SYS5_VER) : '\(.\{1,8\}\)'`\" \
		-DSYS5_MACH=\"`expr $(SYS5_MACH) : '\(.\{1,8\}\)'`\" \
		../sys/sys5_name.c

%RULES

# DO NOT DELETE THIS LINE -- make depend uses it


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.