2010-10-05 12:33:15 +02:00
|
|
|
MAJOR = @MAJOR_NR@
|
|
|
|
MINOR = @MINOR_NR@
|
|
|
|
BUILD = @BUILD_NR@
|
|
|
|
CURRENT=`expr $(MAJOR) + $(MINOR)`
|
|
|
|
|
|
|
|
lib_LTLIBRARIES = libopenjpeg_JPWL.la
|
|
|
|
|
|
|
|
libopenjpeg_JPWL_la_LDFLAGS = -no-undefined \
|
|
|
|
-version-info $(CURRENT):$(BUILD):$(MINOR)
|
|
|
|
|
|
|
|
JPWL_SRCS = crc.c jpwl.c jpwl_lib.c rs.c
|
|
|
|
JPWL_INCLS = jpwl.h crc.h rs.h
|
|
|
|
|
|
|
|
SRCS = ../libopenjpeg/bio.c ../libopenjpeg/cio.c ../libopenjpeg/dwt.c \
|
|
|
|
../libopenjpeg/event.c ../libopenjpeg/image.c ../libopenjpeg/j2k.c \
|
|
|
|
../libopenjpeg/j2k_lib.c ../libopenjpeg/jp2.c ../libopenjpeg/jpt.c \
|
|
|
|
../libopenjpeg/mct.c ../libopenjpeg/mqc.c ../libopenjpeg/openjpeg.c \
|
|
|
|
../libopenjpeg/pi.c ../libopenjpeg/raw.c ../libopenjpeg/t1.c \
|
|
|
|
../libopenjpeg/t2.c ../libopenjpeg/tcd.c ../libopenjpeg/tgt.c \
|
2010-12-08 12:06:41 +01:00
|
|
|
$(JPWL_SRCS)
|
2010-10-05 12:33:15 +02:00
|
|
|
|
|
|
|
INCLS = ../libopenjpeg/bio.h ../libopenjpeg/cio.h ../libopenjpeg/dwt.h \
|
|
|
|
../libopenjpeg/event.h ../libopenjpeg/fix.h ../libopenjpeg/image.h \
|
|
|
|
../libopenjpeg/int.h ../libopenjpeg/j2k.h ../libopenjpeg/j2k_lib.h \
|
|
|
|
../libopenjpeg/jp2.h ../libopenjpeg/jpt.h ../libopenjpeg/mct.h \
|
|
|
|
../libopenjpeg/mqc.h ../libopenjpeg/openjpeg.h ../libopenjpeg/pi.h \
|
|
|
|
../libopenjpeg/raw.h ../libopenjpeg/t1.h ../libopenjpeg/t2.h \
|
|
|
|
../libopenjpeg/tcd.h ../libopenjpeg/tgt.h ../libopenjpeg/opj_malloc.h \
|
2010-12-08 12:06:41 +01:00
|
|
|
../libopenjpeg/opj_includes.h \
|
2010-10-05 12:33:15 +02:00
|
|
|
$(JPWL_INCLS)
|
|
|
|
|
|
|
|
libopenjpeg_JPWL_la_SOURCES = $(SRCS) $(INCLS)
|
|
|
|
|
|
|
|
# Converts cr/lf to just lf
|
|
|
|
DOS2UNIX = dos2unix
|
|
|
|
|
|
|
|
dos2unix:
|
|
|
|
@$(DOS2UNIX) $(SRCS) $(INCLS)
|
|
|
|
|
2010-10-22 06:11:41 +02:00
|
|
|
COMPILERFLAGS = -Wall -ffast-math -std=c99
|
2010-10-05 12:33:15 +02:00
|
|
|
|
2010-12-08 12:06:41 +01:00
|
|
|
USERLIBS =
|
|
|
|
INCLUDES = -I.. -I. -I../libopenjpeg -I../common
|
2010-10-05 12:33:15 +02:00
|
|
|
|
|
|
|
if with_libtiff
|
|
|
|
INCLUDES += @tiffincludes@
|
|
|
|
USERLIBS += @tifflibs@
|
|
|
|
endif
|
|
|
|
|
|
|
|
if with_libpng
|
|
|
|
INCLUDES += @pngincludes@
|
|
|
|
USERLIBS += @pnglibs@
|
|
|
|
endif
|
|
|
|
|
|
|
|
if with_liblcms2
|
|
|
|
INCLUDES += @lcms2includes@
|
|
|
|
USERLIBS += @lcms2libs@
|
|
|
|
endif
|
|
|
|
|
|
|
|
if with_liblcms1
|
|
|
|
INCLUDES += @lcms1includes@
|
|
|
|
USERLIBS += @lcms1libs@
|
|
|
|
endif
|
|
|
|
|
2010-12-08 12:06:41 +01:00
|
|
|
USERLIBS += -lm
|
|
|
|
|
2010-10-05 12:33:15 +02:00
|
|
|
bin_PROGRAMS = JPWL_j2k_to_image JPWL_image_to_j2k
|
|
|
|
|
2010-12-10 05:27:40 +01:00
|
|
|
JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
|
|
|
JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
|
|
|
|
2010-12-14 04:33:31 +01:00
|
|
|
if with_sharedlibs
|
|
|
|
COMPILERFLAGS += -DOPJ_EXPORTS
|
|
|
|
else
|
|
|
|
COMPILERFLAGS += -DOPJ_STATIC
|
|
|
|
libopenjpeg_JPWL_la_LDFLAGS += -static
|
2010-12-10 05:27:40 +01:00
|
|
|
endif
|
2010-10-22 06:11:41 +02:00
|
|
|
|
2010-10-05 12:33:15 +02:00
|
|
|
CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
|
|
|
LDADD = ./libopenjpeg_JPWL.la $(USERLIBS)
|
|
|
|
|
2010-12-08 12:06:41 +01:00
|
|
|
JPWL_j2k_to_image_SOURCES = ../common/getopt.c ../codec/index.c \
|
|
|
|
../codec/convert.c ../common/color.c ../codec/j2k_to_image.c
|
2010-10-05 12:33:15 +02:00
|
|
|
|
2010-12-08 12:06:41 +01:00
|
|
|
JPWL_image_to_j2k_SOURCES = ../common/getopt.c ../codec/index.c \
|
2010-10-05 12:33:15 +02:00
|
|
|
../codec/convert.c ../codec/image_to_j2k.c
|
|
|
|
|
|
|
|
REPBIN=$(bin_PROGRAMS)
|
|
|
|
|
|
|
|
all-local:
|
2011-01-07 04:20:58 +01:00
|
|
|
@$(INSTALL) -d ../bin
|
2010-10-05 12:33:15 +02:00
|
|
|
$(INSTALL) $(bin_PROGRAMS) ../bin
|
2011-01-07 04:20:58 +01:00
|
|
|
@rm -rf .report_dir
|
|
|
|
@$(INSTALL) -d .report_dir
|
|
|
|
if build_so
|
|
|
|
if with_sharedlibs
|
|
|
|
@find .libs -type f -name "*\.so*" -exec cp -P {} .report_dir \;
|
|
|
|
@find .libs -type l -name "*\.so*" -exec cp -P {} .report_dir \;
|
|
|
|
else !with_sharedlibs
|
|
|
|
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
|
|
|
endif !with_sharedlibs
|
|
|
|
endif
|
|
|
|
if build_dll
|
|
|
|
if with_sharedlibs
|
|
|
|
@find .libs -type f -name "*\.dll" -exec cp -P {} .report_dir \;
|
|
|
|
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
|
|
|
else !with_sharedlibs
|
|
|
|
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
|
|
|
endif !with_sharedlibs
|
|
|
|
endif
|
|
|
|
if build_dylib
|
|
|
|
if with_sharedlibs
|
|
|
|
@find .libs -type f -name "*\.dylib" -exec cp -P {} .report_dir \;
|
|
|
|
else !with_sharedlibs
|
|
|
|
@find .libs -type l -name "*\.a" -exec cp -P {} .report_dir \;
|
|
|
|
endif !with_sharedlibs
|
|
|
|
endif
|
|
|
|
@cp -a .report_dir/* ../bin
|
|
|
|
@echo "" > .report.txt
|
|
|
|
@(for file in ${REPBIN} ; do \
|
|
|
|
echo "Installing: ${prefix}/bin/$${file}" >> .report.txt ; \
|
2010-10-05 12:33:15 +02:00
|
|
|
done)
|
2011-01-07 04:20:58 +01:00
|
|
|
@echo "Installing: ${prefix}/lib/libopenjpeg_JPWL.la" >> .report.txt
|
|
|
|
@(cd .report_dir; \
|
|
|
|
for file in `ls *.dll 2> /dev/null` ; do \
|
|
|
|
echo "Installing: ${prefix}/bin/$${file}" >> ../.report.txt ; \
|
|
|
|
done ; \
|
|
|
|
for file in `ls *.a 2> /dev/null` ; do \
|
|
|
|
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
|
|
|
done ; \
|
|
|
|
for file in `ls *.so* 2> /dev/null` ; do \
|
|
|
|
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
|
|
|
done ; \
|
|
|
|
for file in `ls *.dylib 2> /dev/null` ; do \
|
|
|
|
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
|
|
|
done \
|
|
|
|
)
|
|
|
|
@rm -rf .report_dir
|