This commit is contained in:
2025-11-22 16:53:39 +01:00
commit ab71aa9999
12 changed files with 914 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
CC = gcc
CFLAGS = -Wall -Wextra -O2
TARGET = main2
SRC = main2.c
SAMPLES = test.c demo.c a.c
.PHONY: all clean run-test run-demo run-a help
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $(TARGET) $(SRC)
run-test: $(TARGET)
./$(TARGET) test.c
run-demo: $(TARGET)
./$(TARGET) demo.c
run-a: $(TARGET)
./$(TARGET) a.c
clean:
rm -f $(TARGET)
help:
@echo "Mini C Interpreter - Makefile"
@echo "Usage:"
@echo " make - Build the interpreter"
@echo " make run-test - Run test.c"
@echo " make run-demo - Run demo.c"
@echo " make run-a - Run a.c"
@echo " make clean - Remove compiled binaries"
@echo " make help - Show this help message"