carpy-breakout/Makefile

36 lines
624 B
Makefile

all: release
dependencies:
go mod tidy
debug: linter dependencies
go build -x -v -gcflags=all="-N -l"
release: linter dependencies
go build -x -v -ldflags "-s -w"
linter:
golangci-lint run
clean:
rm -f carpy-breakout
rm -f output.log
rm -f cpu.prof
cross_windows:
export CGO_ENABLED=1
export CC=x86_64-w64-mingw32-gcc
export GOOS=windows
export GOARCH=amd64
go build -x -v -ldflags "-s -w"
cross_windows_x86:
export CGO_ENABLED=1
export CC=i686-w64-mingw32-gcc
export GOOS=windows
export GOARCH=386
go build -x -v -ldflags "-s -w"
goimports_everything:
find . -name "*.go" -exec goimports -w {} \;