diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 09:21:56 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 09:21:56 +1100 |
| commit | 012bf15d20fac68da3f494c41a22bea4e389b884 (patch) | |
| tree | cece6fe1877ae4b2dea02707c3accb849f48aa53 | |
| parent | 35e8f5879383599f71747b2c0c1287ae814b21f9 (diff) | |
feat(makefile): Add makefile and compile_commands.json
| -rw-r--r-- | Makefile | 21 | ||||
| -rw-r--r-- | compile_commands.json | 78 |
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" + } +] |
