fixed issues with the compilation process

This commit is contained in:
Meyer Simon
2025-02-23 13:15:35 -05:00
parent 927c691d93
commit c1191c888e
3 changed files with 9 additions and 10 deletions

View File

@ -2,7 +2,7 @@ CC := gcc
FLEX := flex
LEX := lexicalStructure.lex
EXE := alpha
CFLAGS :=
CFLAGS :=
compiler: lex.yy.c runner.o runner
@ -12,8 +12,11 @@ lex.yy.c: lexicalStructure.lex
runner.o: runner.c runner.h flex.h
$(CC) $(CFLAGS) -o runner.o -c runner.c
runner: lex.yy.c runner.o
$(CC) $(CFLAGS) -o $(EXE) runner.o lex.yy.c
symbol.o: symbol_table.c symbol_table.h
$(CC) $(CFLAGS) -o symbol_table.o symbol_table.c
runner: lex.yy.c runner.o symbol_table.o
$(CC) $(CFLAGS) -o $(EXE) runner.o lex.yy.c symbol_table.o
bison: grammar.y
bison -d grammar.y
@ -52,4 +55,4 @@ clean:
rm -f *.tok
rm -f grammar.tab.c
rm -f grammar.tab.h
rm -f *.st
rm -f *.st