-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
26 lines (20 loc) · 804 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
all: carbonserver-collector flamegraph-server
VERSION ?= $(shell git describe --abbrev=4 --dirty --always --tags)
GO ?= go
carbonserver-collector: dep
$(MAKE) VERSION=$(VERSION) GO=$(GO) -C cmd/carbonserver-collector
flamegraph-server: dep
$(MAKE) VERSION=$(VERSION) GO=$(GO) -C cmd/flamegraph-server
dep:
@which dep 2>/dev/null || $(GO) get github.com/golang/dep/cmd/dep
dep ensure
install:
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/usr/share/ch-flamegraphs/
cp cmd/flamegraph-server/flamegraph-server $(DESTDIR)/usr/bin/
cp cmd/carbonserver-collector/carbonserver-collector $(DESTDIR)/usr/bin/
cp config.example.yaml $(DESTDIR)/usr/share/ch-flamegraphs/
clean:
rm -rf vendor
rm -f cmd/carbonserver-collector/carbonserver-collector
rm -f cmd/flamegraph-server/flamegraph-server