Skip to content
Snippets Groups Projects
premake4.lua 1.32 KiB
Newer Older
  • Learn to ignore specific revisions
  • 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",
    
    dg's avatar
    dg committed
    		"src/zlib",
    
    dg's avatar
    dg committed
    		"src/bzip2",
    
    dg's avatar
    dg committed
    		"/opt/SDL-2.0/include/SDL2",
    
    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 == "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
    	}
    	includedirs {
    
    		"/c/code/SDL/include/SDL2",
    		"/c/code/SDL/include",
    
    dg's avatar
    dg committed
    		"/c/mingw2/include/GL",
    
    dg's avatar
    dg committed
    	}
    
    
    dg's avatar
    dg committed
    configuration "macosx"
    
    dg's avatar
    dg committed
    	buildoptions { "-isysroot /Developer/SDKs/MacOSX10.6.sdk", "-mmacosx-version-min=10.6" }
    
    dg's avatar
    dg committed
    
    
    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")