2021-03-04 03:29:44 +00:00
|
|
|
GIT_HEAD = $(shell git rev-parse HEAD | head -c8)
|
|
|
|
|
2020-05-17 23:12:42 +00:00
|
|
|
build:
|
2020-10-17 20:52:38 +00:00
|
|
|
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_amd64 -v wings.go
|
|
|
|
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_arm64 -v wings.go
|
2017-06-27 10:42:56 +00:00
|
|
|
|
2020-12-12 17:56:01 +00:00
|
|
|
debug:
|
2021-03-04 03:29:44 +00:00
|
|
|
go build -ldflags="-X github.com/pterodactyl/wings/system.Version=$(GIT_HEAD)" -race
|
2021-01-13 04:07:00 +00:00
|
|
|
sudo ./wings --debug --ignore-certificate-errors --config config.yml
|
2020-12-12 17:56:01 +00:00
|
|
|
|
2021-01-22 04:08:54 +00:00
|
|
|
# Runs a remotly debuggable session for Wings allowing an IDE to connect and target
|
|
|
|
# different breakpoints.
|
|
|
|
rmdebug:
|
2021-03-04 03:29:44 +00:00
|
|
|
go build -gcflags "all=-N -l" -ldflags="-X github.com/pterodactyl/wings/system.Version=$(GIT_HEAD)" -race
|
2021-01-22 04:08:54 +00:00
|
|
|
sudo dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./wings -- --debug --ignore-certificate-errors --config config.yml
|
|
|
|
|
2020-05-17 23:12:42 +00:00
|
|
|
compress:
|
|
|
|
upx --brute build/wings_*
|
2017-06-27 10:42:56 +00:00
|
|
|
|
2020-05-17 23:12:42 +00:00
|
|
|
cross-build: clean build compress
|
2017-06-27 10:42:56 +00:00
|
|
|
|
2020-05-17 23:12:42 +00:00
|
|
|
clean:
|
2020-06-19 04:05:00 +00:00
|
|
|
rm -rf build/wings_*
|
|
|
|
|
|
|
|
.PHONY: all build compress clean
|