summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-12 12:17:10 -0700
committerCarl Worth <cworth@cworth.org>2010-05-12 12:25:34 -0700
commit33cc400714f379ef13e876b4aedd0de8cb5d033d (patch)
treeeb0fcb9c900079aebdab63af41d001af56e9736d /Makefile
parentdf2ab5b99237ab0b6760226554b133a5ccd11579 (diff)
Fix defines involving both literals and other defined macros.
We now store a list of tokens in our hash-table rather than a single string. This lets us replace each macro in the value as necessary. This code adds a link dependency on talloc which does exactly what we want in terms of memory management for a parser. The 3 tests added in the previous commit now pass.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 38cc1f314a..83519328bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,13 @@
+# Debug symbols by default, but let the user avoid that with something
+# like "make CFLAGS=-O2"
+CFLAGS = -g
+
+# But we use 'override' here so that "make CFLAGS=-O2" will still have
+# all the warnings enabled.
override CFLAGS += -Wall -Wextra -Wwrite-strings -Wswitch-enum -Wno-unused
glcpp: glcpp.o glcpp-lex.o glcpp-parse.o hash_table.o
+ gcc -o $@ -ltalloc $^
%.c %.h: %.y
bison --debug --defines=$*.h --output=$*.c $^