From f06bbf74c59120bb53be4b7c15b5fad681d48edc Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Fri, 13 Oct 2017 10:46:45 -0700 Subject: [PATCH] Separated TRACE and DEBUG conditions in makefile --- Makefile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index dd62dc6..e9bbfd8 100644 --- a/Makefile +++ b/Makefile @@ -132,19 +132,32 @@ LIBZT_INCLUDES+=-Iinclude \ STRIP=strip +# ZeroTier debug and tracing ifeq ($(ZT_DEBUG),1) - ZT_DEFS+=-DZT_TRACE - CFLAGS+=-Wall -g -pthread + CFLAGS?=-Wall -g -pthread STRIP=echo else CFLAGS?=-Ofast -fstack-protector - CFLAGS+=-Wall -fPIE -fvisibility=hidden -pthread + CFLAGS?=-Wall -fPIE -fvisibility=hidden -pthread endif + +ifeq ($(ZT_TRACE),1) + ZT_DEFS+=-DZT_TRACE +endif + +# libzt debuf and tracing ifeq ($(LIBZT_DEBUG),1) - CFLAGS+=-Wall -g -pthread - LIBZT_DEFS+=-DLIBZT_DEBUG + CFLAGS?=-Wall -g -pthread STRIP=echo +else + CFLAGS?=-Ofast -fstack-protector + CFLAGS?=-Wall -fPIE -fvisibility=hidden -pthread endif + +ifeq ($(LIBZT_TRACE),1) + LIBZT_DEFS+=-DLIBZT_DEBUG +endif + ifeq ($(NS_DEBUG),1) CFLAGS+=-Wall -g STRIP=echo