From b7359e1d45f505171356bcae3c7d5e2341ecc859 Mon Sep 17 00:00:00 2001 From: radhitya Date: Sun, 21 Jun 2026 09:48:42 +0700 Subject: forward mode, cache opt, ACL, rate limit, admin/health, systemd, fix UDP reply --- Makefile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index daaf3bf..a27b1d7 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,12 @@ GO = go MAIN = . OUTPUT = build/$(BINARY) LDFLAGS = -ldflags="-s -w -X main.version=$(VERSION)" +DESTDIR ?= +BINDIR ?= /usr/bin +SYSTEMD_DIR ?= /usr/lib/systemd/system -.PHONY: default build test lint fmt clean run install fuzz race \ - build-linux +.PHONY: default build test lint fmt clean run install install-service install-config fuzz race \ + build-linux build-darwin build-arm default: test lint build @@ -28,8 +31,17 @@ clean: run: build ./$(OUTPUT) -install: - $(GO) install $(LDFLAGS) $(MAIN) +install: build + install -d $(DESTDIR)$(BINDIR) + install -m 0755 $(OUTPUT) $(DESTDIR)$(BINDIR)/$(BINARY) + +install-service: install + install -d $(DESTDIR)$(SYSTEMD_DIR) + install -m 0644 etc/linum.service $(DESTDIR)$(SYSTEMD_DIR)/linum.service + +install-config: + install -d $(DESTDIR)/etc/linum + install -m 0644 linum.toml $(DESTDIR)/etc/linum/linum.toml fuzz: $(GO) test -fuzz=FuzzBuildResponse -fuzztime=30s ./internal/server/ -- cgit v1.2.3