diff --git a/WEEK-8/makefile b/WEEK-8/makefile new file mode 100644 index 0000000000000000000000000000000000000000..75658486f3f9d622fa5459645ff5d1e740cd1dd2 --- /dev/null +++ b/WEEK-8/makefile @@ -0,0 +1,20 @@ +CC = gcc +CFLAGS = -Wall -Wextra -g +SRC = dsh_cli.c dshlib.c rsh_cli.c rsh_server.c +OBJ = dsh_cli.o dshlib.o rsh_cli.o rsh_server.o +TARGET = dsh + +# Default rule +all: $(TARGET) + +# Build the executable +$(TARGET): $(OBJ) + $(CC) $(CFLAGS) -o $(TARGET) $(OBJ) + +# Compile individual source files into object files +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +# Clean build files +clean: + rm -f $(OBJ) $(TARGET)