-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
34 lines (31 loc) · 1.78 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# build hash_api
nasm -f bin -O3 src/x64/find_api.asm -o bin/x64/find_api.bin
nasm -f bin -O3 src/x64/api_call.asm -o bin/x64/api_call.bin
nasm -f bin -O3 src/x86/find_api.asm -o bin/x86/find_api.bin
nasm -f bin -O3 src/x86/api_call.asm -o bin/x86/api_call.bin
# build example
nasm -f bin -O3 example/asm/x64/find_api.asm -o example/asm/x64/find_api.bin
nasm -f bin -O3 example/asm/x64/api_call.asm -o example/asm/x64/api_call.bin
nasm -f bin -O3 example/asm/x64/win_exec.asm -o example/asm/x64/win_exec.bin
nasm -f bin -O3 example/asm/x86/find_api.asm -o example/asm/x86/find_api.bin
nasm -f bin -O3 example/asm/x86/api_call.asm -o example/asm/x86/api_call.bin
nasm -f bin -O3 example/asm/x86/win_exec.asm -o example/asm/x86/win_exec.bin
# build develop tool
export GOOS=linux
export GOARCH=amd64
go build -v -trimpath -ldflags "-s -w" -o bin/x64/hash cmd/hash/main.go
go build -v -trimpath -ldflags "-s -w" -o bin/x64/hexbin cmd/hexbin/main.go
export GOARCH=386
go build -v -trimpath -ldflags "-s -w" -o bin/x86/hash cmd/hash/main.go
go build -v -trimpath -ldflags "-s -w" -o bin/x86/hexbin cmd/hexbin/main.go
export GOOS=windows
export GOARCH=amd64
go build -v -trimpath -ldflags "-s -w" -o bin/x64/hash.exe cmd/hash/main.go
go build -v -trimpath -ldflags "-s -w" -o bin/x64/hexbin.exe cmd/hexbin/main.go
go build -v -trimpath -ldflags "-s -w" -o bin/x64/scloader.exe cmd/scloader/main.go
go build -v -trimpath -ldflags "-s -w" -o example/go/go_amd64.exe example/go/main.go
export GOARCH=386
go build -v -trimpath -ldflags "-s -w" -o bin/x86/hash.exe cmd/hash/main.go
go build -v -trimpath -ldflags "-s -w" -o bin/x86/hexbin.exe cmd/hexbin/main.go
go build -v -trimpath -ldflags "-s -w" -o bin/x86/scloader.exe cmd/scloader/main.go
go build -v -trimpath -ldflags "-s -w" -o example/go/go_386.exe example/go/main.go