diff options
-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 3843207..b47948e 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 |