head     1.11;
branch   ;
access   ;
symbols  ;
locks    bin:1.11;
comment  @# @;


1.11
date     93.01.13.13.46.55;  author bin;  state Exp;
branches ;
next     1.10;

1.10
date     92.07.20.14.32.41;  author bin;  state Exp;
branches ;
next     1.9;

1.9
date     92.07.15.14.06.51;  author bin;  state Exp;
branches ;
next     1.8;

1.8
date     92.05.28.08.54.42;  author bin;  state Exp;
branches ;
next     1.7;

1.7
date     92.05.05.15.17.12;  author piggy;  state Exp;
branches ;
next     1.6;

1.6
date     92.05.05.11.38.45;  author piggy;  state Exp;
branches ;
next     1.5;

1.5
date     92.01.09.09.23.50;  author piggy;  state Exp;
branches ;
next     1.4;

1.4
date     91.10.21.16.32.02;  author piggy;  state Exp;
branches ;
next     1.3;

1.3
date     91.10.03.15.05.40;  author piggy;  state Exp;
branches ;
next     1.2;

1.2
date     91.10.03.15.00.09;  author piggy;  state Exp;
branches ;
next     1.1;

1.1
date     91.09.30.14.44.46;  author piggy;  state Exp;
branches ;
next     ;


desc
@Makefile for Tertiary boot.
@


1.11
log
@Hal: added printf code, removed
buy coherent msg, added fix to coff.c because we were blowing a struct
when booting the gcc (240K) kernel.
@
text
@# Makefile for Tertiary boot code for COHERENT
# Targets are stand-alone bootable programs.
#
# La Monte H. Yarroll <piggy@@mwc.com>, September 1991


#CC=cc286
#LD=cc286
#AR=/bin/286/ar
#RANLIB=/bin/286/ranlib
CP=cp
#AS=/bin/286/as

CC=cc
LD=ld
AR=/bin/ar
RANLIB=/bin/ranlib
AS=/bin/as

DESTDIR=/bin386/
DESTDIR2=/bin386/etc/

LIBOBJECTS=bootlib.o cbootlib.o diskio.o indirect.o intcall.o monitor.o \
	l.out.o coff.o bio.o gift.o objects.o pacifier.o \
	fifo_b.o fifo_k.o sys.o fdisk.o arg_exist.o execute.o \
	cpu_type.o printf.o

LIBSOURCES=bootlib.m cbootlib.c diskio.c indirect.c intcall.m monitor.c \
	l.out.c coff.c bio.c gift.c objects.c pacifier.c \
	fifo_b.c fifo_k.c sys.c fdisk.c arg_exist.c execute.c \
	cpu_type.s printf.c

OBJECTS=Startup.o $(LIBOBJECTS)

SOURCES=Startup.s $(LIBSOURCES)

LIBS=libtboot.a /lib/libc.a
#LIBS=libtboot.a libtboot.a libtboot.a /lib/286/libc.a
INCLUDE=-I.
CFLAGS=$(INCLUDE)

all: tboot bootcmd
	touch all

# NB: Startup.o must come first in the link line, so the entry
# point in Startup lines up correctly.
tboot: sys/ptypes.h  Startup.o tboot.o builtin.o libtboot.a
	$(LD) -o $(DESTDIR)tboot Startup.o tboot.o builtin.o $(LIBS)

bootcmd: bootcmd.o fifo_k.o
	$(LD) -o $(DESTDIR2)bootcmd bootcmd.o fifo_k.o

libtboot.a: $(LIBOBJECTS) 
	rm -f $@@
	$(AR) rkus $@@ $(LIBOBJECTS)
	$(RANLIB) $@@

sys/ptypes.h: ptypes.h
	$(CP) ptypes.h sys/ptypes.h

pacifier.o:	pacifier.c pac_states.h
	$(CC) -c $(CFLAGS) pacifier.c

hello: hello.o $(OBJECTS)
	$(LD) -o hello $(OBJECTS) hello.o $(LIBS)

hello.o: Examples/hello.c

dir: dir.o $(OBJECTS) 
	$(LD) -o dir $(OBJECTS) dir.o $(LIBS)

dir.o: Examples/dir.c

newdir: newdir.o libtboot.a
	$(LD) -o newdir Startup.o newdir.o $(LIBS)

newdir.o: Examples/newdir.c

tags:
	ctags -r *.[ch]

clean:
	rm -f l.out *.o *.a

install:
	cp tboot $(DESTDIR)
	chown root $(DESTDIR)/tboot
	chgrp daemon $(DESTDIR)/tboot
	chmod ugo=r $(DESTDIR)/tboot
@


