summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile21
-rw-r--r--compile_commands.json78
2 files changed, 99 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
diff --git a/compile_commands.json b/compile_commands.json
new file mode 100644
index 0000000..3e3c90f
--- /dev/null
+++ b/compile_commands.json
@@ -0,0 +1,78 @@
+[
+ {
+ "arguments": [
+ "/usr/bin/gcc",
+ "-Wall",
+ "-Wextra",
+ "-std=c11",
+ "-O2",
+ "-Iinclude",
+ "-Iinclude/tinyff",
+ "-Iinclude/ext",
+ "-c",
+ "-o",
+ "src/common.o",
+ "src/common.c"
+ ],
+ "directory": "/home/watson/tinyff",
+ "file": "/home/watson/tinyff/src/common.c",
+ "output": "/home/watson/tinyff/src/common.o"
+ },
+ {
+ "arguments": [
+ "/usr/bin/gcc",
+ "-Wall",
+ "-Wextra",
+ "-std=c11",
+ "-O2",
+ "-Iinclude",
+ "-Iinclude/tinyff",
+ "-Iinclude/ext",
+ "-c",
+ "-o",
+ "src/stream.o",
+ "src/stream.c"
+ ],
+ "directory": "/home/watson/tinyff",
+ "file": "/home/watson/tinyff/src/stream.c",
+ "output": "/home/watson/tinyff/src/stream.o"
+ },
+ {
+ "arguments": [
+ "/usr/bin/gcc",
+ "-Wall",
+ "-Wextra",
+ "-std=c11",
+ "-O2",
+ "-Iinclude",
+ "-Iinclude/tinyff",
+ "-Iinclude/ext",
+ "-c",
+ "-o",
+ "src/dbg.o",
+ "src/dbg.c"
+ ],
+ "directory": "/home/watson/tinyff",
+ "file": "/home/watson/tinyff/src/dbg.c",
+ "output": "/home/watson/tinyff/src/dbg.o"
+ },
+ {
+ "arguments": [
+ "/usr/bin/gcc",
+ "-Wall",
+ "-Wextra",
+ "-std=c11",
+ "-O2",
+ "-Iinclude",
+ "-Iinclude/tinyff",
+ "-Iinclude/ext",
+ "-c",
+ "-o",
+ "src/format/image/bmp.o",
+ "src/format/image/bmp.c"
+ ],
+ "directory": "/home/watson/tinyff",
+ "file": "/home/watson/tinyff/src/format/image/bmp.c",
+ "output": "/home/watson/tinyff/src/format/image/bmp.o"
+ }
+]