Browse Source

Added FreeBSD to toolchain.lua.

Branimir Karadžić 11 years ago
parent
commit
0af42a72c6
1 changed files with 13 additions and 0 deletions
  1. 13 0
      premake/toolchain.lua

+ 13 - 0
premake/toolchain.lua

@@ -17,6 +17,7 @@ function toolchain(_buildDir, _libDir)
 			{ "android-mips", "Android - MIPS" },
 			{ "android-mips", "Android - MIPS" },
 			{ "android-x86", "Android - x86" },
 			{ "android-x86", "Android - x86" },
 			{ "asmjs", "Emscripten/asm.js" },
 			{ "asmjs", "Emscripten/asm.js" },
+			{ "freebsd", "FreeBSD" },
 			{ "linux-gcc", "Linux (GCC compiler)" },
 			{ "linux-gcc", "Linux (GCC compiler)" },
 			{ "linux-clang", "Linux (Clang compiler)" },
 			{ "linux-clang", "Linux (Clang compiler)" },
 			{ "mingw", "MinGW" },
 			{ "mingw", "MinGW" },
@@ -98,6 +99,10 @@ function toolchain(_buildDir, _libDir)
 			location (_buildDir .. "projects/" .. _ACTION .. "-asmjs")
 			location (_buildDir .. "projects/" .. _ACTION .. "-asmjs")
 		end
 		end
 
 
+		if "freebsd" == _OPTIONS["gcc"] then
+			location (_buildDir .. "projects/" .. _ACTION .. "-freebsd")
+		end
+
 		if "linux-gcc" == _OPTIONS["gcc"] then
 		if "linux-gcc" == _OPTIONS["gcc"] then
 			location (_buildDir .. "projects/" .. _ACTION .. "-linux")
 			location (_buildDir .. "projects/" .. _ACTION .. "-linux")
 		end
 		end
@@ -484,6 +489,14 @@ function toolchain(_buildDir, _libDir)
 			"-Wno-warn-absolute-paths",
 			"-Wno-warn-absolute-paths",
 		}
 		}
 
 
+	configuration { "freebsd" }
+		targetdir (_buildDir .. "freebsd" .. "/bin")
+		objdir (_buildDir .. "freebsd" .. "/obj")
+		libdirs { _libDir .. "lib/freebsd" }
+		includedirs { 
+			bxDir .. "include/compat/freebsd",
+		}
+
 	configuration { "nacl or nacl-arm or pnacl" }
 	configuration { "nacl or nacl-arm or pnacl" }
 		includedirs { 
 		includedirs { 
 			"$(NACL_SDK_ROOT)/include",
 			"$(NACL_SDK_ROOT)/include",