1.10
log
@piggy: removed typed.h
@
text
@d6 5
a10 4
CC=cc286
LD=cc286
AR=/bin/286/ar
RANLIB=/bin/286/ranlib
d12 1
a12 1
AS=/bin/286/as
d14 5
a18 1
DESTDIR=/
d20 3
d26 1
a26 1
	cpu_type.o
d31 1
a31 1
	cpu_type.s
d37 2
a38 1
LIBS=libtboot.a libtboot.a libtboot.a /lib/286/libc.a
d48 1
a48 1
	$(LD) -o tboot Startup.o tboot.o builtin.o $(LIBS)
d51 1
a51 1
	$(LD) -o bootcmd bootcmd.o fifo_k.o
@


1.9
log
@*** empty log message ***
@
text
@d6 6
a11 6
#CC=cc286
#LD=cc286
#AR=/bin/286/ar
#RANLIB=/bin/286/ranlib
#CP=cp
#AS=/bin/286/as
d13 1
a13 9
CC=cc
LD=/bin/ld
AR=/bin/ar
ranlib=/bin/ranlib
CP=cp
AS=/bin/as

DESTDIR386=/bin386/bin/
DESTDIR=/interim/
d33 3
d38 1
a38 1
tboot: sys/typed.h sys/ptypes.h  Startup.o tboot.o builtin.o libtboot.a
d41 3
a48 3
sys/typed.h: typed.h
	$(CP) typed.h sys/typed.h

d78 3
a80 9
	chown root $(DESTDIR)tboot
	chgrp daemon $(DESTDIR)tboot
	chmod ugo=r $(DESTDIR)tboot

install386:
	cp tboot $(DESTDIR386)
	chown root $(DESTDIR386)tboot
	chgrp daemon $(DESTDIR386)tboot
	chmod ugo=r $(DESTDIR386)tboot
@


1.8
log
@piggy update to load tboot into higher ram
@
text
@d6 11
a16 4
CC=cc286
LD=cc286
AR=/bin/286/ar
RANLIB=/bin/286/ranlib
d18 1
a18 1
AS=/bin/286/as
d20 2
a21 1
DESTDIR=/
d25 2
a26 1
	fifo_b.o fifo_k.o sys.o fdisk.o arg_exist.o
d30 2
a31 1
	fifo_b.c fifo_k.c sys.c fdisk.c arg_exist.c
d83 9
a91 3
	chown root $(DESTDIR)/tboot
	chgrp daemon $(DESTDIR)/tboot
	chmod ugo=r $(DESTDIR)/tboot
@


1.7
log
@Adjusted to work with 286 tools under COH386.
@
text
@d7 1
a7 1
LD=/bin/286/ld
d11 1
@


1.6
log
@Added pacifier support
@
text
@d6 4
a9 3
LD=ld
AR=ar
RANLIB=ranlib
d26 2
a27 2
LIBS=libtboot.a -lc
INCLUDE=-I/usr/include/coff -I.
d37 1
a37 1
	$(AR) rku $@@ $(LIBOBJECTS)
@


1.5
log
@Substatial changes.
@
text
@d14 1
a14 1
	l.out.o coff.o bio.o gift.o objects.o \
d18 1
a18 1
	l.out.c coff.c bio.c gift.c objects.c \
d31 1
a31 1
tboot: sys/typed.h sys/ptypes.h tboot.o builtin.o libtboot.a
d34 1
a34 1
libtboot.a: $(LIBOBJECTS)
d45 3
@


1.4
log
@Added fifo object to link.
@
text
@d6 5
d13 14
a26 7
OBJECTS=Startup.o bootlib.o cbootlib.o diskio.o indirect.o intcall.o monitor.o \
	l.out.o coff.o fifo.o
SOURCES=Startup.s bootlib.s cbootlib.c diskio.c indirect.c intcall.m monitor.c \
	l.out.c coff.c fifo.c
LIBS=-lc
LD=ld
INCLUDE=-I/usr/include/coff
d29 1
a29 1
# NB: OBJECTS must come first in the link line, so the entry
d31 2
a32 2
tboot: tboot.o builtin.o $(OBJECTS)
	$(LD) -o tboot $(OBJECTS) tboot.o builtin.o $(LIBS)
d34 12
a45 1
hello: hello.o $(OBJECTS) 
d48 2
d53 10
d64 1
a64 1
	rm -f l.out *.o
@


1.3
log
@Added install target.
@
text
@d9 1
a9 1
	l.out.o coff.o
d11 1
a11 1
	l.out.c coff.c
@


1.2
log
@Support for l.out moved to seperate file.
@
text
@d6 2
d30 6
@


1.1
log
@Initial revision
@
text
@d6 4
a9 2
OBJECTS=Startup.o bootlib.o cbootlib.o diskio.o indirect.o intcall.o monitor.o
SOURCES=Startup.s bootlib.s cbootlib.c diskio.c indirect.c intcall.m monitor.c
d12 2
a14 1

@
