diff --git a/w4hw/codes/makefile b/w4hw/codes/makefile new file mode 100644 index 0000000000000000000000000000000000000000..4f6101cc6661facd243dc13f121475c4096dfd5e --- /dev/null +++ b/w4hw/codes/makefile @@ -0,0 +1,28 @@ +# Compiler settings +CC = gcc +CFLAGS = -Wall -Wextra -g + +# Target executable name +TARGET = sdbsc + +# Find all source and header files +SRCS = $(wildcard *.c) +HDRS = $(wildcard *.h) + +# Default target +all: $(TARGET) + +# Compile source to executable +$(TARGET): $(SRCS) $(HDRS) + $(CC) $(CFLAGS) -o $(TARGET) $(SRCS) + +# Clean up build files +clean: + rm -f $(TARGET) + rm -f student.db + +test: + ./test.sh + +# Phony targets +.PHONY: all clean \ No newline at end of file