commit 3a7501693588e2df0dd6c03a189007369e53d4d6 Author: brookjeynes <me@brookjeynes.dev> Date: Thu, 18 Jun 2026 07:06:29 +1000 chore: init Signed-off-by: brookjeynes <me@brookjeynes.dev> Diffstat:
| A | .gitignore | | | 1 | + |
| A | Makefile | | | 13 | +++++++++++++ |
| A | main.c | | | 11 | +++++++++++ |
3 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/Makefile b/Makefile @@ -0,0 +1,13 @@ +.PHONY: build clean + +CC := gcc +CFLAGS := -Wall -Wextra -Wpedantic -std=c11 $(shell pkg-config --cflags libgit2) +LDFLAGS = $(shell pkg-config --libs libgit2) +BUILD_DIR := build + +build: + mkdir -p ./$(BUILD_DIR) + $(CC) $(CFLAGS) $(LDFLAGS) -o ./$(BUILD_DIR)/gs main.c + +clean: + rm -rf ./$(BUILD_DIR) diff --git a/main.c b/main.c @@ -0,0 +1,11 @@ +#include <git2.h> + +int main() { + int error; + + git_libgit2_init(); + + git_libgit2_shutdown(); + + return 0; +}