diff --git a/log_manager/makefile b/log_manager/makefile index 9b0bac75f..227b82753 100644 --- a/log_manager/makefile +++ b/log_manager/makefile @@ -4,6 +4,8 @@ include ../makefile.inc CC = gcc CPP = g++ +SRCS = log_manager.cc + LOG_WRITER_PATH := $(shell pwd) makeall: clean all @@ -14,6 +16,7 @@ clean: - $(DEL) *.so - $(DEL) *.so.1.0.1 - $(DEL) *~ + - $(DEL) depend all: utils lib @@ -39,3 +42,12 @@ liblink: install: liblink install liblog_manager.so.1.0.1 liblog_manager.so $(DEST)/lib + +depend: + @rm -f depend + $(CPP) -M $(CFLAGS) \ + -I$(MARIADB_SRC_PATH)/include/ \ + -I../utils/ -I./ \ + $(SRCS) > depend + +include depend diff --git a/query_classifier/makefile b/query_classifier/makefile index 378047f49..744a778a8 100644 --- a/query_classifier/makefile +++ b/query_classifier/makefile @@ -4,6 +4,8 @@ include ../makefile.inc CC = gcc CPP = g++ +SRCS = query_classifier.cc + QUERY_CLASSIFIER_PATH := $(shell pwd) makeall: clean all @@ -15,6 +17,7 @@ clean: - $(DEL) libquery_classifier.so.1.0.1 - $(DEL) skygw_utils.o - $(DEL) *~ + - $(DEL) depend all: utils lib @@ -45,3 +48,15 @@ liblink: install: liblink install ./libquery_classifier.so.1.0.1 ./libquery_classifier.so $(DEST)/lib + +depend: + @rm -f depend + $(CPP) -M $(CFLAGS) \ + -I$(MARIADB_SRC_PATH)/libmysqld/ \ + -I$(MARIADB_SRC_PATH)/include/ \ + -I$(MARIADB_SRC_PATH)/sql \ + -I$(MARIADB_SRC_PATH)/regex/ \ + -I./ \ + $(SRCS) > depend + +include depend diff --git a/query_classifier/query_classifier.cc b/query_classifier/query_classifier.cc index 984c90a7b..e0245285c 100644 --- a/query_classifier/query_classifier.cc +++ b/query_classifier/query_classifier.cc @@ -100,8 +100,9 @@ skygw_query_type_t skygw_query_classifier_get_type( ss_info_dassert(query != NULL, ("query_str is NULL")); query_str = const_cast(query); - - //fprintf(stderr, " Query \"%s\"\n", query_str); +#if QUERY_DEBUG + fprintf(stderr, " Query \"%s\"\n", query_str); +#endif /** Get server handle */ mysql = mysql_init(NULL);