|
@@ -83,7 +83,13 @@ ifndef PERF_DEBUG
|
|
|
CFLAGS_OPTIMIZE = -O6
|
|
|
endif
|
|
|
|
|
|
-CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
|
|
|
+ifdef PARSER_DEBUG
|
|
|
+ PARSER_DEBUG_BISON := -t
|
|
|
+ PARSER_DEBUG_FLEX := -d
|
|
|
+ PARSER_DEBUG_CFLAGS := -DPARSER_DEBUG
|
|
|
+endif
|
|
|
+
|
|
|
+CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) $(PARSER_DEBUG_CFLAGS)
|
|
|
EXTLIBS = -lpthread -lrt -lelf -lm
|
|
|
ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
|
|
|
ALL_LDFLAGS = $(LDFLAGS)
|
|
@@ -216,10 +222,10 @@ FLEX = flex
|
|
|
BISON= bison
|
|
|
|
|
|
$(OUTPUT)util/parse-events-flex.c: util/parse-events.l
|
|
|
- $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
|
|
|
+ $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
|
|
|
|
|
|
$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
|
|
|
- $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
|
|
|
+ $(QUIET_BISON)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $(OUTPUT)util/parse-events-bison.c
|
|
|
|
|
|
$(OUTPUT)util/pmu-flex.c: util/pmu.l
|
|
|
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c
|