diff --git a/w5/codes/makefile b/w5/codes/makefile new file mode 100644 index 0000000000000000000000000000000000000000..9d20e5b5c474c8217fcc26b24b9a795b4b1a8127 --- /dev/null +++ b/w5/codes/makefile @@ -0,0 +1,27 @@ +# Compiler settings +CC = gcc +CFLAGS = -Wall -Wextra -g + +# Target executable name +TARGET = dsh + +# 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) + +test: + ./test.sh + +# Phony targets +.PHONY: all clean \ No newline at end of file