From 4e22726d5be6849ec2281d63a4792b6060cf7528 Mon Sep 17 00:00:00 2001 From: Meyer Simon Date: Tue, 18 Feb 2025 16:01:30 -0500 Subject: [PATCH 1/2] added .gitignore t#09 --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47f37f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.tok +*.o +alpha +flex.h From c2adcdf8bb121929957f9454636865f6847c284a Mon Sep 17 00:00:00 2001 From: Scarlett Date: Tue, 18 Feb 2025 16:03:52 -0500 Subject: [PATCH 2/2] Makefile updated t#09 --- Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8164ae1..90bdaca 100644 --- a/Makefile +++ b/Makefile @@ -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