Link against libc for iconv, find openjpeg header with pkgconf.
Signed-off-by: yzrh <yzrh@noema.org>
This commit is contained in:
parent
060bc00a0d
commit
5a1afb0056
3 changed files with 12 additions and 11 deletions
12
README.md
12
README.md
|
@ -12,12 +12,12 @@ any failures with a sample that can reproduce the behaviour.
|
|||
Dependency
|
||||
----------
|
||||
|
||||
1. OpenSSL
|
||||
2. libiconv
|
||||
3. zlib
|
||||
4. jbig2dec
|
||||
5. libjpeg-turbo
|
||||
6. openjpeg
|
||||
1. libcrypto (OpenSSL)
|
||||
2. zlib
|
||||
3. jbig2dec
|
||||
4. libjpeg-turbo
|
||||
5. openjpeg
|
||||
6. pkgconf
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
|
|
@ -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}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue