diff options
| author | ruki <[email protected]> | 2022-11-30 23:52:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-11-30 23:52:54 +0800 |
| commit | a758f2d6a14af3e4d2acab53f12e91be64ab906a (patch) | |
| tree | d46cc2642af17215c9d8a914bc144982c2b8e556 | |
| parent | 45e9be5a1eaa6588633fee019cb0b14c3e9d6775 (diff) | |
improve makefile
| -rw-r--r-- | core/detect/luajit.c | 7 | ||||
| -rw-r--r-- | core/makefile | 3 | ||||
| -rw-r--r-- | core/src/luajit/makefile | 7 | ||||
| -rw-r--r-- | core/src/luajit/xmake.lua | 2 |
4 files changed, 1 insertions, 18 deletions
diff --git a/core/detect/luajit.c b/core/detect/luajit.c deleted file mode 100644 index 96e8c0ccc..000000000 --- a/core/detect/luajit.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <luajit.h> - -int main() -{ - lua_pcall(0, 0, 0, 0); - return 0; -} diff --git a/core/makefile b/core/makefile index 30056fe1f..ab530f2b5 100644 --- a/core/makefile +++ b/core/makefile @@ -282,9 +282,6 @@ base_LIBNAMES += $(shell if { cat detect/readline.c | $(CC) -xc - -lreadline -o base_LIBNAMES += $(shell if { cat detect/tbox.c | $(CC) -xc - -ltbox -o /dev/null 2>/dev/null; }; then echo tbox; fi ) base_LIBNAMES += $(shell if { cat detect/lua-cjson.c | $(CC) -xc - -llua5.1-cjson -llua -o /dev/null 2>/dev/null; }; then echo lua5.1-cjson; fi ) base_LIBNAMES += $(shell if { cat detect/sv.c | $(CC) -xc - -lsv -o /dev/null 2>/dev/null; }; then echo sv; fi ) -ifeq ($(LUAJIT_SYSTEM),y) -base_LIBNAMES += $(shell if { cat detect/luajit.c | $(CC) -xc - $(shell pkg-config --libs --cflags luajit) -o /dev/null 2>/dev/null; }; then echo luajit-5.1; fi ) -endif ifneq ($(TERMUX_ARCH),) # on termux/ci? base_LIBNAMES += m dl else diff --git a/core/src/luajit/makefile b/core/src/luajit/makefile index 425e15f0a..9747413c3 100644 --- a/core/src/luajit/makefile +++ b/core/src/luajit/makefile @@ -137,13 +137,6 @@ luajit_CXFLAGS += -fPIE endif endif -# use given system library? -luajit_C_FILES := $(if $(findstring luajit,$(base_LIBNAMES)),,$(luajit_C_FILES)) -luajit_ASM_FILES := $(if $(findstring luajit,$(base_LIBNAMES)),,$(luajit_ASM_FILES)) -luajit_INC_FILES := $(if $(findstring luajit,$(base_LIBNAMES)),,$(luajit_INC_FILES)) -luajit_OBJ_FILES := $(if $(findstring luajit,$(base_LIBNAMES)),,$(luajit_OBJ_FILES)) - - # suffix include $(PRO_DIR)/suffix.mak diff --git a/core/src/luajit/xmake.lua b/core/src/luajit/xmake.lua index a3c7120df..427c319a1 100644 --- a/core/src/luajit/xmake.lua +++ b/core/src/luajit/xmake.lua @@ -19,7 +19,7 @@ end if os.isfile("/etc/redhat-release") then jit = false end -local autogendir = path.join("autogen", plat, jit and "jit" or "nojit", arch) +local autogendir = path.join("luajit", "autogen", plat, jit and "jit" or "nojit", arch) -- add target target("luajit") |
