Daniele Bartolini 10 rokov pred
rodič
commit
85ae0f4c8a
3 zmenil súbory, kde vykonal 16 pridanie a 14 odobranie
  1. 2 2
      genie/openal.lua
  2. 5 11
      genie/toolchain.lua
  3. 9 1
      third/openal/config.h

+ 2 - 2
genie/openal.lua

@@ -11,7 +11,6 @@ project "openal"
 	local AL_DIR = (CROWN_DIR .. "third/openal/")
 
 	defines {
-		"'ALSOFT_VERSION=\"1.17.1\"'",
 		"AL_ALEXT_PROTOTYPES",
 		"AL_BUILD_LIBRARY",
 		"_LARGEFILE_SOURCE",
@@ -25,7 +24,6 @@ project "openal"
 		"HAVE_FLOAT_H",
 		"HAVE_FENV_H",
 		"HAVE_MALLOC_H",
-		"HAVE_DIRENT_H",
 	}
 
 	configuration { "android-* or linux-*" }
@@ -43,6 +41,7 @@ project "openal"
 			"HAVE_PTHREAD_SETSCHEDPARAM",
 			"HAVE_PTHREAD_SETNAME_NP",
 			"HAVE_GCC_GET_CPUID",
+			"HAVE_DIRENT_H",
 		}
 		buildoptions {
 			"-std=c11",
@@ -95,6 +94,7 @@ project "openal"
 			"_WINDOWS",
 			"_WIN32_WINNT=0x0502",
 			"inline=__inline",
+			"restrict=",
 			"_CRT_NONSTDC_NO_DEPRECATE",
 			"strcasecmp=_stricmp",
 			"strncasecmp=_strnicmp",

+ 5 - 11
genie/toolchain.lua

@@ -34,7 +34,9 @@ function toolchain(build_dir, lib_dir)
 
 		if "linux-gcc" == _OPTIONS["compiler"] then
 
-			if not os.is("linux") then print("Action not valid in current OS.") end
+			if not os.is("linux") then
+				print("Action not valid in current OS.")
+			end
 
 			location(build_dir .. "projects/" .. "linux")
 		end
@@ -58,10 +60,8 @@ function toolchain(build_dir, lib_dir)
 
 	if _ACTION == "vs2013" then
 
-		if not os.is("windows") then print("Action not valid in current OS.") end
-
-		if not os.getenv("DXSDK_DIR") then
-			print("Set DXSDK_DIR environment variable.")
+		if not os.is("windows") then
+			print("Action not valid in current OS.")
 		end
 
 		location(build_dir .. "projects/" .. _ACTION)
@@ -247,16 +247,10 @@ function toolchain(build_dir, lib_dir)
 	configuration { "x32", "vs*" }
 		targetdir (build_dir .. "win32" .. "/bin")
 		objdir (build_dir .. "win32" .. "/obj")
-		libdirs {
-			"$(DXSDK_DIR)/Lib/x86",
-		}
 
 	configuration { "x64", "vs*" }
 		targetdir (build_dir .. "win64" .. "/bin")
 		objdir (build_dir .. "win64" .. "/obj")
-		libdirs {
-			"$(DXSDK_DIR)/Lib/x64",
-		}
 
 	configuration {} -- reset configuration
 end

+ 9 - 1
third/openal/config.h

@@ -1 +1,9 @@
-/* Placeholder */
+#define ALSOFT_VERSION "1.17.1"
+
+#if defined(_MSC_VER)
+	/* API declaration export attribute */
+	#define AL_API  __declspec(dllexport)
+	#define ALC_API __declspec(dllexport)
+	/* Define any available alignment declaration */
+	#define ALIGN(x) __declspec(align(x))
+#endif // _MSC_VER