|
|
@ -12,6 +12,9 @@ build = CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -ldflags "-extldflags -stat |
|
|
|
tar = cd build && tar -cvzf $(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3) |
|
|
|
zip = cd build && zip $(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3) |
|
|
|
|
|
|
|
build_large = CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -tags 5BytesOffset -ldflags "-extldflags -static" -o build/$(appname)$(3) $(SOURCE_DIR) |
|
|
|
tar_large = cd build && tar -cvzf $(1)_$(2)_large_disk.tar.gz $(appname)$(3) && rm $(appname)$(3) |
|
|
|
zip_large = cd build && zip $(1)_$(2)_large_disk.zip $(appname)$(3) && rm $(appname)$(3) |
|
|
|
|
|
|
|
all: build |
|
|
|
|
|
|
@ -32,9 +35,21 @@ linux: deps |
|
|
|
mkdir -p linux |
|
|
|
GOOS=linux GOARCH=amd64 go build $(GO_FLAGS) -o linux/$(BINARY) $(SOURCE_DIR) |
|
|
|
|
|
|
|
release: deps windows_build darwin_build linux_build bsd_build |
|
|
|
release: deps windows_build darwin_build linux_build bsd_build 5_byte_linux_build 5_byte_darwin_build 5_byte_windows_build |
|
|
|
|
|
|
|
##### LINUX BUILDS #####
|
|
|
|
5_byte_linux_build: |
|
|
|
$(call build_large,linux,amd64,) |
|
|
|
$(call tar_large,linux,amd64) |
|
|
|
|
|
|
|
5_byte_darwin_build: |
|
|
|
$(call build_large,darwin,amd64,) |
|
|
|
$(call tar_large,darwin,amd64) |
|
|
|
|
|
|
|
5_byte_windows_build: |
|
|
|
$(call build_large,windows,amd64,.exe) |
|
|
|
$(call zip_large,windows,amd64,.exe) |
|
|
|
|
|
|
|
linux_build: build/linux_arm.tar.gz build/linux_arm64.tar.gz build/linux_386.tar.gz build/linux_amd64.tar.gz |
|
|
|
|
|
|
|
build/linux_386.tar.gz: $(sources) |
|
|
|