From daacae045dc8b33227b006ab801c4f31884129a7 Mon Sep 17 00:00:00 2001 From: verdant Date: Tue, 21 Jul 2026 19:00:43 +0800 Subject: Add Makefile --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d842b7b --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +CC=gcc +CFLAGS=-Wall -Wextra -Wpedantic -g +LDFLAGS=-lncurses + +TARGET=sf + +SRCS=$(wildcard *.c) +OBJS=$(SRCS:.c=.o) + +.PHONY: all test clean + +all: $(TARGET) + +$(TARGET): $(OBJS) + $(CC) $(OBJS) $(LDFLAGS) -o $@ + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + + +test: $(TARGET) + DEBUG=true ./\$< + +clean: + rm -f $(OBJS) $(TARGET) -- cgit v1.2.3