diff --git a/client/tdjson.go b/client/tdjson.go deleted file mode 100644 index a2860a9..0000000 --- a/client/tdjson.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build darwin -// +build darwin - -package client - -/* -#cgo darwin CFLAGS: -I/usr/local/include -#cgo darwin LDFLAGS: -L/usr/local/lib -L/usr/local/opt/openssl/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm -*/ -import "C" diff --git a/client/tdjson_dynamic.go b/client/tdjson_dynamic.go deleted file mode 100644 index cda7e2e..0000000 --- a/client/tdjson_dynamic.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build libtdjson && (linux || darwin) -// +build libtdjson -// +build linux darwin - -package client - -/* -#cgo linux CFLAGS: -I/usr/local/include -#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson -lstdc++ -lssl -lcrypto -ldl -lz -lm -#cgo darwin CFLAGS: -I/usr/local/include -#cgo darwin LDFLAGS: -L/usr/local/lib -ltdjson -lstdc++ -lssl -lcrypto -ldl -lz -lm -*/ -import "C" diff --git a/client/tdjson_static.go b/client/tdjson_static.go deleted file mode 100644 index a486de9..0000000 --- a/client/tdjson_static.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build !libtdjson && (linux || darwin) -// +build !libtdjson -// +build linux darwin - -package client - -/* -#cgo linux CFLAGS: -I/usr/local/include -#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdactor -ltdapi -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm -#cgo darwin CFLAGS: -I/usr/local/include -#cgo darwin LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdactor -ltdapi -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm -*/ -import "C" diff --git a/client/tdlib.go b/client/tdlib.go index 6a75b03..e9a94e8 100644 --- a/client/tdlib.go +++ b/client/tdlib.go @@ -1,9 +1,14 @@ package client -/* -#include -#include -*/ +//#cgo linux CFLAGS: -I/usr/local/include +//#cgo darwin CFLAGS: -I/usr/local/include +//#cgo windows CFLAGS: -IE:/src/tdlib -IE:/src/tdlib/build +//#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm +//#cgo darwin LDFLAGS: -L/usr/local/lib -L/usr/local/opt/openssl/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm +//#cgo windows LDFLAGS: -LE:/src/tdlib/build/Release -ltdjson +//#include +//#include +//#include import "C" import (