diff options
author | Ian Moffett <ian@osmora.org> | 2025-03-28 02:02:54 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-03-28 02:02:54 -0400 |
commit | 044b7e633b5a0a60e78325206fa289ea6ae81033 (patch) | |
tree | 9a1f82e3b93aa345a2eed9098cc524c52b62a7ca | |
parent | ed33f4e1c82fb2c21e0b60f457d1e3404be34980 (diff) |
build: Add DIAG=[yes/no] build parameterp2p
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | lib/libostp/session.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,7 +1,12 @@ +DIAG=yes CFILES_OTLIB = $(shell find lib/ -name "*.c") CFLAGS_OTLIB = -pedantic -Ilib/include/ -fPIC OTLIB_OBJ = $(CFILES_OTLIB:.c=.o) +ifeq ($(DIAG),yes) +CFLAGS_OTLIB += -D_DIAGNOSTIC +endif + libostp.so: $(OTLIB_OBJ) $(CC) -shared -o $@ $(OTLIB_OBJ) diff --git a/lib/libostp/session.c b/lib/libostp/session.c index b61600f..8f59568 100644 --- a/lib/libostp/session.c +++ b/lib/libostp/session.c @@ -42,7 +42,7 @@ #include <string.h> #include <unistd.h> -#if DIAGNOSTIC +#ifdef _DIAGNOSTIC #define LOG(fmt, ...) printf(fmt, ##__VA_ARGS__) #else #define LOG(...) (void)0 |