Combined binaries (parser + alpha)

This commit is contained in:
Scarlett
2025-03-05 14:01:34 -05:00
parent 45940c0500
commit c2f28b6836
5 changed files with 47 additions and 37 deletions

View File

@ -26,11 +26,8 @@ tmp/runner.o: src/runner.c src/runner.h tmp/flex.h
tmp/symbol_table.o: src/symbol_table.c src/symbol_table.h
$(CC) $(CFLAGS) -o tmp/symbol_table.o -c src/symbol_table.c
parser : clean tmp/lex.yy.c tmp/grammar.tab.c
$(CC) -o parser tmp/lex.yy.c tmp/grammar.tab.c
runner: tmp/lex.yy.c tmp/runner.o tmp/symbol_table.o
$(CC) $(CFLAGS) -o $(EXE) tmp/runner.o tmp/lex.yy.c tmp/symbol_table.o
$(CC) $(CFLAGS) -o $(EXE) tmp/runner.o tmp/grammar.tab.c tmp/lex.yy.c
debug: CFLAGS += -DDEBUG=1
debug: clean compiler
@ -46,6 +43,7 @@ test-s2:
chmod +x ./check.sh
$(foreach test, $(TESTS-S2), ./$(EXE) -tok $(test);)
./check.sh
$(foreach test, $(TESTS-S2), ./$(EXE) $(test);)
clean:
rm -f *.o