Commit 7f295f8c authored by Hiltjo Posthuma's avatar Hiltjo Posthuma Committed by FRIGN

don't link against unneeded libs

- jpg2ff requires libjpeg
- ff2png, png2ff requires libpng (and libz)
- ff2ppm has no dependencies
parent 264979bf
......@@ -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} $@.c
jpg2ff:
@echo CC $@
@${CC} -o $@ ${CFLAGS} ${CPPFLAGS} -L${JPGLIB} -ljpeg -I${JPGINC} \
${LDFLAGS} $@.c
.c:
@echo CC $<
@${CC} -o $@ ${CFLAGS} ${LIBS} ${LDFLAGS} $<
@echo CC $@
@${CC} -o $@ ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} $<
clean:
@echo cleaning
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment