farbfeld

suckless image format with conversion tools
git clone git://git.suckless.org/farbfeld
Log | Files | Refs | README | LICENSE

commit 526f2c5533807c64c80811a98778be739c19872c
parent d5f6f70d351239ee37b3d864c9a94dc49d66c052
Author: FRIGN <dev@frign.de>
Date:   Tue, 10 Nov 2015 00:10:21 +0100

Overhaul buildsystem

Diffstat:
MMakefile | 36++++++++----------------------------
MTODO | 1-
Mconfig.mk | 17+++--------------
3 files changed, 11 insertions(+), 43 deletions(-)

diff --git a/Makefile b/Makefile @@ -4,44 +4,24 @@ include config.mk SRC = png2ff.c ff2png.c -OBJ = ${SRC:.c=.o} -all: options png2ff ff2png +all: png2ff ff2png -options: - @echo farbfeld build options: - @echo "CFLAGS = ${CFLAGS}" - @echo "LDFLAGS = ${LDFLAGS}" - @echo "CC = ${CC}" - -.c.o: +.c: @echo CC $< - @${CC} -c -o $@ ${CFLAGS} $< - -${OBJ}: config.mk - -png2ff: png2ff.o - @echo CC -o $@ - @${CC} -o $@ png2ff.o ${PNG_LIBS} ${LDFLAGS} - -ff2png: ff2png.o - @echo CC -o $@ - @${CC} -o $@ ff2png.o ${PNG_LIBS} ${LDFLAGS} + @${CC} -o $@ ${CFLAGS} ${LIBS} ${LDFLAGS} $< clean: - @echo cleaning - @rm -f png2ff ff2png ${OBJ} + rm -f png2ff ff2png -install: all - @echo installing executable files to ${DESTDIR}${PREFIX}/bin +install: + @echo installing into ${DESTDIR}${PREFIX}/bin @mkdir -p ${DESTDIR}${PREFIX}/bin @cp -f png2ff ff2png ${DESTDIR}${PREFIX}/bin - @chmod 755 ${DESTDIR}${PREFIX}/bin/png2ff - @chmod 755 ${DESTDIR}${PREFIX}/bin/ff2png uninstall: - @echo removing executable files from ${DESTDIR}${PREFIX}/bin + @echo removing from ${DESTDIR}${PREFIX}/bin @rm -f ${DESTDIR}${PREFIX}/bin/png2ff @rm -f ${DESTDIR}${PREFIX}/bin/ff2png -.PHONY: all options clean install uninstall +.PHONY: all clean install uninstall diff --git a/TODO b/TODO @@ -1,3 +1,2 @@ o handle truecolor PNG's properly (libpng is painful to use) - o write simpler Makefile o re-add the old imagefile-tools for gif, jpg, ... diff --git a/config.mk b/config.mk @@ -3,21 +3,10 @@ # paths PREFIX = /usr/local -# libs -LIBS = -PNG_LIBS = -lpng -JPEG_LIBS = -ljpeg -GIF_LIBS = -lgif - # flags -CPPFLAGS = - -# debug -#CFLAGS = -std=c99 -pedantic -Wall -Wextra -O0 -g -ggdb ${CPPFLAGS} -#LDFLAGS = ${LIBS} -# optimized -CFLAGS = -std=c99 -pedantic -Wall -Wextra -D_DEFAULT_SOURCE -Os ${CPPFLAGS} -LDFLAGS = -s ${LIBS} +CPPFLAGS = -D_DEFAULT_SOURCE +CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os ${CPPFLAGS} +LDFLAGS = -s -lpng -ljpeg -lgif # compiler and linker CC = cc