summaryrefslogtreecommitdiff
path: root/internal/files/bin/Makefile
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2016-07-30 17:01:07 -0400
committerKurt <kurt.w.jung@gmail.com>2016-07-30 17:01:07 -0400
commitadcaebf957268ca694a22b1d8002e901ce915549 (patch)
treec8168ca551b7f07b9c2958baaccd9983896fe81b /internal/files/bin/Makefile
parent915906ba1ac3db38aee1818e4579589169a5bd68 (diff)
Makefile for generating embedded calligra font file
Diffstat (limited to 'internal/files/bin/Makefile')
-rw-r--r--internal/files/bin/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/files/bin/Makefile b/internal/files/bin/Makefile
new file mode 100644
index 0000000..64b9a77
--- /dev/null
+++ b/internal/files/bin/Makefile
@@ -0,0 +1,22 @@
+TRG= ../files.go
+JSON= ../../../font/calligra.json
+Z= ../../../font/calligra.z
+
+${TRG} : ${JSON} ${Z} ./bin
+ echo "package files" > ${TRG}
+ echo "" >> ${TRG}
+ echo "var CalligraJson = []byte{" >> ${TRG}
+ ./bin < ${JSON} >> ${TRG}
+ echo "}" >> ${TRG}
+ echo "" >> ${TRG}
+ echo "var CalligraZ = []byte{" >> ${TRG}
+ ./bin < ${Z} >> ${TRG}
+ echo "}" >> ${TRG}
+ gofmt -w ${TRG}
+
+./bin : bin.go
+ go build -v
+
+clean :
+ rm -f ./bin ${TRG}
+