aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d5dfcd7..f09f5dc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+-include config.mk
+
VERSION=0.2
GIT_VERSION := $(shell [ -d .git ] && echo "-$$(git describe --always)")
@@ -7,8 +9,12 @@ CFLAGS += -DVERSION=\"$(VERSION)$(GIT_VERSION)\"
TARGETS = sircbot sircbot-send
ifneq (NOLUA,)
+LUAPC ?= lua
+PKGCONFIG ?= pkg-config
TARGETS += sircbot.so
-LUA_LIBS=-llua
+LUA_CFLAGS = $(shell $(PKGCONFIG) --cflags $(LUAPC))
+LUA_LIBS = $(shell $(PKGCONFIG) --libs $(LUAPC))
+CFLAGS += $(LUA_CFLAGS)
endif
prefix ?= /usr/local