summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-02-22 09:21:56 +1100
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-02-22 09:21:56 +1100
commit012bf15d20fac68da3f494c41a22bea4e389b884 (patch)
treecece6fe1877ae4b2dea02707c3accb849f48aa53 /Makefile
parent35e8f5879383599f71747b2c0c1287ae814b21f9 (diff)
feat(makefile): Add makefile and compile_commands.json
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4ba7959
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+CC=gcc
+AR=ar
+CFLAGS=-Wall -Wextra -std=c11 -O2 -Iinclude -Iinclude/tinyff -Iinclude/ext
+
+SRC=$(shell find src -name "*.c")
+OBJ=$(SRC:.c=.o)
+
+LIB=libtinyff.a
+
+all: $(LIB)
+
+$(LIB): $(OBJ)
+ $(AR) rcs $(LIB) $(OBJ)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+clean:
+ rm -f $(OBJ) $(LIB)
+
+.PHONY: all clean