-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
24 lines (20 loc) · 874 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export CGO_ENABLED=1
export GOARCH=386
export WDIR=${PWD}
all: linux windows
linux:
GOOS=linux CGO_CFLAGS="-I${WDIR}/include" CGO_LDFLAGS="-L${WDIR}/lib -Wl,-rpath=${WDIR}/lib -lhcnetsdk" go build -o build/Linux/hikka src/hikka.go
cp lib/libhcnetsdk.so build/Linux/
cp dist/hosts build/Linux
cp dist/logins build/Linux
cp dist/passwords build/Linux
cp dist/hostgen.py build/Linux
windows:
CGO_CFLAGS="-I${WDIR}/include" CGO_LDFLAGS="-L${WDIR}/lib -Wl,--large-address-aware,--enable-stdcall-fixup,-rpath=${WDIR}/lib -lhcnetsdk" GOOS=windows CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ go build -o build/Windows/hikka.exe src/hikka.go
cp lib/libhcnetsdk.dll build/Windows/hcnetsdk.dll
cp lib/HPR.dll build/Windows/HPR.dll
cp dist/hosts build/Windows/hosts
cp dist/logins build/Windows/logins
cp dist/passwords build/Windows/passwords
clean:
rm -r build/