YACC=bison
LEX=flex
-CFLAGS=-g -W -Wall -pedantic
+DMALLOC_CFLAGS=
+DMALLOC_LOADLIBES=
+CFLAGS=-g -W -Wall -pedantic $(DMALLOC_CFLAGS)
YFLAGS=--debug --defines
LFLAGS=-8
+LOADLIBES=$(DMALLOC_LOADLIBES)
all: ansel_module gedcom_parse
gedcom.tab.c gedcom.tab.h: gedcom.y gedcom.h
$(YACC) $(YFLAGS) --name-prefix=gedcom_ gedcom.y
+.PHONY: clean
clean:
rm -f core gedcom_parse lexer_* *.o lex.gedcom_* \
gedcom.tab.* gedcom.output
@export GCONV_PATH=./ansel; \
for file in t/*.ged; do \
echo "=== testing $$file"; \
- ./gedcom_parse $$file; \
+ ./gedcom_parse -2 $$file; \
done
+
+testmem: DMALLOC_CFLAGS=-DMALLOC
+testmem: DMALLOC_LOADLIBES=-ldmalloc
+testmem: clean test