From 87f1b60900583bcd96e2a22ac9a33137a4468cb2 Mon Sep 17 00:00:00 2001 From: WMYeah_Mac Date: Thu, 20 Jun 2024 19:09:18 +0800 Subject: [PATCH] cace --- CMakeLists.txt | 1 + cgo_configure.go | 30 ++++++++++++++++++++++++++++++ cgo_darwin_arm64.go | 10 ---------- cgo_darwin_x86_64.go | 10 ---------- cgo_linux_arm64.go | 10 ---------- cgo_linux_x86_64.go | 10 ---------- cgo_windows_arm64.go | 10 ---------- cgo_windows_x86_64.go | 10 ---------- lib/darwin/libscrypt.a | Bin 6512 -> 6512 bytes lib/darwin/libscrypt_arm64.a | Bin 6768 -> 6768 bytes 10 files changed, 31 insertions(+), 60 deletions(-) create mode 100644 cgo_configure.go delete mode 100644 cgo_darwin_arm64.go delete mode 100644 cgo_darwin_x86_64.go delete mode 100644 cgo_linux_arm64.go delete mode 100644 cgo_linux_x86_64.go delete mode 100644 cgo_windows_arm64.go delete mode 100644 cgo_windows_x86_64.go diff --git a/CMakeLists.txt b/CMakeLists.txt index fff659f..c4429d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ find_package(OpenSSL REQUIRED) if(OPENSSL_FOUND) include_directories(${OPENSSL_INCLUDE_DIR}) message(STATUS "OpenSSL include directory: ${OPENSSL_INCLUDE_DIR}") + message(STATUS "OpenSSL libraries: ${OPENSSL_LIBRARIES}") else() message(FATAL_ERROR "OpenSSL not found!") endif() diff --git a/cgo_configure.go b/cgo_configure.go new file mode 100644 index 0000000..a3ef959 --- /dev/null +++ b/cgo_configure.go @@ -0,0 +1,30 @@ +//go:build (darwin && amd64) || (darwin && arm64) || (linux && amd64) || (linux && arm64) || (windows && amd64) || (windows && arm64) + +package ltc_scrypt_go + +/* +#cgo darwin,amd64 CFLAGS: -I${SRCDIR}/lib/darwin -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include +#cgo darwin,amd64 CPPFLAGS: -I${SRCDIR}/lib/darwin -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include +#cgo darwin,amd64 LDFLAGS: ${SRCDIR}/lib/darwin/libscrypt.a /usr/local/opt/openssl/lib/libssl.a /usr/local/opt/openssl/lib/libcrypto.a + +#cgo darwin,arm64 CFLAGS: -I${SRCDIR}/lib/darwin -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include +#cgo darwin,arm64 CPPFLAGS: -I${SRCDIR}/lib/darwin -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include +#cgo darwin,arm64 LDFLAGS: ${SRCDIR}/lib/darwin/libscrypt_arm64.a /usr/local/opt/openssl/lib/libssl.a /usr/local/opt/openssl/lib/libcrypto.a + +#cgo linux,amd64 CFLAGS: -I${SRCDIR}/lib/linux -I${SRCDIR}/lib/include -I/usr/include/openssl +#cgo linux,amd64 CPPFLAGS: -I${SRCDIR}/lib/linux -I${SRCDIR}/lib/include -I/usr/include/openssl +#cgo linux,amd64 LDFLAGS: ${SRCDIR}/lib/linux/libscrypt.a /usr/lib/x86_64-linux-gnu/libssl.a /usr/lib/x86_64-linux-gnu/libcrypto.a + +#cgo linux,arm64 CFLAGS: -I${SRCDIR}/lib/linux -I${SRCDIR}/lib/include -I/usr/include/openssl +#cgo linux,arm64 CPPFLAGS: -I${SRCDIR}/lib/linux -I${SRCDIR}/lib/include -I/usr/include/openssl +#cgo linux,arm64 LDFLAGS: ${SRCDIR}/lib/linux/libscrypt_arm64.a /usr/lib/aarch64-linux-gnu/libssl.a /usr/lib/aarch64-linux-gnu/libcrypto.a + +#cgo windows,amd64 CFLAGS: -I${SRCDIR}/lib/windows -I${SRCDIR}/lib/include +#cgo windows,amd64 CPPFLAGS: -I${SRCDIR}/lib/windows -I${SRCDIR}/lib/include +#cgo windows,amd64 LDFLAGS: ${SRCDIR}/lib/windows/libscrypt.a C:/msys64/mingw64/lib/libssl.a C:/msys64/mingw64/lib/libcrypto.a + +#cgo windows,arm64 CFLAGS: -I${SRCDIR}/lib/windows -I${SRCDIR}/lib/include +#cgo windows,arm64 CPPFLAGS: -I${SRCDIR}/lib/windows -I${SRCDIR}/lib/include +#cgo windows,arm64 LDFLAGS: ${SRCDIR}/lib/windows/libscrypt_arm64.a /mingw64/lib/libssl.a /mingw64/lib/libcrypto.a +*/ +import "C" diff --git a/cgo_darwin_arm64.go b/cgo_darwin_arm64.go deleted file mode 100644 index f95672e..0000000 --- a/cgo_darwin_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build darwin && arm64 - -package ltc_scrypt_go - -/* -#cgo darwin,arm64 CFLAGS: -I${SRCDIR}/lib/darwin/arm64 -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include -#cgo darwin,arm64 CPPFLAGS: -I${SRCDIR}/lib/darwin/arm64 -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include -#cgo darwin,arm64 LDFLAGS: ${SRCDIR}/lib/darwin/libscrypt_arm64.a ${OPENSSL_LIBRARIES}/libssl.a ${OPENSSL_LIBRARIES}/libcrypto.a -*/ -import "C" diff --git a/cgo_darwin_x86_64.go b/cgo_darwin_x86_64.go deleted file mode 100644 index df41736..0000000 --- a/cgo_darwin_x86_64.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build darwin && amd64 - -package ltc_scrypt_go - -/* -#cgo darwin,amd64 CFLAGS: -I${SRCDIR}/lib/darwin -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include -#cgo darwin,amd64 CPPFLAGS: -I${SRCDIR}/lib/darwin -I${SRCDIR}/lib/include -I/usr/local/opt/openssl/include -#cgo darwin,amd64 LDFLAGS: ${SRCDIR}/lib/darwin/libscrypt.a /usr/local/opt/openssl/lib/libssl.a /usr/local/opt/openssl/lib/libcrypto.a -*/ -import "C" diff --git a/cgo_linux_arm64.go b/cgo_linux_arm64.go deleted file mode 100644 index ffd9128..0000000 --- a/cgo_linux_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build linux && arm64 - -package ltc_scrypt_go - -/* -#cgo linux,arm64 CFLAGS: -I${SRCDIR}/lib/linux -I${SRCDIR}/lib/include -#cgo linux,arm64 CPPFLAGS: -I${SRCDIR}/lib/linux -I${SRCDIR}/lib/include -#cgo linux,arm64 LDFLAGS: ${SRCDIR}/lib/linux/libscrypt_arm64.a ${OPENSSL_LIBRARIES}/libssl.a ${OPENSSL_LIBRARIES}/libcrypto.a -*/ -import "C" diff --git a/cgo_linux_x86_64.go b/cgo_linux_x86_64.go deleted file mode 100644 index f369924..0000000 --- a/cgo_linux_x86_64.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build linux && amd64 - -package ltc_scrypt_go - -/* -#cgo linux,amd64 CFLAGS: -I${SRCDIR}/linux -I${SRCDIR}/lib/include -#cgo linux,amd64 CPPFLAGS: -I${SRCDIR}/lib/linux -I${SRCDIR}/lib/include -#cgo linux,amd64 LDFLAGS: ${SRCDIR}/lib/linux/libscrypt.a ${OPENSSL_LIBRARIES}/libssl.a ${OPENSSL_LIBRARIES}/libcrypto.a -*/ -import "C" diff --git a/cgo_windows_arm64.go b/cgo_windows_arm64.go deleted file mode 100644 index 820a232..0000000 --- a/cgo_windows_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build windows && arm64 - -package ltc_scrypt_go - -/* -#cgo windows,arm64 CFLAGS: -I${SRCDIR}/lib/include -#cgo windows,arm64 CPPFLAGS: -I${SRCDIR}/lib/include -#cgo windows,amd64 LDFLAGS: ${SRCDIR}/lib/windows/libscrypt_arm64.a ${OPENSSL_LIBRARIES}/libssl.a ${OPENSSL_LIBRARIES}/libcrypto.a -*/ -import "C" diff --git a/cgo_windows_x86_64.go b/cgo_windows_x86_64.go deleted file mode 100644 index 1363e7f..0000000 --- a/cgo_windows_x86_64.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build windows && amd64 - -package ltc_scrypt_go - -/* -#cgo windows,amd64 CFLAGS: -I${SRCDIR}/lib/include -#cgo windows,amd64 CPPFLAGS: -I${SRCDIR}/lib/include -#cgo windows,amd64 LDFLAGS: ${SRCDIR}/lib/windows/libscrypt.a ${OPENSSL_LIBRARIES}/libssl.a ${OPENSSL_LIBRARIES}/libcrypto.a -*/ -import "C" diff --git a/lib/darwin/libscrypt.a b/lib/darwin/libscrypt.a index 37104793587b0fca1d6dece1e04c4336a91e59e7..4e5f10b5eaf68278daacbea77db1e186bff4e480 100644 GIT binary patch delta 25 ecmexh^ucI?EUSfqg{8?vrOhCQh2_Ru(