summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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