Skip to content

Commit

Permalink
build: fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
boris1993 committed Jun 4, 2023
1 parent 38aacc8 commit c85ab3a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ROOT_DIR:=$(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))../)
GO_ENV=CGO_ENABLED=0
GOCMD=go
GOBUILD=$(GOCMD) build
GOTEST=$(GOCMD) test
Expand All @@ -21,19 +20,19 @@ test:
$(GOTEST) $(GOTEST_ARGS) $(ROOT_DIR)/internal/...

windows-amd64:
GOARCH=amd64 GOOS=windows $(GO_ENV) $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-windows-amd64/$(APP_NAME).exe $(ROOT_DIR)/cmd/dnsupdater/main.go
GOARCH=amd64 GOOS=windows CGO_ENABLED=0 $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-windows-amd64/$(APP_NAME).exe $(ROOT_DIR)/cmd/dnsupdater/main.go
cp $(ROOT_DIR)/configs/config.yaml.template $(ROOT_DIR)/bin/$(APP_NAME)-windows-amd64/

darwin-amd64:
GOARCH=amd64 GOOS=darwin $(GO_ENV) $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-darwin-amd64/$(APP_NAME) $(ROOT_DIR)/cmd/dnsupdater/main.go
GOARCH=amd64 GOOS=darwin CGO_ENABLED=0 $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-darwin-amd64/$(APP_NAME) $(ROOT_DIR)/cmd/dnsupdater/main.go
cp $(ROOT_DIR)/configs/config.yaml.template $(ROOT_DIR)/bin/$(APP_NAME)-darwin-amd64/

linux-amd64:
GOARCH=amd64 GOOS=linux $(GO_ENV) $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-linux-amd64/$(APP_NAME) $(ROOT_DIR)/cmd/dnsupdater/main.go
GOARCH=amd64 GOOS=linux CGO_ENABLED=0 $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-linux-amd64/$(APP_NAME) $(ROOT_DIR)/cmd/dnsupdater/main.go
cp $(ROOT_DIR)/configs/config.yaml.template $(ROOT_DIR)/bin/$(APP_NAME)-linux-amd64/

mips-softfloat:
GOARCH=mips GOOS=linux GOMIPS=softfloat $(GO_ENV) $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-linux-mips-softfloat/$(APP_NAME) $(ROOT_DIR)/cmd/dnsupdater/main.go
GOARCH=mips GOOS=linux GOMIPS=softfloat CGO_ENABLED=0 $(GOBUILD) $(BUILD_ARGS) -o $(ROOT_DIR)/bin/$(APP_NAME)-linux-mips-softfloat/$(APP_NAME) $(ROOT_DIR)/cmd/dnsupdater/main.go
cp $(ROOT_DIR)/configs/config.yaml.template $(ROOT_DIR)/bin/$(APP_NAME)-linux-mips-softfloat/

.PHONY: clean
Expand Down

0 comments on commit c85ab3a

Please sign in to comment.