Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
lidezhu committed Nov 13, 2023
1 parent 1c6bb42 commit ed3c3ed
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Makefile for tiflow
.PHONY: build test check clean fmt cdc cdc_fips kafka_consumer storage_consumer coverage \
.PHONY: build test check clean fmt cdc kafka_consumer storage_consumer coverage \
integration_test_build integration_test integration_test_mysql integration_test_kafka bank \
kafka_docker_integration_test kafka_docker_integration_test_with_build \
clean_integration_test_containers \
Expand Down Expand Up @@ -58,8 +58,13 @@ else ifeq (${OS}, "darwin")
CGO := 1
endif

GOBUILD := CGO_ENABLED=$(CGO) $(GO) build $(BUILD_FLAG) -trimpath $(GOVENDORFLAG)
GOBUILDFIPS := CGO_ENABLED=1 GOEXPERIMENT=boringcrypto $(GO) build -tags boringcrypto $(BUILD_FLAG) -trimpath $(GOVENDORFLAG)
BUILD_FLAG =
GOEXPERIMENT=
ifeq ("${ENABLE_FIPS}", "1")
BUILD_FLAG = -tags boringcrypto
GOEXPERIMENT = GOEXPERIMENT=boringcrypto
endif
GOBUILD := $(GOEXPERIMENT) CGO_ENABLED=$(CGO) $(GO) build $(BUILD_FLAG) -trimpath $(GOVENDORFLAG)
GOBUILDNOVENDOR := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -trimpath
GOTEST := CGO_ENABLED=1 $(GO) test -p $(P) --race --tags=intest
GOTESTNORACE := CGO_ENABLED=1 $(GO) test -p $(P)
Expand Down Expand Up @@ -156,10 +161,7 @@ build-cdc-with-failpoint: ## Build cdc with failpoint enabled.
$(FAILPOINT_DISABLE)

cdc:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/cdc ./cmd/cdc/main.go

cdc_fips:
$(GOBUILDFIPS) -ldflags '$(LDFLAGS)' -o bin/cdc ./cmd/cdc
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/cdc ./cmd/cdc

kafka_consumer:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/cdc_kafka_consumer ./cmd/kafka-consumer/main.go
Expand Down

0 comments on commit ed3c3ed

Please sign in to comment.