Add makefile
Change-Id: Iece9b64fa8f7ace18520f8e93661b82896056648
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..cac4d7a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+clean:
+ go clean -testcache && rm -r ./bin
+
+buildfoma:
+ cd src && \
+ foma -e "source tokenizer.xfst" \
+ -e "save stack ../testdata/tokenizer.fst" -q -s && \
+ cd ..
+
+buildmatok: buildfoma build
+ ./bin/datok convert -i ./testdata/tokenizer.fst -o ./testdata/tokenizer.matok
+
+builddatok: buildfoma build
+ ./bin/datok convert -i ./testdata/tokenizer.fst -o ./testdata/tokenizer.datok -d
+
+test:
+ go test ./...
+
+build:
+ go build -v -o ./bin/datok ./cmd/datok.go