From: Brian Norris Date: Sat, 26 May 2012 01:35:27 +0000 (-0700) Subject: Makefile: add 'make debug' X-Git-Tag: pldi2013~392^2~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=70c3b7833efcbe08999f135201119f107259026a Makefile: add 'make debug' 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). --- diff --git a/Makefile b/Makefile index ef89c5a..de9051c 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,9 @@ LDFLAGS=-ldl -lrt all: $(BIN) +debug: CPPFLAGS += -DCONFIG_DEBUG +debug: all + $(BIN): $(USER_O) $(LIB_SO) $(CXX) -o $(BIN) $(USER_O) -L. -l$(LIB_NAME) diff --git a/common.h b/common.h index cd6b16a..656ea37 100644 --- a/common.h +++ b/common.h @@ -3,7 +3,11 @@ #include -//#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)