head	1.6;
access;
symbols;
locks; strict;
comment	@# @;


1.6
date	2001.01.30.03.30.52;	author mhol;	state Exp;
branches;
next	1.5;

1.5
date	2001.01.24.00.14.00;	author mhol;	state Exp;
branches;
next	1.4;

1.4
date	2001.01.23.23.18.52;	author mhol;	state Exp;
branches;
next	1.3;

1.3
date	2001.01.23.22.56.50;	author mhol;	state Exp;
branches;
next	1.2;

1.2
date	2001.01.22.05.40.56;	author mhol;	state Exp;
branches;
next	1.1;

1.1
date	2001.01.21.05.40.10;	author mhol;	state Exp;
branches;
next	;


desc
@from 2.11 src tree
@


1.6
log
@*** empty log message ***
@
text
@#	Makefile	(2.11BSD)	2.3	1997/8/11
#
#	The limitations on program size have been removed.  The addition
#	of disklabel support pushed 'restor' over the limit.  Even with
#	additional space saving measures it was impossible to fit restor
#	into 48kb.  'icheck' and 'restor' are now built with split I/D.
#
#	This is not as bad as it sounds - the kernel has not been able to
#	run on a non split machine for many years.  It made little sense 
#	to restrict the standalone utilities to non-split mode when the
#	operating system itself required split I/D.
#
#	It is still possible to hand craft a version of the utilities by leaving
#	out all but the necessary drivers. 
#
# 1997/8/11  - add -O to maketape and makesimtape compile commands
# 1997/1/24  - remove 'skel' from lists of directories.
# 1997/1/18  - add 'makesimtape' target.
# 1996/10/28 - added usr/sbin, usr/libexec and corresponding src directories.
# 1995/12/05 - add RX02 driver.
# 1995/06/05 - add disklabel program to Makefile.
# 1995/06/01 - use split I/D for icheck and restor.
# 1995/05/30 - Begin adding disklabel support.

ROOT=	
SBINSRC=${ROOT}/usr/src/sbin
MKFS=	${SBINSRC}/mkfs/mkfs.c
RESTOR=	${SBINSRC}/restor/restor.c
ICHECK=	${SBINSRC}/icheck/icheck.c

DEFS=	-DSTANDALONE -I${ROOT}/usr/include -I${ROOT}.
CFLAGS=	-O ${DEFS}
LDFLAGS= -lkern -lc

DRIVERS=prf.o sys.o label.o \
	xp.o rk.o rl.o rx.o br.o hk.o si.o ra.o vt.o

ALL=	vtboot tinyboot copy 211disklabel 211mkfs 211restor 211icheck

all: ${ALL}

.c.o:
	cc ${CFLAGS} -c $*.c

.s.o:
	/lib/cpp -P ${DEFS} $< | as -u -V -o $@@

srt0-i.o: srt0.s
	/lib/cpp -P -DSPLIT_ID ${DEFS} srt0.s | as -u -V -o $@@

libsa.a: ${DRIVERS}
	ar rv $@@ $?
	ranlib $@@

mkfs.o: ${MKFS}
	cc ${CFLAGS} -c ${MKFS}

restor.o: ${RESTOR}
	cc ${CFLAGS} -c ${RESTOR}

icheck.o: ${ICHECK}
	cc ${CFLAGS} -c ${ICHECK}

tinyboot: M.o tinyboot.o ubmapset.o tinysys.o vt.o prf.o
	ld -X -o a.out M.o tinyboot.o ubmapset.o tinysys.o vt.o prf.o ${LDFLAGS}
	strip a.out
	dd if=a.out of=tinyboot bs=16 skip=1

copy: copy.o srt0.o conf.o libsa.a
	ld -X -o $@@ srt0.o conf.o $@@.o libsa.a ${LDFLAGS}

211mkfs: srt0.o conf.o libsa.a mkfs.o
	ld -X -o $@@ srt0.o conf.o mkfs.o libsa.a ${LDFLAGS}

211restor: srt0-i.o conf.o libsa.a restor.o
	ld -X -i -o $@@ srt0-i.o conf.o restor.o libsa.a ${LDFLAGS}

