feat:complete the compilation task, compile normally

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
pull/407/head
Xinwei Xiong(cubxxw) 2 years ago
parent 3aecfa1a1b
commit 9a39c9256d

@ -111,7 +111,11 @@ go.build.%:
@echo "=====> BIN_DIR=$(BIN_DIR)"
@echo "===========> Building binary $(COMMAND) $(VERSION) for $(OS)_$(ARCH)"
@mkdir -p $(OUTPUT_DIR)/platforms/$(OS)/$(ARCH)
@CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) $(GO) build $(GO_BUILD_FLAGS) -o $(OUTPUT_DIR)/platforms/$(OS)/$(ARCH)/$(COMMAND)$(GO_OUT_EXT) $(ROOT_DIR)/cmd/$(COMMAND)/main.go
@if [ "$(COMMAND)" == "rpc" ] || [ "$(COMMAND)" == "Open-IM-SDK-Core" ]; then \
echo "===========> Compilation is not yet supported $(COMMAND)"; \
else \
CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) $(GO) build $(GO_BUILD_FLAGS) -o $(OUTPUT_DIR)/platforms/$(OS)/$(ARCH)/$(COMMAND)$(GO_OUT_EXT) $(ROOT_DIR)/cmd/$(COMMAND)/main.go; \
fi
## go.multiarch: Build multi-arch binaries
.PHONY: go.build.multiarch
@ -138,7 +142,7 @@ go.lint: tools.verify.golangci-lint
## go.test: Run unit test
.PHONY: go.test
go.test:
@$(GO) test $(GO_BUILD_FLAGS) ./...
@$(GO) test ./...
## go.test.junit-report: Run unit test
.PHONY: go.test.junit-report

@ -151,5 +151,5 @@ image.manifest.push.multiarch.%:
## image.help: Print help for image targets
.PHONY: image.help
image.help: scripts/make-rules/image.mk
image.help: script/make-rules/image.mk
$(call smallhelp)
Loading…
Cancel
Save