2024-06-29 00:41:05 +00:00
|
|
|
SHELL:=/bin/bash
|
|
|
|
|
|
|
|
SOURCES=$(find . -name '*.go' -type f)
|
|
|
|
|
|
|
|
liblcl-2.2.3.zip:
|
2024-06-29 22:44:13 +00:00
|
|
|
rm -f liblcl-2.2.3.zip
|
2024-06-29 00:41:05 +00:00
|
|
|
wget 'https://github.com/ying32/govcl/releases/download/v2.2.3/liblcl-2.2.3.zip'
|
|
|
|
|
|
|
|
liblcl.so: liblcl-2.2.3.zip
|
|
|
|
echo "154b4e4a1d5137a2ffe51cb4d0bf152dd997c12616ae30862775c0e4f0928e88 liblcl-2.2.3.zip" | sha256sum -c
|
2024-06-29 22:44:13 +00:00
|
|
|
rm -f liblcl.so
|
2024-06-29 00:41:05 +00:00
|
|
|
unzip -j liblcl-2.2.3.zip linux64-gtk2/liblcl.so -d .
|
|
|
|
touch liblcl.so
|
|
|
|
|
|
|
|
liblcl.dll: liblcl-2.2.3.zip
|
|
|
|
echo "154b4e4a1d5137a2ffe51cb4d0bf152dd997c12616ae30862775c0e4f0928e88 liblcl-2.2.3.zip" | sha256sum -c
|
2024-06-29 22:44:13 +00:00
|
|
|
rm -f liblcl.dll
|
2024-06-29 00:41:05 +00:00
|
|
|
unzip -j liblcl-2.2.3.zip win64/liblcl.dll -d .
|
|
|
|
touch liblcl.dll
|
|
|
|
|
|
|
|
yvbolt: $(SOURCES)
|
2024-06-30 00:45:40 +00:00
|
|
|
CGO_CFLAGS='-O2 -Wno-return-local-addr' GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -trimpath -ldflags '-s -w'
|
2024-06-29 00:41:05 +00:00
|
|
|
chmod 755 yvbolt
|
|
|
|
|
|
|
|
yvbolt.exe: $(SOURCES)
|
2024-06-30 00:45:40 +00:00
|
|
|
CGO_CFLAGS='-O2 -Wno-return-local-addr' GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -trimpath -ldflags '-s -w -H windowsgui'
|
2024-06-29 22:45:08 +00:00
|
|
|
upx --lzma yvbolt.exe
|
2024-06-29 00:41:05 +00:00
|
|
|
|
|
|
|
yvbolt.linux64.tar.xz: yvbolt liblcl.so
|
2024-06-29 00:54:57 +00:00
|
|
|
rm -f yvbolt.linux64.tar.xz
|
2024-06-29 22:45:19 +00:00
|
|
|
XZ_OPT='-T0 -9' tar caf yvbolt.linux64.tar.xz --owner=0 --group=0 yvbolt liblcl.so
|
2024-06-29 00:41:05 +00:00
|
|
|
|
|
|
|
yvbolt.win64.zip: yvbolt.exe liblcl.dll
|
2024-06-29 00:54:57 +00:00
|
|
|
rm -f yvbolt.win64.zip
|
|
|
|
zip -9 yvbolt.win64.zip yvbolt.exe liblcl.dll
|
2024-06-29 00:41:05 +00:00
|
|
|
|
|
|
|
.PHONY: dist
|
|
|
|
dist: yvbolt.linux64.tar.xz yvbolt.win64.zip
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f yvbolt.exe yvbolt yvbolt.linux64.tar.xz yvbolt.win64.zip
|
|
|
|
|
|
|
|
.PHONY: clean-all
|
|
|
|
clean-all: clean
|
|
|
|
rm -f liblcl-2.2.3.zip liblcl.so liblcl.dll
|