X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=Makefile;h=2422c16a5f15c654b95c60760ad55d8962b7686e;hb=5c7332321f644ed5a0ede27a32f61586824a8a12;hp=ac01d3922d0932afd3f0313f88ed93d8859dcd86;hpb=479f49e5a0cfe09f8600c6c6cacd3a0fb86ffe2d;p=gedcom-parse.git diff --git a/Makefile b/Makefile index ac01d39..2422c16 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,12 @@ 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 @@ -33,8 +36,9 @@ lex.gedcom_lohi_.c: gedcom_lohi.lex gedcom.tab.h gedcom.h multilex.h \ 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 test_* *.o lex.gedcom_* \ + rm -f core gedcom_parse lexer_* *.o lex.gedcom_* \ gedcom.tab.* gedcom.output cd ansel && $(MAKE) clean @@ -73,5 +77,9 @@ test: all @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