-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (44 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
CC = occ
AS = occ
CHTYP = iix chtyp
COPYFORK = iix copyfork
CFLAGS = -v -a0 -w-1
ASFLAGS = -v -a0
LDFLAGS =
LDLIBS =
OBJS = o/gopher.o o/q.o o/hierarchic.o o/binscii.o o/crc.o
ROBJ = o/gopher.r
gopher: $(OBJS) $(ROBJ)
$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
$(COPYFORK) $(ROBJ) $@ -r
$(CHTYP) -t s16 -a 56071 $@
linkctrl : o/linkctrl.o
$(CC) $(LDFLAGS) -o $@ $<
stringctrl : o/stringctrl.o
$(CC) $(LDFLAGS) -o $@ $<
.PHONY: clean
clean:
$(RM) gopher $(OBJS) $(ROBJ)
o:
mkdir o
o/gopher.o : gopher.c defines.h gopher.h hierarchic.h
o/index.o: index.c defines.h
o/url.o: url.c url.h
o/gopher-url.o: gopher-url.c gopher.h
o/hierarchic.o: hierarchic.c hierarchic.h
o/binscii.o : binscii.c
o/crc.o : crc.asm crc.mac
o/gopher.r: gopher.rez defines.h stringctrl
o/q.o: q.c q.h
o/%.r : %.rez | o
$(CC) -c -o $@ $<
iix rlint $@
o/%.o : %.c | o
$(CC) -c $(CFLAGS) -o $@ $<
%.mac : %.asm util.mac
iix macgen $< $@ 13:AInclude:M16.= 13:ORCAInclude:M16.= util.mac
o/%.o : %.asm | o
$(CC) -c $(ASFLAGS) -o $@ $<
$(RM) $(@:.o=.root)