17 lines
446 B
Makefile
17 lines
446 B
Makefile
#set variables
|
|
GIT_COMMIT := $(shell git rev-list -1 HEAD)
|
|
ifeq ($(PREFIX),) # PREFIX is environment variable, but if it is not set, then set default value
|
|
PREFIX := /usr/local
|
|
endif
|
|
|
|
all: client client2
|
|
|
|
client: $(wildcard src/client/*.go)
|
|
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)" ./src/client
|
|
client2: $(wildcard src/client2/*.go)
|
|
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)" ./src/client2
|
|
|
|
clean:
|
|
rm -f client client2
|
|
|