211icheck: srt0-i.o conf.o libsa.a icheck.o
	ld -X -i -o $@@ srt0-i.o conf.o icheck.o libsa.a ${LDFLAGS}

211disklabel: srt0.o conf.o libsa.a disklabel.o displaylab.o
	ld -X -o $@@ srt0.o conf.o disklabel.o displaylab.o libsa.a ${LDFLAGS}

vtboot: vtboot.o
	strip $@@.o
	dd if=$@@.o of=vtboot bs=16 skip=1
	rm -f $@@.o

tags: FRC
	rm -f tags
	ctags *.[ch]
	for i in M.s; do \
		${EGREP} '^[_a-zA-Z][_a-zA-Z0-9]*:' $$i \
		| ${SED} "s;\([^:]*\):\(.*\)$$;\1	$$i	/^\1:\2$$/;" \
		>> tags; \
	done
	sort -o tags tags

FRC:

clean:
	rm -f ${ALL} ${AUX} libsa.a *.o tags a.out

M.o:		M.s
boot.o:		boot.c
br.o:		br.c
cat.o:		cat.c
conf.o:		conf.c
copy.o:		copy.c
disklabel.o:	disklabel.c
displaylab.o:	displaylab.c
hk.o:		hk.c
label.o:	label.c
prf.o:		prf.c
ra.o:		ra.c
rk.o:		rk.c
rl.o:		rl.c
rx.c:		rx.c
si.o:		si.c
srt0-i.o:	srt0.s
srt0.o:		srt0.s
sys.o:		sys.c
tinyboot.o:	tinyboot.c
tinysys.o:	tinysys.c
ubmapset.o:	ubmapset.c
vt.o:		vt.c
vtboot.o:	vtboot.s
xp.o:		xp.c
@


1.5
log
@ok, can compile the 211 stuff, but tinyboot won't load split i/d files.
@
text
@d33 1
d38 1
a38 1
ALL=	tinyboot copy 211disklabel 211mkfs 211restor 211icheck
d65 1
a65 1
	ld -X -o a.out M.o tinyboot.o ubmapset.o tinysys.o vt.o prf.o -lc
d70 1
a70 1
	ld -X -o $@@ srt0.o conf.o $@@.o libsa.a -lc
d73 1
a73 1
	ld -X -o $@@ srt0.o conf.o mkfs.o libsa.a -lc
d76 1
a76 1
	ld -X -i -o $@@ srt0-i.o conf.o restor.o libsa.a -lc
d79 1
a79 1
	ld -X -i -o $@@ srt0-i.o conf.o icheck.o libsa.a -lc
d82 1
a82 1
	ld -X -o $@@ srt0.o conf.o disklabel.o displaylab.o libsa.a -lc
@


1.4
log
@ don't need tmscp tape drive
,.
@
text
@a24 8
# DISK	which disk to take a root dump of for the distribution tape
# TAPE	which tape to write the distribution on
# DUMP	where to store a root system dump if you do a ``make dump''
#
DISK=	xp0a
TAPE=	mt8
DUMP=	/usr/root.dump

d37 1
a37 1
ALL=	tinyboot copy
d54 9
d71 12
d103 1
d105 2
d108 2
a109 1
cat.o:		cat.c
a110 1
disklabel.o:	disklabel.c
a111 1
ht.o:		ht.c
a112 1
mtboot.o:	mtboot.s
d114 1
d118 2
a119 1
br.o:		br.c
a120 1
srt0-i.o:	srt0.s
d122 2
a123 2
tm.o:		tm.c
ts.o:		ts.c
d125 2
@


1.3
log
@*** empty log message ***
@
text
@a42 1
	tmscp.o \
a107 1
tmscp.o:	tmscp.c
@


1.2
log
@*** empty log message ***
@
text
@a41 1
BOOT=	M.o boot.o ubmapset.o
d46 1
a46 1
ALL=	tinyboot
d63 2
a64 2
tinyboot: M.o conf.o boot.o ubmapset.o libsa.a
	ld -X -o a.out M.o conf.o boot.o ubmapset.o libsa.a -lc
