diff options
| author | ruki <[email protected]> | 2021-09-18 00:53:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-18 00:53:16 +0800 |
| commit | eb826246511e2afca394302aecccdf18d02a297f (patch) | |
| tree | 93cf7403e809670a594225774a4a39f82b5de0c7 /core/src/lua-cjson | |
| parent | 56393682b43020adcff47de00fe7a011ba5f1584 (diff) | |
fix compile for lua
Diffstat (limited to 'core/src/lua-cjson')
| -rw-r--r-- | core/src/lua-cjson/makefile | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/src/lua-cjson/makefile b/core/src/lua-cjson/makefile index 9e96851ae..e1d53ecf9 100644 --- a/core/src/lua-cjson/makefile +++ b/core/src/lua-cjson/makefile @@ -22,8 +22,14 @@ lua-cjson_C_FILES += \ lua-cjson_CFLAGS += -DNDEBUG -DUSE_INTERNAL_FPCONV # includes -lua-cjson_INC_DIRS += \ - ../luajit/luajit/src +ifeq ($(BACKEND),luajit) +lua-cjson_INC_DIRS += ../luajit/luajit/src +lua-cjson_CXFLAGS += -DUSE_LUAJIT +endif +ifeq ($(BACKEND),lua) +lua-cjson_INC_DIRS += ../lua/lua +lua-cjson_CXFLAGS += -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 +endif # use given system library? lua-cjson_C_FILES := $(if $(findstring cjson,$(base_LIBNAMES)),,$(lua-cjson_C_FILES)) |
