summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f1f8ac7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+BINARY = sdns
+
+GO = go
+GOMOD = .
+
+.PHONY: default build test lint fmt clean run install fuzz race
+
+default: test lint build
+
+build:
+ $(GO) build -o $(BINARY) $(GOMOD)
+
+test:
+ $(GO) test -race -count=1 ./...
+
+lint:
+ $(GO) vet ./...
+
+fmt:
+ gofmt -w .
+
+clean:
+ rm -f $(BINARY)
+
+run: build
+ ./$(BINARY)
+
+install:
+ $(GO) install $(GOMOD)
+
+fuzz:
+ $(GO) test -fuzz=FuzzBuildResponse -fuzztime=30s ./internal/server/
+
+race:
+ $(GO) test -race -count=1 ./...