Skip to content
Snippets Groups Projects
premake4.lua 1.38 KiB
Newer Older
dg's avatar
dg committed
dofile("build/options.lua")
dg's avatar
dg committed
solution "TEngine"
	configurations { "Debug", "Release" }
	objdir "obj"
dg's avatar
dg committed
	defines {"GLEW_STATIC"}
	if _OPTIONS.force32bits then buildoptions{"-m32"} linkoptions{"-m32"} libdirs{"/usr/lib32"} end
	if _OPTIONS.relpath then linkoptions{"-Wl,-rpath -Wl,\\\$\$ORIGIN/lib "} end
dg's avatar
dg committed

	includedirs {
		"src",
dg's avatar
dg committed
		"src/luasocket",
dg's avatar
dg committed
		"src/fov",
dg's avatar
dg committed
		"src/expat",
		"src/lxp",
dg's avatar
dg committed
		"src/libtcod_import",
dg's avatar
dg committed
		"src/physfs",
		"src/physfs/zlib123",
dg's avatar
dg committed
		"src/bzip2",
dg's avatar
dg committed
		"/usr/include/GL",
dg's avatar
dg committed
	}
dg's avatar
dg committed
	if _OPTIONS.lua == "default" then includedirs{"src/lua"}
	elseif _OPTIONS.lua == "jitx86" then includedirs{"src/luajit", "src/dynasm",}
	elseif _OPTIONS.lua == "jit2" then includedirs{"src/luajit2/src", "src/luajit2/dynasm",}
	end
dg's avatar
dg committed

dg's avatar
dg committed
configuration "windows"
	libdirs {
dg's avatar
dg committed
		"/c/mingw2/lib",
dg's avatar
dg committed
	}
	includedirs {
dg's avatar
dg committed
		"/c/mingw2/include/SDL",
		"/c/mingw2/include/GL",
dg's avatar
dg committed
	}

dg's avatar
dg committed
configuration "macosx"
	buildoptions { "-pagezero_size 10000", "-image_base 100000000" }

dg's avatar
dg committed
configuration "Debug"
	defines { }
	flags { "Symbols" }
dg's avatar
dg committed
	buildoptions { "-ggdb" }
dg's avatar
dg committed
	targetdir "bin/Debug"
	if _OPTIONS.luaassert then defines {"LUA_USE_APICHECK"} end
	if _OPTIONS.pedantic then buildoptions { "-Wall" } end
dg's avatar
dg committed

configuration "Release"
	defines { "NDEBUG=1" }
	flags { "Optimize", "NoFramePointer" }
dg's avatar
dg committed
	buildoptions { "-O2" }
dg's avatar
dg committed
	targetdir "bin/Release"

dg's avatar
dg committed

dg's avatar
dg committed
--dofile("build/runner.lua")
dg's avatar
dg committed
dofile("build/te4core.lua")