Commit c9c1a724 authored by nanahira's avatar nanahira

test all-static build

parent d342405c
...@@ -130,7 +130,12 @@ exec_linux: ...@@ -130,7 +130,12 @@ exec_linux:
stage: build stage: build
tags: tags:
- linux - linux
variables:
YGOPRO_BUILD_LUA: '1'
YGOPRO_LINUX_ALL_STATIC: '1'
YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/'
dependencies: dependencies:
- mat_lua
- mat_irrklang - mat_irrklang
- mat_linux - mat_linux
cache: cache:
...@@ -138,7 +143,7 @@ exec_linux: ...@@ -138,7 +143,7 @@ exec_linux:
- bin/ - bin/
- obj/ - obj/
script: script:
- apt update; apt -y install git build-essential libfreetype6-dev libevent-dev libsqlite3-dev libgl1-mesa-dev libglu-dev liblua5.3-dev libxxf86vm-dev - apt update; apt -y install git build-essential libfreetype6-dev libevent-dev libsqlite3-dev libgl1-mesa-dev libglu-dev libxxf86vm-dev
- git submodule update --init - git submodule update --init
- ./premake5 gmake - ./premake5 gmake
- cd build - cd build
......
...@@ -7,7 +7,10 @@ project "ygopro" ...@@ -7,7 +7,10 @@ project "ygopro"
files { "**.cpp", "**.cc", "**.c", "**.h" } files { "**.cpp", "**.cc", "**.c", "**.h" }
excludes { "lzma/**", "spmemvfs/**" } excludes { "lzma/**", "spmemvfs/**" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht", "freetype", "sqlite3", "event" } links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht" }
if not LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" }
end
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" } defines { "YGOPRO_USE_IRRKLANG" }
links { "ikpmp3" } links { "ikpmp3" }
...@@ -25,6 +28,10 @@ project "ygopro" ...@@ -25,6 +28,10 @@ project "ygopro"
local mr=os.getenv("YGOPRO_DEFAULT_DUEL_RULE") local mr=os.getenv("YGOPRO_DEFAULT_DUEL_RULE")
if mr and tonumber(mr) then defines { "DEFAULT_DUEL_RULE="..tonumber(mr) } end if mr and tonumber(mr) then defines { "DEFAULT_DUEL_RULE="..tonumber(mr) } end
configuration "not linux"
if LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" }
end
configuration "windows" configuration "windows"
files "ygopro.rc" files "ygopro.rc"
excludes "CGUIButton.cpp" excludes "CGUIButton.cpp"
...@@ -57,12 +64,15 @@ project "ygopro" ...@@ -57,12 +64,15 @@ project "ygopro"
links "GL" links "GL"
configuration "linux" configuration "linux"
includedirs { "../irrlicht_linux/include" } includedirs { "../irrlicht_linux/include" }
links { "X11", "Xxf86vm" }
if BUILD_LUA then if BUILD_LUA then
links { "lua" } links { "lua" }
else else
links { "lua5.3-c++" } links { "lua5.3-c++" }
end end
links { "X11", "Xxf86vm" }
if LINUX_ALL_STATIC then
linkoptions { LIB_ROOT.."libfreetype.a", LIB_ROOT.."libsqlite3.a", LIB_ROOT.."libevent.a", LIB_ROOT.."libevent_pthreads.a" }
end
if USE_IRRKLANG then if USE_IRRKLANG then
links { "IrrKlang" } links { "IrrKlang" }
linkoptions{ "-Wl,-rpath=./" } linkoptions{ "-Wl,-rpath=./" }
......
...@@ -8,8 +8,15 @@ solution "ygo" ...@@ -8,8 +8,15 @@ solution "ygo"
IRRKLANG_PRO = true IRRKLANG_PRO = true
end end
end end
if os.ishost("linux") and os.getenv("YGOPRO_BUILD_LUA") then if os.ishost("linux") then
BUILD_LUA=true if os.getenv("YGOPRO_BUILD_LUA") then
BUILD_LUA=true
end
if os.getenv("YGOPRO_LINUX_ALL_STATIC") then
BUILD_LUA=true
LINUX_ALL_STATIC=true
LIB_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIB_PATH") or "/usr/lib/x86_64-linux-gnu/"
end
end end
configurations { "Release", "Debug" } configurations { "Release", "Debug" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment