This is sort of hacky, but it works! Now (after cleaning), you can recompile
with 'make debug' to enable my debugging features (not Subramanian's).
all: $(BIN)
+debug: CPPFLAGS += -DCONFIG_DEBUG
+debug: all
+
$(BIN): $(USER_O) $(LIB_SO)
$(CXX) -o $(BIN) $(USER_O) -L. -l$(LIB_NAME)
#include <stdio.h>
-//#define CONFIG_DEBUG
+/*
+#ifndef CONFIG_DEBUG
+#define CONFIG_DEBUG
+#endif
+*/
#ifdef CONFIG_DEBUG
#define DEBUG(fmt, ...) do { printf("*** %25s(): line %-4d *** " fmt, __func__, __LINE__, ##__VA_ARGS__); } while (0)