From f0eb1790bfd61c37e1e1fab8651410d4264841f3 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sun, 17 Mar 2024 05:41:50 +0100 Subject: [PATCH] Compile with options (release mode). --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3e566bb..1612158 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ endif # No idea why, but I need that to run applications. Ignore that. #LD_P ?= LD_PRELOAD=/usr/local/lib/libipc.so.0 +OPTS ?= + Q ?= @ SHOULD_UPDATE = ./bin/should-update @@ -21,12 +23,12 @@ SHOULD_UPDATE = ./bin/should-update DOMAIN ?= example.com build-write-zone-file: tools/write-zone-file.cr - $(Q)-([ ! -f bin/write-zone-file ] || [ tools/write-zone-file.cr -nt bin/write-zone-file ]) && shards build write-zone-file + $(Q)-([ ! -f bin/write-zone-file ] || [ tools/write-zone-file.cr -nt bin/write-zone-file ]) && shards build write-zone-file $(OPTS) zone-file: build-write-zone-file $(Q)./bin/write-zone-file $(DOMAIN) build-write-template-zone-file: tools/write-template-zone-file.cr - $(Q)-([ ! -f bin/write-template-zone-file ] || [ tools/write-template-zone-file.cr -nt bin/write-template-zone-file ]) && shards build write-template-zone-file + $(Q)-([ ! -f bin/write-template-zone-file ] || [ tools/write-template-zone-file.cr -nt bin/write-template-zone-file ]) && shards build write-template-zone-file $(OPTS) zone-basic-template-file: build-write-template-zone-file $(Q)./bin/write-template-zone-file $(DOMAIN) @@ -76,13 +78,13 @@ run-token-handler: $(Q)$(LD_P) ./bin/token-handler $(PORT) $(ADDR) build-server: - $(Q)-$(SHOULD_UPDATE) bin/dnsmanagerd && shards build dnsmanagerd + $(Q)-$(SHOULD_UPDATE) bin/dnsmanagerd && shards build dnsmanagerd $(OPTS) build-client: - $(Q)-$(SHOULD_UPDATE) bin/dnsmanager-client && shards build dnsmanager-client + $(Q)-$(SHOULD_UPDATE) bin/dnsmanager-client && shards build dnsmanager-client $(OPTS) build-token-handler: - $(Q)shards build token-handler + $(Q)shards build token-handler $(OPTS) build: build-server build-client build-token-handler