mesa/Makefile
Carl Worth fcbbb46886 Add support for the structure of function-like macros.
We accept the structure of arguments in both macro definition and
macro invocation, but we don't yet expand those arguments. This is
just enough code to pass the recently-added tests, but does not yet
provide any sort of useful function-like macro.
2010-05-13 09:36:23 -07:00

25 lines
631 B
Makefile

# 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 xtalloc.o
gcc -o $@ -ltalloc $^
%.c %.h: %.y
bison --debug --defines=$*.h --output=$*.c $^
%.c: %.l
flex --outfile=$@ $<
glcpp-lex.c: glcpp-parse.h
test:
@(cd tests; ./glcpp-test)
clean:
rm -f glcpp-lex.c glcpp-parse.c *.o *~
rm -f tests/*.out tests/*.gcc tests/*.expected tests/*~