Skip to content

Commit acf5fce

Browse files
committed
initial commit
0 parents  commit acf5fce

402 files changed

Lines changed: 46655 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Android.mk

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
LUA_VERSION := 5.4.8
6+
LOCAL_MODULE := lua
7+
LOCAL_CFLAGS := -D"l_getlocaledecpoint()='.'" -DLUA_ANSI
8+
9+
10+
LOCAL_LUA_SRC := $(LOCAL_PATH)/lua-$(LUA_VERSION)/src
11+
12+
LOCAL_SRC_FILES := \
13+
$(LOCAL_LUA_SRC)/lapi.c \
14+
$(LOCAL_LUA_SRC)/lauxlib.c \
15+
$(LOCAL_LUA_SRC)/lbaselib.c \
16+
$(LOCAL_LUA_SRC)/lcode.c \
17+
$(LOCAL_LUA_SRC)/lcorolib.c \
18+
$(LOCAL_LUA_SRC)/lctype.c \
19+
$(LOCAL_LUA_SRC)/ldblib.c \
20+
$(LOCAL_LUA_SRC)/ldebug.c \
21+
$(LOCAL_LUA_SRC)/ldo.c \
22+
$(LOCAL_LUA_SRC)/ldump.c \
23+
$(LOCAL_LUA_SRC)/lfunc.c \
24+
$(LOCAL_LUA_SRC)/lgc.c \
25+
$(LOCAL_LUA_SRC)/linit.c \
26+
$(LOCAL_LUA_SRC)/liolib.c \
27+
$(LOCAL_LUA_SRC)/llex.c \
28+
$(LOCAL_LUA_SRC)/lmathlib.c \
29+
$(LOCAL_LUA_SRC)/lmem.c \
30+
$(LOCAL_LUA_SRC)/loadlib.c \
31+
$(LOCAL_LUA_SRC)/lobject.c \
32+
$(LOCAL_LUA_SRC)/lopcodes.c \
33+
$(LOCAL_LUA_SRC)/loslib.c \
34+
$(LOCAL_LUA_SRC)/lparser.c \
35+
$(LOCAL_LUA_SRC)/lstate.c \
36+
$(LOCAL_LUA_SRC)/lstring.c \
37+
$(LOCAL_LUA_SRC)/lstrlib.c \
38+
$(LOCAL_LUA_SRC)/ltable.c \
39+
$(LOCAL_LUA_SRC)/ltablib.c \
40+
$(LOCAL_LUA_SRC)/ltm.c \
41+
$(LOCAL_LUA_SRC)/lundump.c \
42+
$(LOCAL_LUA_SRC)/lutf8lib.c \
43+
$(LOCAL_LUA_SRC)/lvm.c \
44+
$(LOCAL_LUA_SRC)/lzio.c
45+
46+
LOCAL_C_INCLUDES := $(LOCAL_LUA_SRC)
47+
48+
include $(BUILD_STATIC_LIBRARY)

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Lua for Android (Prebuilt Static Libraries)
2+
3+
This repository provides prebuilt static libraries of **Lua 5.4.8** for Android platforms, along with the associated build configuration using the Android NDK's `ndk-build` system.
4+
5+
---
6+
7+
8+
## 🛠️ Build Instructions
9+
10+
To build using the Android NDK, run the following command from the project root:
11+
12+
```bash
13+
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_ABI=all APP_PLATFORM=android-<api-level>

lua-5.4.8/Makefile

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Makefile for installing Lua
2+
# See doc/readme.html for installation and customization instructions.
3+
4+
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
5+
6+
# Your platform. See PLATS for possible values.
7+
PLAT= guess
8+
9+
# Where to install. The installation starts in the src and doc directories,
10+
# so take care if INSTALL_TOP is not an absolute path. See the local target.
11+
# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
12+
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
13+
INSTALL_TOP= /usr/local
14+
INSTALL_BIN= $(INSTALL_TOP)/bin
15+
INSTALL_INC= $(INSTALL_TOP)/include
16+
INSTALL_LIB= $(INSTALL_TOP)/lib
17+
INSTALL_MAN= $(INSTALL_TOP)/man/man1
18+
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
19+
INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
20+
21+
# How to install. If your install program does not support "-p", then
22+
# you may have to run ranlib on the installed liblua.a.
23+
INSTALL= install -p
24+
INSTALL_EXEC= $(INSTALL) -m 0755
25+
INSTALL_DATA= $(INSTALL) -m 0644
26+
#
27+
# If you don't have "install" you can use "cp" instead.
28+
# INSTALL= cp -p
29+
# INSTALL_EXEC= $(INSTALL)
30+
# INSTALL_DATA= $(INSTALL)
31+
32+
# Other utilities.
33+
MKDIR= mkdir -p
34+
RM= rm -f
35+
36+
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
37+
38+
# Convenience platforms targets.
39+
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
40+
41+
# What to install.
42+
TO_BIN= lua luac
43+
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
44+
TO_LIB= liblua.a
45+
TO_MAN= lua.1 luac.1
46+
47+
# Lua version and release.
48+
V= 5.4
49+
R= $V.8
50+
51+
# Targets start here.
52+
all: $(PLAT)
53+
54+
$(PLATS) help test clean:
55+
@cd src && $(MAKE) $@
56+
57+
install: dummy
58+
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
59+
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
60+
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
61+
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
62+
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
63+
64+
uninstall:
65+
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
66+
cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC)
67+
cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB)
68+
cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN)
69+
70+
local:
71+
$(MAKE) install INSTALL_TOP=../install
72+
73+
# make may get confused with install/ if it does not support .PHONY.
74+
dummy:
75+
76+
# Echo config parameters.
77+
echo:
78+
@cd src && $(MAKE) -s echo
79+
@echo "PLAT= $(PLAT)"
80+
@echo "V= $V"
81+
@echo "R= $R"
82+
@echo "TO_BIN= $(TO_BIN)"
83+
@echo "TO_INC= $(TO_INC)"
84+
@echo "TO_LIB= $(TO_LIB)"
85+
@echo "TO_MAN= $(TO_MAN)"
86+
@echo "INSTALL_TOP= $(INSTALL_TOP)"
87+
@echo "INSTALL_BIN= $(INSTALL_BIN)"
88+
@echo "INSTALL_INC= $(INSTALL_INC)"
89+
@echo "INSTALL_LIB= $(INSTALL_LIB)"
90+
@echo "INSTALL_MAN= $(INSTALL_MAN)"
91+
@echo "INSTALL_LMOD= $(INSTALL_LMOD)"
92+
@echo "INSTALL_CMOD= $(INSTALL_CMOD)"
93+
@echo "INSTALL_EXEC= $(INSTALL_EXEC)"
94+
@echo "INSTALL_DATA= $(INSTALL_DATA)"
95+
96+
# Echo pkg-config data.
97+
pc:
98+
@echo "version=$R"
99+
@echo "prefix=$(INSTALL_TOP)"
100+
@echo "libdir=$(INSTALL_LIB)"
101+
@echo "includedir=$(INSTALL_INC)"
102+
103+
# Targets that do not create files (not all makes understand .PHONY).
104+
.PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc
105+
106+
# (end of Makefile)

lua-5.4.8/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
This is Lua 5.4.8, released on 21 May 2025.
3+
4+
For installation instructions, license details, and
5+
further information about Lua, see doc/readme.html.
6+
11.8 KB
Loading

0 commit comments

Comments
 (0)