-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile
43 lines (34 loc) · 1.33 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ARCH := "`uname -s`"
LINUX := "linux"
MAC := "Darwin"
TARGET_OS ?= $(shell go env GOOS)
TARGET_ARCH ?= $(shell go env GOARCH)
export CGO_ENABLED = 0
all:
@if [ $(ARCH) = $(LINUX) ]; \
then \
echo "make in $(LINUX) platform"; \
GOOS=linux go build -o ./cmd/monitoring ./cmd/main.go; \
elif [ $(ARCH) = $(MAC) ]; \
then \
echo "make in $(MAC) platform"; \
GOOS=darwin go build -o monitoring ./cmd/main.go; \
else \
echo "ARCH unknown"; \
fi
GOOS=linux go build -o ./reload/build/linux/reload ./reload/main.go; \
GOOS=darwin go build -o ./reload/build/macos/reload ./reload/main.go; \
pull-monitoring:
go build -o pull-monitoring cmd/monitoring.go
output/dashboards: pull-monitoring
bash scripts/prepare_dashboards.sh
# prometheus binaries(without ng-monitoring) and rules.
output/prometheus:
TARGET_OS=$(TARGET_OS) TARGET_ARCH=$(TARGET_ARCH) bash scripts/prepare_prometheus.sh
output/grafana-$(TARGET_OS)-$(TARGET_ARCH).tar.gz : output/dashboards
TARGET_OS=$(TARGET_OS) TARGET_ARCH=$(TARGET_ARCH) bash scripts/build_tiup_grafana.sh
# same as output/grafana-$(TARGET_OS)-$(TARGET_ARCH).tar.gz, but without pull
grafana_without_pull:
NOPULL=1 bash scripts/prepare_dashboards.sh
TARGET_OS=$(TARGET_OS) TARGET_ARCH=$(TARGET_ARCH) bash scripts/build_tiup_grafana.sh
.PHONY: grafana_without_pull output/prometheus