croptool

Image cropping tool
git clone git://lumidify.org/croptool.git (fast, but not encrypted)
git clone https://lumidify.org/git/croptool.git (encrypted, but very slow)
Log | Files | Refs | README | LICENSE

commit cddaf1fa451de53f5de300768988db96c48cb500
parent 6ac1850fa404420f18bcea62c5cefcfd7d575a1a
Author: lumidify <nobody@lumidify.org>
Date:   Tue, 21 Sep 2021 16:12:01 +0200

Make Makefile more POSIX-compatible (I think?)

Diffstat:
MMakefile | 16++++++++--------
MREADME | 2+-
Mcroptool.1 | 1+
Mcroptool.c | 2+-
4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -11,22 +11,22 @@ SRC = ${BIN:=.c} MAN1 = ${BIN:=.1} MISCFILES = Makefile README CHANGELOG LICENSE TODO -CFLAGS += -D_POSIX_C_SOURCE=200809L `pkg-config --cflags x11` `imlib2-config --cflags` -LDFLAGS += `pkg-config --libs x11` `imlib2-config --libs` -lm - # Configuration options: # comment to disable double buffering -CFLAGS += `pkg-config --cflags xext` -LDFLAGS += `pkg-config --libs xext` - +DB_CFLAGS = `pkg-config --cflags xext` +DB_LDFLAGS = `pkg-config --libs xext` # uncomment to disable double buffering -#CFLAGS += -DNODB +#DB_CFLAGS = -DNODB +#DB_LDFLAGS = + +CROP_CFLAGS = ${CFLAGS} ${DB_CFLAGS} -D_POSIX_C_SOURCE=200809L `pkg-config --cflags x11` `imlib2-config --cflags` +CROP_LDFLAGS = ${CFLAGS} ${DB_LDFLAGS} `pkg-config --libs x11` `imlib2-config --libs` -lm all: ${BIN} .c: - ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $< + ${CC} ${CROP_CFLAGS} ${CROP_LDFLAGS} -o $@ $< install: all mkdir -p "${DESTDIR}${PREFIX}/bin" diff --git a/README b/README @@ -8,4 +8,4 @@ on images and print out a command to crop each image. See Makefile for compile-time options. -See croptool.1 for usage information. +See croptool.1 and croptool_crop.1 for usage information. diff --git a/croptool.1 b/croptool.1 @@ -12,6 +12,7 @@ .Op Ar -c padding .Op Ar -p color .Op Ar -s color +.Op Ar -z size .Ar file ... .Sh DESCRIPTION .Nm diff --git a/croptool.c b/croptool.c @@ -167,7 +167,7 @@ static void usage(void) { fprintf(stderr, "USAGE: croptool [-mr] [-f format] " "[-w width] [-c padding] [-p color] [-s color] " - "file ...\n"); + "[-z size] file ...\n"); } int