# HG changeset patch # User David Demelier # Date 1624173217 -7200 # Node ID 13e374b9c5220211addf7afa2419c9aac45cf73f # Parent a4afc89f6ea8992519a14caa5aaaa7d718ce7b10 make: add DEBUG option diff -r a4afc89f6ea8 -r 13e374b9c522 GNUmakefile --- a/GNUmakefile Sun Jun 20 08:42:22 2021 +0200 +++ b/GNUmakefile Sun Jun 20 09:13:37 2021 +0200 @@ -17,7 +17,7 @@ # CC= cc -CFLAGS= -O0 -DNDEBUG -Wall -Wextra -Wno-cpp -g -fPIC +CFLAGS= -Wall -Wextra -Wno-cpp PREFIX= /usr/local BINDIR= ${PREFIX}/bin @@ -147,6 +147,12 @@ # Compile flags. DEFS= -D_BSD_SOURCE -DLIBBSD_OVERLAY -DTOP=\"`pwd`\" +ifeq (${DEBUG},1) +CFLAGS+= -O0 -g +else +CFLAGS+= -O0 -g +endif + # Include directories. INCS= -I lib/ INCS+= -I ./ diff -r a4afc89f6ea8 -r 13e374b9c522 INSTALL.md --- a/INSTALL.md Sun Jun 20 08:42:22 2021 +0200 +++ b/INSTALL.md Sun Jun 20 09:13:37 2021 +0200 @@ -60,6 +60,8 @@ - `SSL`: set to 1 or 0 to enable/disable OpenSSL (default: 1). - `JS`: set to 1 or 0 to disable Javascript (default: 1). +- `DEBUG`: set to 1 or 0 to build with debug symbols and optimizations disabled + (default: 0). You can tweak the installation directories by changing the following variables (note: all paths must be absolute):