d89 1
a89 1
	rm -f ${ALL} ${AUX} libsa.a *.o tags
@


1.1
log
@Initial revision
@
text
@d44 2
a45 2
	ht.o tm.o ts.o tmscp.o \
	xp.o rk.o rl.o rx.o br.o hk.o si.o ra.o
d47 1
a47 1
ALL=	mtboot boot disklabel mkfs restor icheck maketape makesimtape toyset
a59 49
distribution: tape1 switch_tapes tape2

tmscptape: ${ALL} ${DUMP}
	./maketape /dev/nr${TAPE} maketape.data
	dd if=${DUMP} of=/dev/nr${TAPE} bs=20b
	cd ${ROOT}/usr; tar cfb /dev/nr${TAPE} 20 \
		adm bin crash dict doc games guest hosts include ingres \
		lib libdata libexec local man msgs new old preserve pub \
		sbin share spool tmp ucb
	cd ${ROOT}/usr/src; tar cfb /dev/nr${TAPE} 20 \
		sys include
	cd ${ROOT}/usr/src; tar cfb /dev/r${TAPE} 20 \
		Makefile asm.sed asm.sed.pdp asm.sed.vax bin etc games \
		lib libexec local man new old sbin share ucb usr.bin \
		usr.lib usr.sbin

tape1: ${ALL} ${DUMP}
	./maketape /dev/nr${TAPE} maketape.data
	dd if=${DUMP} of=/dev/nr${TAPE} bs=20b
	cd ${ROOT}/usr; tar cfb /dev/nr${TAPE} 20 \
		adm bin crash dict doc games guest hosts include ingres \
		lib libdata libexec local man msgs new old preserve pub \
		sbin share spool tmp ucb
	cd ${ROOT}/usr/src; tar cfb /dev/nr${TAPE} 20 \
		sys include

switch_tapes: FRC
	@@echo "Switch tapes.  Hit CR when second tape is mounted."
	@@head -1

FRC:

tape2:
	cd ${ROOT}/usr/src; tar cfb /dev/r${TAPE} 20 \
		Makefile asm.sed asm.sed.pdp asm.sed.vax bin etc games \
		lib libexec local man new old sbin share ucb usr.bin \
		usr.lib usr.sbin

${DUMP}:
	@@echo "You must make a dump of the root file system first."
	exit 1

dump:
	dump 0f ${DUMP} /dev/r${DISK}

install: boot
	install -s boot ${ROOT}/


d64 4
a67 2
mkfs.o: ${MKFS}
	cc ${CFLAGS} -c ${MKFS}
d69 2
a70 5
restor.o: ${RESTOR}
	cc ${CFLAGS} -c ${RESTOR}

icheck.o: ${ICHECK}
	cc ${CFLAGS} -c ${ICHECK}
d72 1
a72 1
mtboot: mtboot.o
d74 1
a74 1
	dd if=$@@.o of=mtboot bs=16 skip=1
a75 24

boot: M.o conf.o boot.o ubmapset.o libsa.a
	ld -X -o $@@ M.o conf.o boot.o ubmapset.o libsa.a -lc

mkfs: srt0.o conf.o libsa.a mkfs.o
	ld -X -o $@@ srt0.o conf.o $@@.o libsa.a -lc

restor: srt0-i.o conf.o libsa.a restor.o
	ld -X -i -o $@@ srt0-i.o conf.o $@@.o libsa.a -lc

icheck: srt0-i.o conf.o libsa.a icheck.o
	ld -X -i -o $@@ srt0-i.o conf.o $@@.o libsa.a -lc

disklabel: srt0.o conf.o libsa.a disklabel.o displaylab.o
	ld -X -o $@@ srt0.o conf.o $@@.o displaylab.o libsa.a -lc

maketape: maketape.c
	cc -O -o $@@ maketape.c

makesimtape: makesimtape.c
	cc -O -o $@@ makesimtape.c

toyset: toyset.o srt0.o conf.o libsa.a
	ld -X -o $@@ srt0.o conf.o $@@.o libsa.a -lc
@
