aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-03-19 20:39:32 +0000
committerthe lemons <citrons@mondecitronne.com>2023-03-20 22:24:06 -0500
commitf6a88e1ee6d62dc447a8d8b1d77d63f1ab9b5ade (patch)
treef474ee7763b1314f718bca961d986905c831af9b /Makefile
parent2731d37fe4f62b1ce9bfd7da09d1636082526fc2 (diff)
add support for lua 5.1
uses a weak-keyed table in the registry to store parent-child mappings, instead of associated uservalues, which were only added in 5.2.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4b4860a..21d3629 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,11 @@
LUA_VER=5.3
CC = cc
LD = ld
-CFLAGS = -std=c99 -Wall -O2 -fPIC -I/usr/include/lua$(LUA_VER)
+MORE_CFLAGS=
+ifeq ($(LUA_VER),5.1)
+ MORE_CFLAGS=-DLUA_5_1
+endif
+CFLAGS = $(MORE_CFLAGS) -std=c99 -Wall -O2 -fPIC -I/usr/include/lua$(LUA_VER)
LFLAGS = -shared -llmdb
lmdb.so: lmdb.o