adding lua

This commit is contained in:
NishiOwO 2025-04-02 15:48:55 +09:00
parent edb1c5c741
commit 73221cfd08
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
7 changed files with 8 additions and 35 deletions

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "external/lua"]
path = external/lua
url = https://github.com/lua/lua
branch = v5.3

View File

@ -7,9 +7,9 @@ AR = $(TARGET_PREFIX)ar
CC = $(TARGET_PREFIX)gcc
OBJDUMP = $(TARGET_PREFIX)objdump
STRIP = $(TARGET_PREFIX)strip
CFLAGS = -D_DEFAULT_SOURCE -DUSE_$(BACKEND) -I../engine $(ODE_CFLAGS) $(AMX_CFLAGS) $(PAWNC_CFLAGS) $(GL_CFLAGS)
CFLAGS = -D_DEFAULT_SOURCE -DUSE_$(BACKEND) -I../engine $(ODE_CFLAGS) $(GL_CFLAGS)
LDFLAGS =
LIBS = $(ODE_LIBS) $(AMX_LIBS) $(PAWNC_LIBS) $(GL_LIBS) $(SOCKET_LIBS)
LIBS = $(ODE_LIBS) $(GL_LIBS) $(SOCKET_LIBS)
.PHONY: all format clean ./engine ./src print-deps pack

View File

@ -5,5 +5,5 @@ multiplayer sandbox game i might work on
## Stack
- OpenGL 1.1 (probably) on WGL/GLX/[GLFW](https://www.glfw.org/)
- [Open Dynamics Engine](https://ode.org)
- [PawnScript](https://www.compuphase.com/pawn/pawn.htm), but [patched by me](https://github.com/nishiowo/pawn)
- [Lua](https://lua.org)
- [stb_image](https://github.com/nothings/stb)

1
external/lua vendored Submodule

@ -0,0 +1 @@
Subproject commit 75ea9ccbea7c4886f30da147fb67b693b2624c26

View File

@ -3,10 +3,6 @@ BACKEND = GLX
ODE_CFLAGS = `pkg-config --cflags ode`
ODE_LIBS = `pkg-config --libs ode`
AMX_CFLAGS = `pkg-config --cflags amx`
AMX_LIBS = `pkg-config --libs amx`
PAWNC_CFLAGS = `pkg-config --cflags pawnc`
PAWNC_LIBS = `pkg-config --libs pawnc`
ifeq ($(BACKEND),GLX)
GL_CFLAGS = `pkg-config --cflags gl` `pkg-config --cflags glu`
GL_LIBS = `pkg-config --libs gl` `pkg-config --libs glu`

View File

@ -13,10 +13,6 @@ BACKEND = WGL
ODE_CFLAGS = -I../deps/include
ODE_LIBS = -L../deps/lib -lode
AMX_CFLAGS = -I../deps/include
AMX_LIBS = -L../deps/lib -lamx
PAWNC_CFLAGS = -I../deps/include
PAWNC_LIBS = -L../deps/lib -lpawnc
ifeq ($(BACKEND),WGL)
GL_CFLAGS =
GL_LIBS = -lopengl32 -lglu32 -lgdi32

View File

@ -32,30 +32,6 @@ if [ ! -f .installed ]; then
fi
cd ..
if [ -d pawn ]; then
cd pawn
git pull
cd build
else
git clone https://github.com/nishiowo/pawn --depth=1
cd pawn
mkdir build
cd build
fi
if [ ! -f ../.configured ]; then
cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake-files/windows.cmake -DARCH=${ARCH} .. -DCMAKE_INSTALL_PREFIX=/ || exit 1
touch ../.configured
fi
if [ ! -f ../.made ]; then
${MAKE} -j4 || exit 1
touch ../.made
fi
if [ ! -f ../.installed ]; then
${MAKE} install DESTDIR=${BASE}/deps
touch ../.installed
fi
cd ../..
cd ..
${MAKE} PLATFORM=win${BITS}