summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-02-28 17:01:35 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-02-28 17:01:35 -0500
commit14a25f64a35eabbf00e597eec1887d350c2fb1c7 (patch)
tree241b670827258b476e144a9b3a9812f7879abb3c /Makefile
parent517a303e425b606cde3b70a1481ff557bba17462 (diff)
downloadbfs-14a25f64a35eabbf00e597eec1887d350c2fb1c7.tar.xz
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).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
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)