split up cgo CFLAGS into files with separate build tags

This commit is contained in:
mappu 2017-03-03 18:16:40 +13:00
parent ed5a2bf1d3
commit 29c239a810
3 changed files with 18 additions and 2 deletions

9
cflags_linux.go Normal file
View File

@ -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"

9
cflags_windows.go Normal file
View File

@ -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"

View File

@ -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" #include "libimagequant.h"
const char* liqVersionString() { const char* liqVersionString() {