diff --git a/cflags_linux.go b/cflags_linux.go new file mode 100644 index 0000000..409251a --- /dev/null +++ b/cflags_linux.go @@ -0,0 +1,9 @@ +//+build !windows + +package imagequant + +/* +#cgo CFLAGS: -O3 -fno-math-errno -fopenmp -funroll-loops -fomit-frame-pointer -Wall -Wno-attributes -std=c99 -DNDEBUG -DUSE_SSE=1 -msse -fexcess-precision=fast +#cgo LDFLAGS: -lm -fopenmp +*/ +import "C" diff --git a/cflags_windows.go b/cflags_windows.go new file mode 100644 index 0000000..0800274 --- /dev/null +++ b/cflags_windows.go @@ -0,0 +1,9 @@ +//+build windows + +package imagequant + +/* +#cgo CFLAGS: -O3 -fno-math-errno -fopenmp -funroll-loops -fomit-frame-pointer -Wall -Wno-attributes -std=c99 -DNDEBUG -DUSE_SSE=1 -msse -fexcess-precision=fast +#cgo LDFLAGS: -fopenmp -static +*/ +import "C" \ No newline at end of file diff --git a/imagequant.go b/imagequant.go index 9f3d2a9..d121883 100644 --- a/imagequant.go +++ b/imagequant.go @@ -21,8 +21,6 @@ import ( ) /* -#cgo CFLAGS: -O3 -fno-math-errno -fopenmp -funroll-loops -fomit-frame-pointer -Wall -Wno-attributes -std=c99 -DNDEBUG -DUSE_SSE=1 -msse -fexcess-precision=fast -#cgo LDFLAGS: -fopenmp -static #include "libimagequant.h" const char* liqVersionString() {