bug fixes, treewalk printing of classes/sets
[henge/apc.git] / Makefile
index c1c8ad7..ad90bba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,9 @@
 # Driver sources
 DRIVERS ?= apc testapc
 
+# Debug Level
+DEBUG   ?= 1
+
 # Yacc
 YACC   := bison
 YFLAGS ?= -v -d -Wall
@@ -16,7 +19,7 @@ YCMD   += $(if $2,&& mv $(notdir $(1:%.y=%.tab.[ch])) $(dir $2))
 
 # Ragel
 RLC     ?= ragel
-RLFALGS ?= -C
+RLFLAGS ?= -C
 RLCMD    = $(strip $(RLC) $(RLFLAGS) $(if $2,-o $2 $(dir $2))$1)
 
 # C
@@ -74,7 +77,7 @@ cleanCMD = $(if $(wildcard $1),rm $(wildcard $(sort $1)))
 # Rules
 .SECONDEXPANSION:
 $(ldTRG): $$(call ldDEP,$$@) | $(hGEN) ; $(call LDCMD,$^,$@)
-%-d.o: CFLAGS+= -Og -ggdb
+%-d.o: CFLAGS+= -Og -ggdb -DDEBUG=$(DEBUG)
 %.o %-d.o: %.c $$(call cGENDEP,$$(dir $$@)%.c) ; $(call CCMD,$<,$@)
 %.tab.h: %.tab.c ;
 %.tab.c: %.y $$(call S2S,YCMD,%.y,$$@) ;