blob: 345423218b2049931b92bb6d680fc973b41696b7 (
plain)
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
|
.PHONY: all get build standalone icon locales generate_locales clean
TAGS ?= gtk_3_18
all: icon locales get build
get:
go get -tags $(TAGS) . ./standalone
build:
go build -tags $(TAGS) -ldflags "-X main.version=`git describe --tags`"
test:
go test -tags $(TAGS) ./...
standalone:
go build -tags "$(TAGS) standalone" -ldflags "-X main.version=`git describe --tags`"
build_win:
go build -tags "standalone" -ldflags "-H windowsgui"
clean:
make -C icon clean
rm bitmask-systray
icon:
make -C icon
get_deps:
sudo apt install libgtk-3-dev libappindicator3-dev golang pkg-config
LANGS ?= $(foreach path,$(wildcard locales/*/messages.gotext.json),$(patsubst locales/%/messages.gotext.json,%,$(path)))
empty :=
space := $(empty) $(empty)
lang_list := $(subst $(space),,$(foreach lang,$(LANGS),$(lang),))
locales: catalog.go
generate_locales: $(foreach lang,$(LANGS),locales/$(lang)/out.gotext.json)
locales/%/out.gotext.json: systray.go notificator.go
gotext update -lang=$*
catalog.go: $(foreach lang,$(LANGS),locales/$(lang)/messages.gotext.json)
gotext update -lang=$(lang_list) -out catalog.go
|