From ff7e5dfe30bcb2e49da56aac7566a435fbb09c52 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 26 Dec 2019 16:50:55 +0100 Subject: [PATCH] Makefile: DEBUG_TOOLS -> DEBUG and document Signed-off-by: Jason A. Donenfeld --- README.md | 3 +++ src/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index db5a4d5..be66e21 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ This command takes into account several environment variables: * `WITH_BASHCOMPLETION` default: [auto-detect] * `WITH_WGQUICK` default: [auto-detect] * `WITH_SYSTEMDUNITS` default: [auto-detect] + * `DEBUG` default: The first section is rather standard. The second section is not: @@ -61,6 +62,8 @@ The first section is rather standard. The second section is not: should set it to `no`. If systemd isn't auto-detected, but you still would like to install it, set this to `yes`. + * `DEBUG` decides whether to build with `-g`, when set to `yes`. + If you're a simple `make && make install` kind of user, you can get away with not setting these variables and relying on the auto-detection. However, if you're writing a package for a distro, you'll want to explicitly set these, diff --git a/src/Makefile b/src/Makefile index f8eaebf..de1a16c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,7 +43,7 @@ CFLAGS += -std=gnu99 -D_GNU_SOURCE CFLAGS += -Wall -Wextra CFLAGS += -MMD -MP CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR)\"" -ifeq ($(DEBUG_TOOLS),y) +ifeq ($(DEBUG),yes) CFLAGS += -g endif ifeq ($(PLATFORM),linux)