summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorradhitya <alif@radhitya.org>2026-06-13 12:56:42 +0700
committerradhitya <alif@radhitya.org>2026-06-13 12:56:42 +0700
commitd802d4a685016be8b79c89b4f21099b9a1569532 (patch)
tree27cd028c8e60ec0b6bb805fc2fbd2616e0b91bf0 /Makefile
parent01e05e8df5f56d605dfd75456a424527e76a2955 (diff)
license, makefile, readme, ignore
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 ./...