-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
28 lines (22 loc) · 870 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
27
28
NAME := prom-journald-exporter
MAINTAINER := Mike Sgarbossa <[email protected]>
DESCRIPTION := Service for exporting metrics derived from journald to Prometheus
LICENSE := MIT
VERSION := $(shell cat VERSION)
OUT := out
clean:
rm -rf $(OUT)
build_amd64:
mkdir -p $(OUT)
GOARCH=amd64 GOOS=linux go build -v -o '$(OUT)/$(NAME)'
tar -C $(OUT) -zcf $(OUT)/$(NAME)-$(VERSION)-linux-amd64.tar.gz $(NAME)
rm $(OUT)/$(NAME)
build_arm64:
CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc GOARCH=arm64 GOOS=linux go build -v -o '$(OUT)/$(NAME)'
tar -C $(OUT) -zcf $(OUT)/$(NAME)-$(VERSION)-linux-arm64.tar.gz $(NAME)
rm $(OUT)/$(NAME)
build_arm:
CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc GOARCH=arm GOOS=linux go build -v -o '$(OUT)/$(NAME)'
tar -C $(OUT) -zcf $(OUT)/$(NAME)-$(VERSION)-linux-arm.tar.gz $(NAME)
rm $(OUT)/$(NAME)
all: clean build_amd64 build_arm64 build_arm