Browse Source

Build: Makefile

Leonardo Di Donato 8 years ago
parent
commit
35862ab0d7
2 changed files with 17 additions and 1 deletions
  1. 2 1
      .gitignore
  2. 15 0
      makefile

+ 2 - 1
.gitignore

@@ -5,4 +5,5 @@
 
 *.test
 
-*.out
+*.out
+*.txt

+ 15 - 0
makefile

@@ -0,0 +1,15 @@
+SHELL := /bin/bash
+
+machine.go: machine.go.rl
+	ragel -Z -G2 -o $@ $<
+
+.PHONY: build
+build: machine.go
+
+.PHONY: bench
+bench: *_test.go machine.go
+	go test -bench=. -benchmem -benchtime=5s ./...
+
+.PHONY: tests
+tests: *_test.go machine.go
+	go test -race -timeout 10s -coverprofile=coverage.out -covermode=atomic -v ./...