-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_macos
50 lines (35 loc) · 1.15 KB
/
Makefile_macos
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
# Makefile
OBJS = bison.o lex.o main.o print.o evaluator.o enum_com.o builder.o inserter.o
CC = g++
CFLAGS = -g -Wall -Wno-write-strings -Wno-unused-function -ansi -pedantic
sevia: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o sevia -L /usr/local/opt/flex/lib -lfl -w
lex.o: lex.c
$(CC) $(CFLAGS) -c lex.c -o lex.o -w
lex.c: stic.lex
flex stic.lex
cp lex.yy.c lex.c
bison.o: bison.c
$(CC) $(CFLAGS) -c bison.c -o bison.o -w
bison.c: stic.y
bison -d -v stic.y
cp stic.tab.c bison.c
cmp -s stic.tab.h tok.h || cp stic.tab.h tok.h
main.o: main.cc
$(CC) $(CFLAGS) -c main.cc -o main.o -w
print.o: print.cc
$(CC) $(CFLAGS) -c print.cc -o print.o
evaluator.o: evaluator.cc
$(CC) $(CFLAGS) -c evaluator.cc -o evaluator.o
enum_com.o: enum_com.cc
$(CC) $(CFLAGS) -c enum_com.cc -o enum_com.o
builder.o: builder.cc
$(CC) $(CFLAGS) -c builder.cc -o builder.o
inserter.o: inserter.cc
$(CC) $(CFLAGS) -c inserter.cc -o inserter.o
lex.o yac.o main.o print.o evaluator.o enum_com.o builder.o inserter.o : heading.h
lex.o main.o : tok.h
clean:
rm -f *.o *~ lex.c lex.yy.c bison.c tok.h stic.tab.c stic.tab.h stic.output sevia
clean-out:
rm -f output/*.ispl