Skip to content

Commit

Permalink
makefile: add the capability to build binarys separately (#1570)
Browse files Browse the repository at this point in the history
* makefile: add the capability to build binarys separately
  • Loading branch information
shafreeck authored and nolouch committed Jun 11, 2019
1 parent 8051f7b commit 5cb107e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,23 @@ dev: build check test

ci: build check basic-test

build: export GO111MODULE=on
build:
build: pd-server pd-ctl pd-tso-bench pd-recover
pd-server: export GO111MODULE=on
pd-server:
ifeq ("$(WITH_RACE)", "1")
CGO_ENABLED=1 go build -race -ldflags '$(LDFLAGS)' -o bin/pd-server cmd/pd-server/main.go
else
CGO_ENABLED=0 go build -ldflags '$(LDFLAGS)' -o bin/pd-server cmd/pd-server/main.go
endif

pd-ctl: export GO111MODULE=on
pd-ctl:
CGO_ENABLED=0 go build -ldflags '$(LDFLAGS)' -o bin/pd-ctl tools/pd-ctl/main.go
pd-tso-bench: export GO111MODULE=on
pd-tso-bench:
CGO_ENABLED=0 go build -o bin/pd-tso-bench tools/pd-tso-bench/main.go
pd-recover: export GO111MODULE=on
pd-recover:
CGO_ENABLED=0 go build -o bin/pd-recover tools/pd-recover/main.go

test: retool-setup
Expand Down

0 comments on commit 5cb107e

Please sign in to comment.