hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-02 14:19:01 +0200
committerhachem <im@hachem.wtf>2026-09-02 14:19:01 +0200
commite12f6224e317dd666e3a2721f57b3c5b7517d304 (patch)
tree5b74e3816b608b199e06ac8caf7e168a1e39b283 /Makefile
parentd246c66681768c9217ff29137dadaabd69106592 (diff)
feat: open with man
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 6 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 9e1472f..812ee65 100644
--- a/Makefile
+++ b/Makefile
@@ -11,8 +11,7 @@ CFLAGS := -Wall \
-g \
-fno-omit-frame-pointer \
-fsanitize=address,undefined \
- -std=c17 \
- -Isrc
+ -std=c17
LDFLAGS := -fsanitize=address,undefined \
-lz
@@ -21,26 +20,19 @@ CPPCHECKFLAGS := --project=compile_commands.json \
--enable=warning,style,performance,portability \
--error-exitcode=1
-TARGET := bin/jafm
-
-SRC := $(shell find src -name '*.c')
-OBJ := $(SRC:src/%.c=bin/%.o)
+TARGET := jafm
+SRC := jafm.c
all: $(TARGET)
-$(TARGET): $(OBJ)
- @mkdir -p $(@D)
- $(CC) $^ -o $@ $(LDFLAGS)
-
-bin/%.o: src/%.c
- @mkdir -p $(@D)
- $(CC) $(CFLAGS) -c $< -o $@
+$(TARGET): $(SRC)
+ $(CC) $(CFLAGS) $(SRC) -o $@ $(LDFLAGS)
check:
bear -- make clean all
cppcheck $(CPPCHECKFLAGS)
clean:
- rm -rf bin
+ rm -rf $(TARGET) $(TARGET).dSYM
.PHONY: all check clean