it looks like this should work. t#29

This commit is contained in:
Meyer Simon
2025-02-21 14:30:14 -05:00
parent ad5da96857
commit fcb66c125d
7 changed files with 136 additions and 34 deletions

View File

@ -1,21 +1,20 @@
CC := gcc
FLEX := flex
LEX := lexicalStructure.lex
EXE := runner
EXE := alpha
CFLAGS := -std=c99 -Wall
CPPFLAGS :=
runner: flex.o runner.o
$(CC) -o runner runner.o flex.o
build: lex.yy.c runner.o runner
lex.yy.c: lexicalStructure.lex
$(FLEX) -o lex.yy.c $(LEX)
runner.o: runner.c runner.h flex.h
$(CC) $(CFLAGS) -o runner.o -c runner.c
flex.o: lex.yy.c typedefs.h
$(CC) $(CFLAGS) -o flex.o -c lex.yy.c
lex.yy.c: lexicalStructure.lex
$(FLEX) -o lex.yy.c $(LEX)
runner: lex.yy.c runner.o
$(CC) -o $(EXE) runner.o lex.yy.c
debug: CFLAGS += -DDEBUG=1
debug: clean runner
@ -39,9 +38,14 @@ test:
./$(EXE) -tok ./tests/test_simpleLiterals.alpha
./$(EXE) -tok ./tests/test_real_alpha_file.alpha
./$(EXE) -tok ./tests/test_real_alpha_2.alpha
./$(EXE) -tok -st ./tests/test_real_alpha_2.alpha
./$(EXE) -st -tok ./tests/test_operators.alpha
./$(EXE) -st ./tests/test_keywords.alpha
clean:
rm -f *.o
rm -f lex.yy.c
rm -f $(EXE)
rm -f flex.h
rm -f *.tok
rm -f *.st