summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b5405a3..25a65ba 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
-LUALIBS := -llua
+LUAPC ?= lua5.2
+LUA_CFLAGS := $(shell pkg-config --cflags $(LUAPC))
TARGETS := posixtz core.so
all: $(TARGETS)
@@ -10,5 +11,5 @@ posixtz: main.c posixtz.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
core.so: lua-posixtz.c posixtz.c
- $(CC) -fPIC $(CFLAGS) $(LDFLAGS) $(LUALIBS) -shared -o $@ $^
+ $(CC) -fPIC $(CFLAGS) $(LUA_CFLAGS) $(LDFLAGS) -shared -o $@ $^