if windows then if target == "vs2005" then msvc_crt = 80 elseif target == "vs2003" then msvc_crt = 71 end DEPDIR = "../deps/win32" else linuxbits = 64 DEPDIR = "../deps/linux_"..linuxbits end -- project config project.name = "ttogl" -- package config package = newpackage() package.name = "ttogl" package.kind = "exe" package.language = "c++" -- package files package.files = { matchfiles("../*.cpp"), matchrecursive("../Render/*.cpp"), matchrecursive("../Terrain/*.cpp"), } -- defines if windows then package.defines = { "WIN32", "_WIN32", "NO_SDL_GLEXT" } else package.defines = { "LINUX", "NO_SDL_GLEXT", "GL_GLEXT_LEGACY" } end package.config.Debug.defines = { "DEBUG", "_DEBUG" } package.config.Release.defines = { "NDEBUG", "_NDEBUG" } -- include paths if windows then package.includepaths = { "..", DEPDIR.."/nvsg/include/nvsg", DEPDIR.."/SDL-1.2.11/include", } else package.includepaths = { "..", DEPDIR.."/nvsg/inc/nvsg", DEPDIR.."/usr/include/SDL", } end -- library paths if windows then -- windows package.libpaths = { DEPDIR.."/SDL-1.2.11/lib", } package.config.Debug.libpaths = { DEPDIR.."/nvsg/lib/crt"..msvc_crt.."/Debug", } package.config.Release.libpaths = { DEPDIR.."/nvsg/lib/ctr"..msvc_crt.."/Release", } else -- linux local arch = linuxbits == 64 and "amd64" or "x86" package.config.Debug.libpaths = { DEPDIR.."/nvsg/bin/"..arch.."/linux/debug", } package.config.Release.libpaths = { DEPDIR.."/nvsg/bin/"..arch.."/linux/release", } end -- linking libs if windows then package.links = { "nvsg", "SDL", "SDLmain", "OpenGL32", } else package.links = { "nvsg", "SDL", } end -- platform specific compiler options if linux then package.buildoptions = { "-ffriend-injection" } -- needed for nvsg with gcc 4.1 end