summaryrefslogtreecommitdiff
path: root/cgit.mk
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-01-13 14:18:51 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2014-01-14 02:00:07 +0100
commitf43b228d0bca5791be98ff3fbb2f8743219635b6 (patch)
tree2200619d48fd24f5e809736ff94c84a57da4481f /cgit.mk
parente83b51b4f6bd53efea0c772e6ecdf1c5605ca611 (diff)
filter: add lua support
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cgit.mk')
-rw-r--r--cgit.mk22
1 files changed, 19 insertions, 3 deletions
diff --git a/cgit.mk b/cgit.mk
index 9d6dea8..25f2eab 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -25,6 +25,25 @@ ifdef NO_C99_FORMAT
CFLAGS += -DNO_C99_FORMAT
endif
+ifdef NO_LUA
+ CFLAGS += -DNO_LUA
+else
+
+ifeq (VANILLA,$(LUA_IMPLEMENTATION))
+ CFLAGS += -llua
+else
+ LUAJIT_LIBS := $(shell pkg-config --libs luajit)
+ LUAJIT_CFLAGS := $(shell pkg-config --cflags luajit)
+ CGIT_LIBS += $(LUAJIT_LIBS)
+ CFLAGS += $(LUAJIT_CFLAGS)
+endif
+
+endif
+
+CGIT_LIBS += -ldl
+
+
+
CGIT_OBJ_NAMES += cgit.o
CGIT_OBJ_NAMES += cache.o
CGIT_OBJ_NAMES += cmd.o
@@ -61,9 +80,6 @@ $(CGIT_VERSION_OBJS): $(CGIT_PREFIX)VERSION
$(CGIT_VERSION_OBJS): EXTRA_CPPFLAGS = \
-DCGIT_VERSION='"$(CGIT_VERSION)"'
-CGIT_LIBS += -ldl
-
-
# Git handles dependencies using ":=" so dependencies in CGIT_OBJ are not
# handled by that and we must handle them ourselves.
cgit_dep_files := $(foreach f,$(CGIT_OBJS),$(dir $f).depend/$(notdir $f).d)