mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Support build for Lua 5.1 (for LuaJIT), Lua 5.2 and Lua 5.3 (Step 6/?)
See #195
This commit is contained in:
7
Makefile
7
Makefile
@@ -77,13 +77,14 @@ else
|
||||
LCC = $(CC)
|
||||
endif
|
||||
|
||||
ifdef WITH_LUAJIT_SHARED
|
||||
WITH_LUA_SHARED = 1
|
||||
ifdef WITH_LUA_SHARED
|
||||
WITH_LUA = 1
|
||||
endif
|
||||
|
||||
ifdef WITH_LUA_SHARED
|
||||
ifdef WITH_LUAJIT_SHARED
|
||||
WITH_LUA_SHARED = 1
|
||||
WITH_LUA = 1
|
||||
WITH_LUA_VERSION = 501
|
||||
endif
|
||||
|
||||
ifdef WITH_LUA
|
||||
|
||||
@@ -9,7 +9,33 @@ ifndef WITH_LUA
|
||||
$(error WITH_LUA is not defined)
|
||||
endif
|
||||
|
||||
# Lua Default version is 502
|
||||
WITH_LUA_VERSION ?= 502
|
||||
LUA_VERSION_KNOWN = 0
|
||||
|
||||
# Select src and header according to the Lua version
|
||||
ifeq ($(WITH_LUA_VERSION), 501)
|
||||
$(info Lua: Using version 5.1.5)
|
||||
LUA_DIR = src/third_party/lua-5.1.5/src
|
||||
LUA_VERSION_KNOWN = 1
|
||||
endif
|
||||
ifeq ($(WITH_LUA_VERSION), 502)
|
||||
$(info Lua: Using version 5.2.4)
|
||||
LUA_DIR = src/third_party/lua-5.2.4/src
|
||||
LUA_VERSION_KNOWN = 1
|
||||
endif
|
||||
ifeq ($(WITH_LUA_VERSION), 503)
|
||||
$(info Lua: Using version 5.3.0)
|
||||
LUA_DIR = src/third_party/lua-5.3.0/src
|
||||
LUA_VERSION_KNOWN = 1
|
||||
endif
|
||||
|
||||
ifneq ($(LUA_VERSION_KNOWN), 1)
|
||||
$(error Lua: Unknwon version - $(WITH_LUA_VERSION))
|
||||
endif
|
||||
|
||||
|
||||
# Add flags for all Lua versions
|
||||
LUA_CFLAGS = -I$(LUA_DIR) -DLUA_COMPAT_ALL -DUSE_LUA
|
||||
|
||||
ifneq ($(TARGET_OS),WIN32)
|
||||
|
||||
Reference in New Issue
Block a user