From 14a25f64a35eabbf00e597eec1887d350c2fb1c7 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 28 Feb 2022 17:01:35 -0500 Subject: Makefile: Make separate variables for Oniguruma flags This allows customizing the necessary flags if onig-config isn't available or is undesirable (e.g. when linking against a non-system build of libonig). --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8db443c..8ca542b 100644 --- a/Makefile +++ b/Makefile @@ -77,11 +77,14 @@ LOCAL_CPPFLAGS += -DBFS_WITH_ONIGURUMA=1 ONIG_CONFIG := $(shell command -v onig-config 2>/dev/null) ifdef ONIG_CONFIG -LOCAL_CFLAGS += $(shell $(ONIG_CONFIG) --cflags) -LOCAL_LDLIBS += $(shell $(ONIG_CONFIG) --libs) +ONIG_CFLAGS := $(shell $(ONIG_CONFIG) --cflags) +ONIG_LDLIBS := $(shell $(ONIG_CONFIG) --libs) else -LOCAL_LDLIBS += -lonig +ONIG_LDLIBS := -lonig endif + +LOCAL_CFLAGS += $(ONIG_CFLAGS) +LOCAL_LDLIBS += $(ONIG_LDLIBS) endif ifeq ($(OS),Linux) -- cgit v1.2.3