-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.bak
81 lines (61 loc) · 1.95 KB
/
Makefile.bak
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
CC=gcc
CFLAGS=-Wall -g -pedantic -O2
LIBS=-L. -lm -lcurl -lpcre -lreadline -lffflllist -lfffllstd -lfffllglue -lfffllvalue
# you may possible also want the following for profiling:
# -fprofile-arcs -ftest-coverage -pg
all:
make libffflllist.so
make libfffllglue.so
make libfffllvalue.so
make libfffllstd.so
make fffll
fffll: src/lexer.c src/fffll.c src/compiler.c
$(CC) $(LIBS) $(CFLAGS) -o fffll src/lexer.c src/fffll.c src/compiler.c
src/fffll.c: src/fffll.y
bison -t -d -o src/fffll.c src/fffll.y
libffflllist.so: list.o array.o
$(CC) -shared $(CFLAGS) -o libffflllist.so list.o array.o
libfffllstd.so: builtin.o evaluate.o typecast.o exception.o
$(CC) -L. -lfffllglue -shared $(CFLAGS) -o libfffllstd.so builtin.o evaluate.o typecast.o exception.o
libfffllglue.so: tree.o repl.o
$(CC) -shared $(CFLAGS) -o libfffllglue.so tree.o repl.o
libfffllvalue.so: value.o funcdef.o
$(CC) -shared $(CFLAGS) -o libfffllvalue.so value.o funcdef.o
array.o: src/array.c src/array.h
$(CC) -fPIC $(CFLAGS) -c src/array.c
builtin.o: src/builtin.c src/builtin.h
$(CC) -fPIC $(CFLAGS) -c src/builtin.c
evaluate.o: src/evaluate.c src/evaluate.h
$(CC) -fPIC $(CFLAGS) -c src/evaluate.c
exception.o: src/exception.c src/exception.h
$(CC) -fPIC $(CFLAGS) -c src/exception.c
funcdef.o: src/funcdef.c src/funcdef.h
$(CC) -fPIC $(CFLAGS) -c src/funcdef.c
list.o: src/list.c src/list.h
$(CC) -fPIC $(CFLAGS) -c src/list.c
repl.o: src/repl.c src/repl.h
$(CC) -fPIC $(CFLAGS) -c src/repl.c
tree.o: src/tree.c src/tree.h
$(CC) -fPIC $(CFLAGS) -c src/tree.c
typecast.o: src/typecast.c src/typecast.h
$(CC) -fPIC $(CFLAGS) -c src/typecast.c
value.o: src/value.c src/value.h
$(CC) -fPIC $(CFLAGS) -c src/value.c
clean:
rm array.o
rm builtin.o
rm evaluate.o
rm exception.o
rm funcdef.o
rm list.o
rm repl.o
rm tree.o
rm typecast.o
rm value.o
rm src/fffll.c
rm src/fffll.h
rm fffll
rm ./libfffll*
test:
for TESTFILE in examples/*; do valgrind ./fffll $$TESTFILE; done;
rm test