X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=Makefile;h=2422c16a5f15c654b95c60760ad55d8962b7686e;hb=cfb11211efa5a21c0f67bf75ed36b173f35c004c;hp=db56b46f1881f83f01b80b212b1b60c0943b38a2;hpb=1bdc4e26cad88658897c2a392a16890905bd7b5c;p=gedcom-parse.git diff --git a/Makefile b/Makefile index db56b46..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,6 +36,7 @@ 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 lexer_* *.o lex.gedcom_* \ gedcom.tab.* gedcom.output @@ -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