-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (46 loc) · 1.03 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
%.co: %.c
$(CC) $(CFLAGS) -c -g -fprofile-arcs -ftest-coverage -o $@ $<
CFLAGS = -O2
all: a64 l64 #a64cov
yaccer.c: yaccer.y
bison -v -d -o yaccer.c yaccer.y
yaccer.h: yaccer.c
lexer.c: lexer.l yaccer.h
flex -i -olexer.c lexer.l
a64: l64 ymain.o lexer.o yaccer.o mnemonics.o emit.o
$(CC) -o a64 ymain.o yaccer.o lexer.o mnemonics.o emit.o
a64cov: l64 ymain.co lexer.co yaccer.co mnemonics.co emit.co
$(CC) -o a64cov ymain.co yaccer.co lexer.co mnemonics.co emit.co
ci: clean
ci -q -mx *.c *.h *.l *.y docs.txt
ci -q -mx requirements.txt
rcs -U RCS/*
co -q RCS/*
clean:
rm -f #*#
rm -f a64??????
rm -f *.bb
rm -f *.bbg
rm -f *.gcov
rm -f *.o
rm -f *.co
rm -f *.da
rm -f yaccer.h
rm -f lexer.c
rm -f yaccer.c
rm -f #*#
rm -f *~
rm -f a64
rm -f yaccer.output
rm -f *.exe
rm -f l64
rm -f lnk.c
rm -f a64cov
test: a64
# this was non-free code, removed. Sorry.
# ./a64 tests/test.asm
# ./a64 tests/border.asm
install: a64
cp a64 /usr/local/bin
mkdir -p /usr/local/lib/a64
cp -R include /usr/local/lib/a64