Newer
Older
newoption {
trigger = "lua",
value = "VM_Type",
description = "Virtual Machine to use for Lua, either the default one or a JIT",
allowed = {
{ "default", "Default Lua Virtual Machine" },
{ "jitx86", "LuaJIT x86" }
}
}
_OPTIONS.lua = _OPTIONS.lua or "default"
solution "TEngine"
configurations { "Debug", "Release" }
objdir "obj"
includedirs {
"src",
}
libdirs {
}
configuration "Debug"
defines { }
flags { "Symbols" }
buildoptions { "-ggdb" }
targetdir "bin/Debug"
configuration "Release"
defines { "NDEBUG=1" }
flags { "Optimize", "NoFramePointer" }
buildoptions { "-O3" }
targetdir "bin/Release"
project "TEngine"
kind "WindowedApp"
language "C"
targetname "t-engine"
files { "src/*.c", }
links { "physfs", "lua".._OPTIONS.lua, "fov", "luasocket", "luaprofiler", "lualanes" }
linkoptions { "-framework SDL", "-framework SDL_gfx", "-framework SDL_image", "-framework SDL_ttf", "-framework SDL_mixer", "-framework Cocoa", "-framework OpenGL" }
files { "src/mac/SDL*" }
links { "IOKit" }
includedirs {
"/System/Library/Frameworks/OpenGL.framework/Headers",
"/Library/Frameworks/SDL.framework/Headers",
"/Library/Frameworks/SDL_net.framework/Headers",
"/Library/Frameworks/SDL_image.framework/Headers",
"/Library/Frameworks/SDL_ttf.framework/Headers",
"/Library/Frameworks/SDL_gfx.framework/Headers",
"/Library/Frameworks/SDL_mixer.framework/Headers"
}
links { "SDL", "SDL_ttf", "SDL_image", "SDL_mixer", "GL", "GLU" }
defines { [[TENGINE_HOME_PATH='"T-Engine"']], 'SELFEXE_WINDOWS' }
configuration "linux"
----------------------------------------------------------------
----------------------------------------------------------------
-- Librairies used by T-Engine
----------------------------------------------------------------
----------------------------------------------------------------
project "physfs"
kind "StaticLib"
language "C"
targetname "physfs"
defines {"PHYSFS_SUPPORTS_ZIP"}
files { "src/physfs/*.c", "src/physfs/zlib123/*.c", "src/physfs/archivers/*.c", }
configuration "linux"
files { "src/physfs/platform/unix.c", "src/physfs/platform/posix.c", }
configuration "windows"
files { "src/physfs/platform/windows.c", }
if _OPTIONS.lua == "default" then
project "luadefault"
kind "StaticLib"
language "C"
targetname "lua"
files { "src/lua/*.c", }
elseif _OPTIONS.lua == "jitx86" then
project "luajitx86"
kind "StaticLib"
language "C"
targetname "lua"
files { "src/luajit/*.c", }
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
project "luasocket"
kind "StaticLib"
language "C"
targetname "luasocket"
configuration "not windows"
files {
"src/luasocket/auxiliar.c",
"src/luasocket/buffer.c",
"src/luasocket/except.c",
"src/luasocket/inet.c",
"src/luasocket/io.c",
"src/luasocket/luasocket.c",
"src/luasocket/options.c",
"src/luasocket/select.c",
"src/luasocket/tcp.c",
"src/luasocket/timeout.c",
"src/luasocket/udp.c",
"src/luasocket/usocket.c",
"src/luasocket/mime.c",
}
configuration "windows"
files {
"src/luasocket/auxiliar.c",
"src/luasocket/buffer.c",
"src/luasocket/except.c",
"src/luasocket/inet.c",
"src/luasocket/io.c",
"src/luasocket/luasocket.c",
"src/luasocket/options.c",
"src/luasocket/select.c",
"src/luasocket/tcp.c",
"src/luasocket/timeout.c",
"src/luasocket/udp.c",
"src/luasocket/wsocket.c",
"src/luasocket/mime.c",
}
project "fov"
kind "StaticLib"
language "C"
targetname "fov"
files { "src/fov/*.c", }
project "luaprofiler"
kind "StaticLib"
language "C"
targetname "luaprofiler"
files { "src/luaprofiler/*.c", }