diff --git a/crypto/md5/md5.go b/crypto/md5/md5.go index bc8ee86..fe6e700 100644 --- a/crypto/md5/md5.go +++ b/crypto/md5/md5.go @@ -15,6 +15,12 @@ package md5 // #include "../../shim.h" +// #cgo linux CFLAGS: -Wno-deprecated-declarations -I/opt/tongsuo/include +// #cgo linux LDFLAGS: -L/opt/tongsuo/lib -lssl -lcrypto +// #cgo darwin CFLAGS: -I/opt/tongsuo/include -Wno-deprecated-declarations +// #cgo darwin LDFLAGS: -L/opt/tongsuo/lib -lssl -lcrypto +// #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN +// #cgo windows pkg-config: libssl libcrypto import "C" import ( diff --git a/crypto/sha1/sha1.go b/crypto/sha1/sha1.go index 64f7fcc..66dd305 100644 --- a/crypto/sha1/sha1.go +++ b/crypto/sha1/sha1.go @@ -15,6 +15,12 @@ package sha1 // #include "../../shim.h" +// #cgo linux CFLAGS: -Wno-deprecated-declarations -I/opt/tongsuo/include +// #cgo linux LDFLAGS: -L/opt/tongsuo/lib -lssl -lcrypto +// #cgo darwin CFLAGS: -I/opt/tongsuo/include -Wno-deprecated-declarations +// #cgo darwin LDFLAGS: -L/opt/tongsuo/lib -lssl -lcrypto +// #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN +// #cgo windows pkg-config: libssl libcrypto import "C" import ( diff --git a/crypto/sha256/sha256.go b/crypto/sha256/sha256.go index 393a5aa..f0bf025 100644 --- a/crypto/sha256/sha256.go +++ b/crypto/sha256/sha256.go @@ -15,6 +15,12 @@ package sha256 // #include "../../shim.h" +// #cgo linux CFLAGS: -Wno-deprecated-declarations -I/opt/tongsuo/include +// #cgo linux LDFLAGS: -L/opt/tongsuo/lib -lssl -lcrypto +// #cgo darwin CFLAGS: -I/opt/tongsuo/include -Wno-deprecated-declarations +// #cgo darwin LDFLAGS: -L/opt/tongsuo/lib -lssl -lcrypto +// #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN +// #cgo windows pkg-config: libssl libcrypto import "C" import (