]> Sergey Matveev's repositories - go-opus.git/commitdiff
Use pkg-config to link opus
authorHraban Luyat <hraban@0brg.net>
Fri, 26 Feb 2016 17:27:41 +0000 (17:27 +0000)
committerHraban Luyat <hraban@0brg.net>
Sun, 14 Aug 2016 13:44:41 +0000 (14:44 +0100)
decoder.go
encoder.go
errors.go
opus.go
stream.go

index 94e98386d224d27935c07cff6687f864d6706f55..490b37a47ed544accda6b41c12be52213bb0ce7e 100644 (file)
@@ -10,7 +10,7 @@ import (
 )
 
 /*
-#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include
+#cgo pkg-config: opus
 #include <opus/opus.h>
 */
 import "C"
index e6e3ae44097a80d86bd5be36ef3c0ffb4778477a..b6e8935da8ede1c5056b08ab2cae184cb6a13d54 100644 (file)
@@ -10,7 +10,7 @@ import (
 )
 
 /*
-#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include
+#cgo pkg-config: opus
 #include <opus/opus.h>
 */
 import "C"
index 9bf482e4b42b8895cd862c24940bcdf3cfccaf5e..b3719c7a85c42cabce892c3769b0b604f3845fdd 100644 (file)
--- a/errors.go
+++ b/errors.go
@@ -5,7 +5,7 @@ import (
 )
 
 /*
-#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include -Ibuild/include/opus
+#cgo pkg-config: opus opusfile
 #include <opus/opus.h>
 #include <opusfile.h>
 
diff --git a/opus.go b/opus.go
index 56e70cd803584da5980ff7bfe93c4f19802fdb68..1a5c0c0bcb7c46d2aeecefae4dd1271ab1a80be0 100644 (file)
--- a/opus.go
+++ b/opus.go
@@ -14,8 +14,7 @@ package opus
 // not the user.
 //
 // If I missed something, and somebody knows a better way: please let me know.
-#cgo LDFLAGS: libopusfile.a libopus.a -logg -lm
-#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include
+#cgo pkg-config: opus
 #include <opus/opus.h>
 
 // Access the preprocessor from CGO
index 2903d95bb9b874bd807b130e69d2dd50658f5fd3..f48fa318aecc4f8423fe3fd81b490d237139ba4e 100644 (file)
--- a/stream.go
+++ b/stream.go
@@ -7,7 +7,7 @@ import (
 )
 
 /*
-#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include/opus
+#cgo pkg-config: opus
 #include <opusfile.h>
 #include <string.h>