-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
49 lines (33 loc) · 808 Bytes
/
GNUmakefile
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
COMMON_OBJS = o/vt100.a o/ansi.a o/chars.a o/display.a o/screen.a
MARLENE_OBJS = o/marlene.a o/telnet.a o/marinetti.a
DARLENE_OBJS = o/darlene.a
CC = occ --gno
OPTIMIZE ?= 79
CFLAGS = -w-1 -O $(OPTIMIZE)
ASMFLAGS =
.PHONY: all clean clobber
all: marlene darlene
marlene: $(MARLENE_OBJS) $(COMMON_OBJS)
$(CC) -o $@ $^
darlene: $(DARLENE_OBJS) $(COMMON_OBJS)
$(CC) -lutil -o $@ $^
# iix chtyp -a 0xdc00 $@
marlene.o: marlene.c
darlene.o: darlene.c
vt100.o: vt100.c CLAGS+=-r
marinetti.o: marinetti.c CLAGS+=-r
telnet.o: telnet.c CLAGS+=-r
screen.o: screen.c CLAGS+=-r
ansi.o: ansi.asm
chars.o: chars.asm
o :
mkdir o
o/%.a : %.c | o
$(CC) -c $(CFLAGS) -o $@ $^
o/%.a : %.asm | o
$(CC) -c $(ASMFLAGS) -o $@ $^
$(RM) o/$*.root
clean:
$(RM) -rf o
clobber: clean
$(RM) -f marlene darlene