]> git.refcnt.org Git - colorize.git/commitdiff
Allow for debug flag to be passed to make
authorSteven Schubiger <stsc@refcnt.org>
Sun, 11 Jan 2015 21:43:11 +0000 (22:43 +0100)
committerSteven Schubiger <stsc@refcnt.org>
Sun, 11 Jan 2015 21:43:11 +0000 (22:43 +0100)
Makefile
README

index d061794949a381d71485b18fca6146515a879201..78602380f04b35efea60675976677ab762bcc763 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,10 +6,11 @@
 SHELL=/bin/sh
 CC=gcc
 CFLAGS=-ansi -pedantic
+FLAGS= # command-line macro
 
 colorize:      colorize.c
                        perl ./version.pl > version.h
-                       $(CC) $(CFLAGS) -o colorize colorize.c -DCFLAGS="$(CFLAGS)" -DHAVE_VERSION
+                       $(CC) $(CFLAGS) -o colorize colorize.c -DCFLAGS="$(CFLAGS)" -DHAVE_VERSION $(FLAGS)
 
 check:
                        perl ./test.pl
diff --git a/README b/README
index 12656376935b5867e49b79c1176fb1db233d5ff6..159291eb96b63f2607797b42b90265e88310a7be 100644 (file)
--- a/README
+++ b/README
@@ -32,6 +32,11 @@ currently no make targets to install it as such.
 
 Finally, remove it through `make clean'.
 
+For the sake of completeness, colorize can be also built with
+debugging output by issuing `make FLAGS=-DDEBUG'.  The intention
+is to provide some memory allocation diagnostics (and might be
+extended in future).  Usually, a debugging build is not required.
+
 Documentation
 -------------
 See man page source file: colorize.1.