1 .PHONY
: check check_valgrind
install clean release
8 CFLAGS
:=-ansi
-pedantic
$(CFLAGS
)
9 FLAGS
= # command-line macro
12 perl .
/version.pl
> version.h
13 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(LDFLAGS
) -o colorize colorize.c \
14 -DCPPFLAGS
="\"$(CPPFLAGS)\"" -DCFLAGS
="\"$(CFLAGS)\"" -DLDFLAGS
="\"$(LDFLAGS)\"" \
15 -DHAVE_VERSION
$(FLAGS
)
18 perl .
/test.pl
--regular
21 @which valgrind
>/dev
/null
2>&1 ||
(printf
'%s\n' "valgrind not found" && exit
1)
22 perl .
/test.pl
--valgrind || exit
0
25 test ! -d
$(DESTDIR
)/usr
/bin
&& mkdir
-p
$(DESTDIR
)/usr
/bin || exit
0
26 cp colorize
$(DESTDIR
)/usr
/bin
29 rm -f a.out colorize debug.txt version.h