Makefile: restruct
Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
parent
dfd72482ac
commit
17d1dc7269
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
|
||||
a.out
|
||||
hcc
|
||||
|
||||
# File generated by flex and bison
|
||||
parser.c
|
||||
|
21
Makefile
21
Makefile
@ -1,9 +1,22 @@
|
||||
|
||||
all: flex bison
|
||||
gcc expr.c parser.c scanner.c main.c
|
||||
|
||||
SRC=
|
||||
all: scanner.c parser.c token.h
|
||||
gcc -o hcc expr.c parser.c scanner.c main.c
|
||||
|
||||
scanner.c: flex
|
||||
|
||||
parser.c: bison
|
||||
|
||||
token.h: bison
|
||||
|
||||
bison:
|
||||
bison --defines=token.h --output=parser.c parser.bison
|
||||
bison --debug --defines=token.h --output=parser.c parser.bison
|
||||
|
||||
flex: bison
|
||||
flex -o scanner.c scanner.flex
|
||||
flex --debug -o scanner.c scanner.flex
|
||||
|
||||
clean:
|
||||
rm -vf parser.c scanner.c hcc token.h
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user