Skip to content

Commit

Permalink
add BUILD_DIR to OS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
yelsaw committed Sep 14, 2024
1 parent 875d544 commit 07c8f83
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ help:
build: clean $(OS_BUILDS) # Builds all binaries to BUILD_DIR/{linux,darwin,windows}

dist: clean $(OS_BUILDS) archive checksum # Builds all binaries, archives with LIC_FILE, and creates sha256sum


linux: # Builds binary and outputs to BUILD_DIR/linux
@GOOS=linux CGO_ENABLED=0 go build -ldflags=$(GO_LDFLAGS) -o build/linux/$(APP)
@GOOS=linux CGO_ENABLED=0 go build -ldflags=$(GO_LDFLAGS) -o $(BUILD_DIR)/linux/$(APP)
@echo "output build/linux/$(APP)"

darwin: # Builds binary and outputs to BUILD_DIR/darwin
@GOOS=darwin go build -ldflags=$(GO_LDFLAGS) -o build/darwin/$(APP)
@GOOS=darwin go build -ldflags=$(GO_LDFLAGS) -o $(BUILD_DIR)/darwin/$(APP)
@echo "output build/darwin/$(APP)"

windows: # Builds binary and outputs to BUILD_DIR/windows
@GOOS=windows go build -ldflags=$(GO_LDFLAGS) -o build/windows/$(APP).exe
@GOOS=windows go build -ldflags=$(GO_LDFLAGS) -o $(BUILD_DIR)/windows/$(APP).exe
@echo "output build/windows/$(APP).exe"

archive: # Create archives for distribution
Expand Down

0 comments on commit 07c8f83

Please sign in to comment.