summaryrefslogtreecommitdiff
path: root/icon/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'icon/Makefile')
-rw-r--r--icon/Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/icon/Makefile b/icon/Makefile
index 07dcd3c..445fee4 100644
--- a/icon/Makefile
+++ b/icon/Makefile
@@ -1,13 +1,25 @@
.PHONY: all clean
-all: 18_on_unix.go 18_off_unix.go 18_blocked_unix.go 18_wait_0_unix.go 18_wait_1_unix.go 18_wait_2_unix.go 18_wait_3_unix.go
+unix := on_unix.go off_unix.go blocked_unix.go wait_0_unix.go wait_1_unix.go wait_2_unix.go wait_3_unix.go
-go_array_name = "$(shell echo $(@) | sed -e 's/18_\(.*\)_unix\.go/\u\1/' -e 's/_//')"
+darwin := on_darwin.go off_darwin.go blocked_darwin.go wait_0_darwin.go wait_1_darwin.go wait_2_darwin.go wait_3_darwin.go
-18_%_unix.go: png/18/vpn_%.png
- echo "//+build linux darwin" > $@
+all: $(unix) $(darwin)
+
+go_array_name = "$(shell echo $(<) | sed -e 's/.*vpn_\(.*\)\.png/\u\1/' -e 's/_//')"
+
+%_unix.go: png/white/vpn_%.png
+ echo "//+build linux" > $@
+ echo "// white icon"
+ echo "" >> $@
+ cat $< | 2goarray $(go_array_name) icon >> $@
+
+%_darwin.go: png/black/vpn_%.png
+ echo "//+build darwin" > $@
+ echo "// black icon"
echo "" >> $@
cat $< | 2goarray $(go_array_name) icon >> $@
clean:
rm *_unix.go
+ rm *_darwin.go