4 CURRENT=`expr $(MAJOR) + $(MINOR)`
6 lib_LTLIBRARIES = libopenjpeg.la
10 libopenjpeg_la_LDFLAGS = -no-undefined \
11 -version-info $(CURRENT):$(BUILD):$(MINOR)
13 SRCS = bio.c cio.c dwt.c event.c image.c j2k.c j2k_lib.c jp2.c jpt.c \
14 mct.c mqc.c openjpeg.c pi.c raw.c t1.c t2.c tcd.c tgt.c
16 INCLS = bio.h cio.h dwt.h event.h fix.h image.h int.h j2k.h j2k_lib.h \
17 jp2.h jpt.h mct.h mqc.h pi.h raw.h t1.h t2.h tcd.h tgt.h opj_malloc.h \
20 libopenjpeg_la_SOURCES = $(SRCS) $(INCLS)
22 includedir = ${prefix}/include/openjpeg-$(MAJOR).$(MINOR)
23 include_HEADERS = openjpeg.h
25 # Converts cr/lf to just lf
29 @$(DOS2UNIX) $(SRCS) $(INCLS)
31 COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
34 COMPILERFLAGS += -DOPJ_EXPORTS
36 COMPILERFLAGS += -DOPJ_STATIC
37 libopenjpeg_la_LDFLAGS += -static
40 CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
42 headerdir = openjpeg-$(MAJOR).$(MINOR)
47 @$(INSTALL) -d .report_dir
50 @find .libs -type f -name "*\.so*" -exec cp -P {} .report_dir \;
51 @find .libs -type l -name "*\.so*" -exec cp -P {} .report_dir \;
53 @find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
54 endif !with_sharedlibs
58 @find .libs -type f -name "*\.dll" -exec cp -P {} .report_dir \;
59 @find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
61 @find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
62 endif !with_sharedlibs
66 @find .libs -type f -name "*\.dylib" -exec cp -P {} .report_dir \;
68 @find .libs -type l -name "*\.a" -exec cp -P {} .report_dir \;
69 endif !with_sharedlibs
71 @cp -a .report_dir/* ../bin
72 @echo "" > .report.txt
73 @echo "Installing: ${prefix}/include/${headerdir}/" >> .report.txt
74 @echo "Installing: ${prefix}/include/${headerdir}/openjpeg.h" >> .report.txt
75 @echo "Installing: ${prefix}/lib/libopenjpeg.la" >> .report.txt
77 for file in `ls *.dll 2> /dev/null` ; do \
78 echo "Installing: ${prefix}/bin/$${file}" >> ../.report.txt ; \
80 for file in `ls *.a 2> /dev/null` ; do \
81 echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
83 for file in `ls *.so* 2> /dev/null` ; do \
84 echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
86 for file in `ls *.dylib 2> /dev/null` ; do \
87 echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
93 (cd $(DESTDIR)${prefix}/include && rm -f openjpeg.h)
94 (cd $(DESTDIR)${prefix}/include && \
95 $(LN_S) ${headerdir}/openjpeg.h openjpeg.h)
98 (cd $(DESTDIR)${prefix}/include && rm -rf openjpeg.h ${headerdir})