From 3e937588c6fe36f5776dd1029a34132e0ec76db5 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Mon, 10 Feb 2025 22:17:48 +0300 Subject: add git feature It's available at compile-time --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a990948..9c77ea5 100755 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ PREFIX = /usr/local/bin CC = gcc CFLAGS = -Wall -g #-DDEBUG LIBS = $(shell pkg-config --cflags --libs gpgme) +HAVE_LIBGIT2 = $(shell pkg-config --exists libgit2 && echo yes) MAN_PATH = /usr/share/man/man1 COMPLETION_PATH = /usr/share/bash-completion/completions/lpass SOURCES = \ @@ -12,6 +13,11 @@ SOURCES = \ src/r-gpgme.c \ src/tree.c \ src/xstd.c +ifdef HAVE_LIBGIT2 + CFLAGS += $(shell pkg-config --cflags libgit2) -DLIGBIT + LIBS += $(shell pkg-config --libs libgit2) + SOURCES += src/r-lg2.c +endif ifdef DISPLAY LIBS += -lX11 CFLAGS += -DDISPLAY -- cgit v1.2.3-18-g5258