refactor(Makefile): use undercase for toggle flags, add static_debug flag
@@ -87,6 +87,10 @@ LIBORCA := $(LIBDISCORD) $(LIBGITHUB) $(LIBREDDIT)
LIBS_CFLAGS += $(LIBORCA_CFLAGS) -I./mujs -I./sqlite3
LIBS_LDFLAGS += -L./$(LIBDIR) $(LIBORCA_LDFLAGS) -lpthread
+CFLAGS += -Wall -std=c11 -O0 -g \
+ -Wno-unused-function \
+ -I. -I./cee-utils -I./common -I./common/third-party -DLOG_USE_COLOR
+
ifeq ($(BEARSSL),1)
LIBS_LDFLAGS += -lbearssl -static
CFLAGS += -DBEARSSL
@@ -101,16 +105,15 @@ else
CFLAGS += -Wno-unused-but-set-variable
endif
-CFLAGS += -Wall -std=c11 -O0 -g \
- -Wno-unused-function \
- -I. -I./cee-utils -I./common -I./common/third-party -DLOG_USE_COLOR
-ifneq ($(release),1)
+ifeq ($(static_debug),1)
CFLAGS += -D_STATIC_DEBUG
-endif
-ifeq ($(DEBUG_JSON),1)
+else ifeq ($(static_debug),2)
CFLAGS += -D_STRICT_STATIC_DEBUG
+else ifeq ($(static_debug),3)
+ CFLAGS += -D_STATIC_DEBUG -D_STRICT_STATIC_DEBUG
endif
-ifeq ($(ADDONS),1)
+
+ifeq ($(addons),1)
# prepare addon flags
ADDONS_SRC := $(wildcard add-ons/*.c)
ADDONS_OBJS := $(ADDONS_SRC:%=$(OBJDIR)/%.o)
@@ -141,8 +144,6 @@ else
endif
-
-
.PHONY : install clean purge mujs
.ONESHELL:
