|
|
1.1 root 1: # Makefile for Tertiary boot code for COHERENT
2: # Targets are stand-alone bootable programs.
3: #
4: # La Monte H. Yarroll <[email protected]>, September 1991
5:
6: OBJDIR=objects
7:
8: #CC=cc286
9: #LD=cc286
10: #AR=/bin/286/ar
11: #RANLIB=/bin/286/ranlib
12: CP=cp
13: #AS=/bin/286/as
14:
15: CC=cc
16: LD=ld
17: AR=/bin/ar
18: RANLIB=/bin/ranlib
19: AS=/bin/as
20:
21: DESTDIR=./
22: DESTDIR2=./
23:
24: LIBOBJECTS=$(OBJDIR)/bootlib.o $(OBJDIR)/cbootlib.o $(OBJDIR)/diskio.o $(OBJDIR)/indirect.o $(OBJDIR)/intcall.o $(OBJDIR)/monitor.o \
25: $(OBJDIR)/l.out.o $(OBJDIR)/coff.o $(OBJDIR)/bio.o $(OBJDIR)/gift.o $(OBJDIR)/objects.o $(OBJDIR)/pacifier.o \
26: $(OBJDIR)/fifo_b.o $(OBJDIR)/fifo_k.o $(OBJDIR)/sys.o $(OBJDIR)/fdisk.o $(OBJDIR)/arg_exist.o $(OBJDIR)/execute.o \
27: $(OBJDIR)/cpu_type.o $(OBJDIR)/printf.o
28:
29: LIBSOURCES=bootlib.m cbootlib.c diskio.c indirect.c intcall.m monitor.c \
30: l.out.c coff.c bio.c gift.c objects.c pacifier.c \
31: fifo_b.c fifo_k.c sys.c fdisk.c arg_exist.c execute.c \
32: cpu_type.s printf.c
33:
34: OBJECTS=$(OBJDIR)/Startup.o $(LIBOBJECTS)
35:
36: SOURCES=Startup.s $(LIBSOURCES)
37:
38: LIBS=$(OBJDIR)/libtboot.a /lib/libc.a
39: #LIBS=libtboot.a libtboot.a libtboot.a /lib/286/libc.a
40: INCLUDE=-I. -I/usr/include -I/usr/include/sys
41: CFLAGS=$(INCLUDE)
42:
43: all: tboot bootcmd
44: touch all
45:
46: # NB: Startup.o must come first in the link line, so the entry
47: # point in Startup lines up correctly.
48: tboot: sys/ptypes.h $(OBJDIR)/Startup.o $(OBJDIR)/tboot.o $(OBJDIR)/builtin.o $(OBJDIR)/libtboot.a
49: $(LD) -o $(DESTDIR)tboot $(OBJDIR)/Startup.o $(OBJDIR)/tboot.o $(OBJDIR)/builtin.o $(LIBS)
50:
51: bootcmd: bootcmd.o fifo_k.o
52: $(LD) -o $(DESTDIR2)bootcmd bootcmd.o fifo_k.o
53:
54: $(OBJDIR)/libtboot.a: $(LIBOBJECTS)
55: rm -f $@
56: $(AR) rkus $@ $(LIBOBJECTS)
57: $(RANLIB) $@
58:
59: sys/ptypes.h: ptypes.h
60: $(CP) ptypes.h sys/ptypes.h
61:
62: $(OBJDIR)/pacifier.o: pacifier.c pac_states.h
63: $(CC) -c $(CFLAGS) pacifier.c
64:
65: $(OBJDIR)/tboot.o: tboot.c
66: $(CC) -o $@ -c $(CFLAGS) tboot.c
67:
68: $(OBJDIR)/coff.o: coff.c
69: $(CC) -o $@ -c $(CFLAGS) coff.c
70:
71: hello: hello.o $(OBJECTS)
72: $(LD) -o hello $(OBJECTS) hello.o $(LIBS)
73:
74: hello.o: Examples/hello.c
75:
76: dir: dir.o $(OBJECTS)
77: $(LD) -o dir $(OBJECTS) dir.o $(LIBS)
78:
79: dir.o: Examples/dir.c
80:
81: newdir: newdir.o libtboot.a
82: $(LD) -o newdir Startup.o newdir.o $(LIBS)
83:
84: newdir.o: Examples/newdir.c
85:
86: tags:
87: ctags -r *.[ch]
88:
89: clean:
90: rm -f l.out *.o *.a
91:
92: install:
93: cp tboot $(DESTDIR)
94: chown root $(DESTDIR)/tboot
95: chgrp daemon $(DESTDIR)/tboot
96: chmod ugo=r $(DESTDIR)/tboot
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.