project-ely/Makefile

38 lines
607 B
Makefile

EXECUTABLE=project-ely
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 ${EXECUTABLE}
rm -f output.log
rm -f cpu.prof
cross_windows:
CGO_ENABLED=1 \
CC=x86_64-w64-mingw32-gcc \
GOOS=windows \
GOARCH=amd64 \
go build -x -v -ldflags "-s -w"
cross_windows_x86:
CGO_ENABLED=1 \
CC=i686-w64-mingw32-gcc \
GOOS=windows \
GOARCH=386 \
go build -x -v -ldflags "-s -w"
goimports_everything:
find . -name "*.go" -exec goimports -w {} \;