From 5a1afb00567aeacca9ead58f5383c3f502317a69 Mon Sep 17 00:00:00 2001 From: yzrh Date: Thu, 29 Dec 2022 16:32:49 +0000 Subject: Link against libc for iconv, find openjpeg header with pkgconf. Signed-off-by: yzrh --- src/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 065a8a5..5442ff0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,11 +16,16 @@ obj = ${src:.c=.o} PREFIX = /usr/local CFLAGS = -O2 -pipe -flto -Wall -Wextra -LDFLAGS = -Wl,-O2 -lcrypto -liconv -lz -ljbig2dec -ljpeg -lopenjp2 -Wl,--as-needed +LDFLAGS = -Wl,-O2 -lcrypto -lz -ljbig2dec -ljpeg -lopenjp2 -Wl,--as-needed CFLAGS += -I/usr/local/include LDFLAGS += -L/usr/local/lib +OPENJPEG_CFLAGS != pkgconf --cflags libopenjp2 + +CFLAGS += ${OPENJPEG_CFLAGS} +CFLAGS += -DLIBICONV_PLUG + all: ${obj} ${inc} ${CC} ${LDFLAGS} -o melon ${obj} -- cgit v1.2.3