Makefile: DEBUG_TOOLS -> DEBUG and document

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-12-26 16:50:55 +01:00
parent 7861d89b7c
commit ff7e5dfe30
2 changed files with 4 additions and 1 deletions

View file

@ -36,6 +36,7 @@ This command takes into account several environment variables:
* `WITH_BASHCOMPLETION` default: [auto-detect] * `WITH_BASHCOMPLETION` default: [auto-detect]
* `WITH_WGQUICK` default: [auto-detect] * `WITH_WGQUICK` default: [auto-detect]
* `WITH_SYSTEMDUNITS` default: [auto-detect] * `WITH_SYSTEMDUNITS` default: [auto-detect]
* `DEBUG` default:
The first section is rather standard. The second section is not: 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 should set it to `no`. If systemd isn't auto-detected, but you still would
like to install it, set this to `yes`. 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 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 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, you're writing a package for a distro, you'll want to explicitly set these,

View file

@ -43,7 +43,7 @@ CFLAGS += -std=gnu99 -D_GNU_SOURCE
CFLAGS += -Wall -Wextra CFLAGS += -Wall -Wextra
CFLAGS += -MMD -MP CFLAGS += -MMD -MP
CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR)\"" CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR)\""
ifeq ($(DEBUG_TOOLS),y) ifeq ($(DEBUG),yes)
CFLAGS += -g CFLAGS += -g
endif endif
ifeq ($(PLATFORM),linux) ifeq ($(PLATFORM),linux)