summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-02-22 13:37:19 +1100
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-02-22 13:37:19 +1100
commit4d28974574076f482af7b631d118e24917eba3f0 (patch)
tree7ec386b56ae05749b43959042d28a6cef772105d
parent5c0fdfe5e160d7e89434156f2941115329c6e506 (diff)
fix(make): Build objects into dist/ directory
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4ba7959..640725b 100644
--- a/Makefile
+++ b/Makefile
@@ -6,16 +6,17 @@ SRC=$(shell find src -name "*.c")
OBJ=$(SRC:.c=.o)
LIB=libtinyff.a
+OUTDIR=dist
all: $(LIB)
$(LIB): $(OBJ)
- $(AR) rcs $(LIB) $(OBJ)
+ $(AR) rcs $(OUTDIR)/$(LIB) $(OUTDIR)/$(OBJ)
%.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) -c $< -o $(OUTDIR)/$@
clean:
- rm -f $(OBJ) $(LIB)
+ rm -f $(OUTDIR)/$(OBJ) $(LIB)
.PHONY: all clean