stagit

Fork of hiltjo's stagit (see http://codemadness.org/stagit.html)
git clone git://git.vgx.fr/stagit
Log | Files | Refs | README | LICENSE

commit fcb4c841b46a99455401d258c1dd6957f91afbde
parent 814dd5974043204c9e73a59266f3e4724376f194
Author: Léo Villeveygoux <l@vgx.fr>
Date:   Tue, 31 Mar 2020 06:10:24 +0200

add compilation with lowdown support in Makefile

Who said POSIX make has no conditionals?
Run `make USE_LOWDOWN=1` to activate markdown support with liblowdown.

Diffstat:
MMakefile | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -11,10 +11,15 @@ DOCPREFIX = ${PREFIX}/share/doc/${NAME} LIBGIT_INC = -I/usr/local/include LIBGIT_LIB = -L/usr/local/lib -lgit2 +LOWDOWN_LIB = ${USE_LOWDOWN:1=-llowdown -lm} +LOWDOWN_CPP = ${USE_LOWDOWN:1=-DUSE_LOWDOWN} + # use system flags. STAGIT_CFLAGS = ${LIBGIT_INC} ${CFLAGS} -STAGIT_LDFLAGS = ${LIBGIT_LIB} ${LDFLAGS} -STAGIT_CPPFLAGS = -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE +STAGIT_LDFLAGS = ${LIBGIT_LIB} ${LOWDOWN_LIB} ${LDFLAGS} +STAGIT_CPPFLAGS = \ + -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE \ + ${LOWDOWN_CPP} SRC = \ stagit.c\ @@ -34,7 +39,8 @@ DOC = \ README HDR = compat.h -COMPATOBJ = \ +# liblowdown.a contains its own compat.o ... with the same functions as here +COMPATOBJ${USE_LOWDOWN} = \ reallocarray.o\ strlcat.o\ strlcpy.o