diff options
| author | verdant <im@verdant.ee> | 2026-07-21 19:00:43 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-07-21 19:00:43 +0800 |
| commit | daacae045dc8b33227b006ab801c4f31884129a7 (patch) | |
| tree | eba334411584c7dbed160a0f27d0d89be76a3b9b | |
| parent | d78746fd69ee53d083cbcc89648a5edd78c23df4 (diff) | |
| download | sf-daacae045dc8b33227b006ab801c4f31884129a7.tar.gz sf-daacae045dc8b33227b006ab801c4f31884129a7.zip | |
Add Makefile
| -rw-r--r-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
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) |
