aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile7
-rw-r--r--src/jp2.c4
2 files changed, 6 insertions, 5 deletions
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}
diff --git a/src/jp2.c b/src/jp2.c
index 9420b48..a9d4429 100644
--- a/src/jp2.c
+++ b/src/jp2.c
@@ -6,11 +6,7 @@
#include <string.h>
-#ifdef __linux__
#include <openjpeg.h>
-#else
-#include <openjpeg-2.5/openjpeg.h>
-#endif
typedef struct _stream_user_data {
OPJ_SIZE_T pos;