Introduction
Introduction Statistics Contact Development Disclaimer Help
don't link against unneeded libs - farbfeld - suckless image format with conver…
git clone git://git.suckless.org/farbfeld
Log
Files
Refs
README
LICENSE
---
commit 7f295f8c100a504c305d537bd3fde6492f15ef7a
parent 264979bf52261cb461212be8978c2a4697aa2e80
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 24 Mar 2016 19:09:41 +0100
don't link against unneeded libs
- jpg2ff requires libjpeg
- ff2png, png2ff requires libpng (and libz)
- ff2ppm has no dependencies
Diffstat:
M Makefile | 16 +++++++++++++---
M config.mk | 6 +++---
2 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -8,11 +8,21 @@ HDR = arg.h
MAN1 = 2ff.1 ${BIN:=.1}
MAN5 = farbfeld.5
-all: png2ff ff2png jpg2ff ff2ppm
+all: ${BIN}
+
+png2ff ff2png:
+ @echo CC $@
+ @${CC} -o $@ ${CFLAGS} ${CPPFLAGS} -L${PNGLIB} -lpng -I${PNGINC} \
+ ${LDFLAGS} [email protected]
+
+jpg2ff:
+ @echo CC $@
+ @${CC} -o $@ ${CFLAGS} ${CPPFLAGS} -L${JPGLIB} -ljpeg -I${JPGINC} \
+ ${LDFLAGS} [email protected]
.c:
- @echo CC $<
- @${CC} -o $@ ${CFLAGS} ${LIBS} ${LDFLAGS} $<
+ @echo CC $@
+ @${CC} -o $@ ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} $<
clean:
@echo cleaning
diff --git a/config.mk b/config.mk
@@ -13,12 +13,12 @@ PNGINC = /usr/local/include
JPGLIB = /usr/local/lib
JPGINC = /usr/local/include
-INCS = -I${PNGINC} -I${JPGINC}
-LIBS = -L${PNGLIB} -L${JPGLIB} -lpng -ljpeg
+INCS =
+LIBS =
# flags
CPPFLAGS = -D_DEFAULT_SOURCE
-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS}
LDFLAGS = -s ${LIBS}
# compiler and linker
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.