aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--log.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 77dbef4..8e0ed77 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,8 @@ CXX_OBJS:=$(CXX_SRCS:.cc=.o)
CXX_TEST_OBJS:=$(CXX_TEST_SRCS:.cc=.o)
CXX_ALL_OBJS:=$(CXX_SRCS:.cc=.o) $(CXX_TEST_SRCS:.cc=.o)
CXX_TEST_EXES:=$(CXX_TEST_OBJS:.o=)
-CXXFLAGS:=-g -W -Wall -MMD # -O
+CXXFLAGS:=-g -W -Wall -MMD
+CXXFLAGS+=-O -DNOLOG
all: kati para ckati $(CXX_TEST_EXES)
diff --git a/log.h b/log.h
index bc1cf1e..ee16a21 100644
--- a/log.h
+++ b/log.h
@@ -22,9 +22,13 @@
#include "stringprintf.h"
+#ifdef NOLOG
+#define LOG(args...)
+#else
#define LOG(args...) do { \
fprintf(stderr, "*kati*: %s\n", StringPrintf(args).c_str()); \
} while(0)
+#endif
#define PERROR(...) do { \
fprintf(stderr, "%s: %s\n", StringPrintf(__VA_ARGS__).c_str(), \