! : changed
+ : added
+March 14, 2007
+* [FOD] Fixed linux makefile, with help from David Fries and Guido
+
March 7, 2007
+ [Parvatha] Added option for Digital cinema profile compliant codestream. This can be chosen by "-cinema2K" or "-cinema4K" for a 2K and 4K compliance respectively. The feature for tileparts has not been implemented in this version. Modification in image_to_j2k.c
+ [Parvatha] Added the Digital Cinema profiles (CINEMA2K and CINEMA4K) to the list of profiles recognized in the codestream SIZ marker segment. Modification in openjpeg.h,j2k.c
# Linux makefile for OpenJPEG
VER_MAJOR = 1
-VER_MINOR = 0.0
+VER_MINOR = 1.1
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
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_includes.h
CC = gcc
AR = ar
-INSTALLDIR = /usr/lib
+PREFIX = /usr
+INSTALL_LIBDIR = $(PREFIX)/lib
+INSTALL_INCLUDE = $(PREFIX)/include
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
default: all
-all: dist
+all: OpenJPEG
dist: OpenJPEG
- mkdir -p dist
- cp *.a dist
- mv *.so dist
- cp libopenjpeg/openjpeg.h dist
+ install -d dist
+ install -m 644 $(STATICLIB) dist
+ install -m 755 $(SHAREDLIB) dist
+ ln -sf $(SHAREDLIB) dist/$(LIBNAME)
+ install libopenjpeg/openjpeg.h dist
dos2unix:
@$(DOS2UNIX) $(SRCS) $(INCLS)
$(SHAREDLIB): $(MODULES)
$(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
-install:
- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
- ldconfig
+install: OpenJPEG
+ install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)'
+ install -m 644 -o root -g root $(STATICLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
+ ranlib '$(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)'
+ install -m 755 -o root -g root $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
+ ln -sf $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)'
+ install -m 644 -o root -g root libopenjpeg/openjpeg.h '$(DESTDIR)$(INSTALL_INCLUDE)'
+ -ldconfig
clean:
rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
# Mac OSX makefile for OpenJPEG
VER_MAJOR = 1
-VER_MINOR = 0.0
+VER_MINOR = 1.1
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
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_includes.h
CC = gcc
LIBTOOL = libtool
-INSTALLDIR = /usr/lib
+PREFIX = /usr
+INSTALL_LIBDIR = $(PREFIX)/lib
+INSTALL_INCLUDE = $(PREFIX)/include
-COMPILERFLAGS = -O3
+COMPILERFLAGS = -O3 -fPIC
LIBRARIES = -lc -lgcc -lstdc++
MODULES = $(SRCS:.c=.o)
default: all
-all: dist
+all: OpenJPEG
dist: OpenJPEG
- mkdir dist
- cp *.a dist/
- cp *.dylib dist/
- cp libopenjpeg/openjpeg.h dist/
+ install -d dist
+ install -m 644 $(STATICLIB) dist
+ install -m 755 $(SHAREDLIB) dist
+ ln -sf $(SHAREDLIB) dist/$(LIBNAME)
+ install libopenjpeg/openjpeg.h dist
OpenJPEG: $(STATICLIB) $(SHAREDLIB)
$(LIBTOOL) -dynamic $(LIBRARIES) -o $@ $(MODULES)
install:
- install -m 644 -o root -g wheel $(STATICLIB) $(INSTALLDIR)
- install -m 755 -o root -g wheel $(SHAREDLIB) $(INSTALLDIR)
- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
- ranlib $(INSTALLDIR)/$(STATICLIB)
+ install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)'
+ install -m 644 -o root -g wheel $(STATICLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
+ ranlib '$(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)'
+ install -m 755 -o root -g wheel $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
+ ln -sf $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)'
+ install -m 644 -o root -g root libopenjpeg/openjpeg.h '$(DESTDIR)$(INSTALL_INCLUDE)'
+ -ldconfig
clean:
rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
Installation
------------
-Note: You will need to have root privileges in order to install the library in the /usr/lib directory.
+Note: You will need to have root privileges in order to install the library in
+/usr/include and /usr/lib directories.
The installation process is as simple as this :
1) Enter the OpenJPEG directory
2) Build the distribution :
------------------------
Once you've built the library, you might want to test it with a basic codec. To do this, go to the codec directory and use one of the following commands to build an encoder and decoder respectively:
-gcc convert.c image_to_j2k.c -o image_to_j2k -lopenjpeg -I ../libopenjpeg/ -lm
-gcc convert.c j2k_to_image.c -o j2k_to_image -lopenjpeg -I ../libopenjpeg/ -lm
+gcc convert.c image_to_j2k.c -o image_to_j2k -lopenjpeg -I ../libopenjpeg/ -lm -ltiff
+gcc convert.c j2k_to_image.c -o j2k_to_image -lopenjpeg -I ../libopenjpeg/ -lm -ltiff
-You should add '-L..' to those lines if you did not use the 'install' target (and the 'clean' target neither...).
\ No newline at end of file
+You should add '-L..' to those lines if you did not use the 'install' target (and the 'clean' target neither...).
Installation
------------
-Note: You will need to have root privileges in order to install the library in the /usr/lib directory.
+Note: You will need to have root privileges in order to install the library in
+/usr/include and /usr/lib directories.
The installation process is as simple as this :
1) Enter the OpenJPEG directory
2) Build the distribution :
gcc convert.c image_to_j2k.c -o image_to_j2k -lopenjpeg -I ../libopenjpeg/ -lm
gcc convert.c j2k_to_image.c -o j2k_to_image -lopenjpeg -I ../libopenjpeg/ -lm
-You should add '-L..' to those lines if you did not use the 'osxinstall' target (and the 'osxclean' target neither...).
\ No newline at end of file
+You should add '-L..' to those lines if you did not use the 'osxinstall' target (and the 'osxclean' target neither...).