-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
50 lines (35 loc) · 1.37 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
44
45
46
47
48
49
50
.PHONY: all clean deps build public-ip internal-ip uptime load-average temperature battery date-time volume install dir copy
all: clean build
clean:
rm -f public-ip internal-ip uptime load-average temperature battery date-time volume
deps:
go get -t ./...
build: public-ip internal-ip uptime load-average temperature battery date-time volume
public-ip:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/public-ip/
internal-ip:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/internal-ip/
uptime:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/uptime/
load-average:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/load-average/
temperature:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/temperature/
battery:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/battery/
date-time:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/date-time/
volume:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' ./cmd/volume/
install: build dir copy
dir:
mkdir -p ~/.config/i3blocks-go
copy:
cp public-ip ~/.config/i3blocks-go/
cp internal-ip ~/.config/i3blocks-go/
cp uptime ~/.config/i3blocks-go/
cp load-average ~/.config/i3blocks-go/
cp temperature ~/.config/i3blocks-go/
cp battery ~/.config/i3blocks-go/
cp date-time ~/.config/i3blocks-go/
cp volume ~/.config/i3blocks-go/