Fixed linux makefile, with help from David Fries and Guido

This commit is contained in:
Francois-Olivier Devaux 2007-03-14 07:35:54 +00:00
parent 78003a016a
commit 8bc6da2ffa
5 changed files with 47 additions and 30 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : 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

View File

@ -1,7 +1,7 @@
# 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
@ -11,7 +11,9 @@ INCLUDE = -Ilibopenjpeg
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
@ -31,13 +33,14 @@ LIBNAME = lib$(TARGET).so.$(VER_MAJOR)
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)
@ -53,11 +56,14 @@ $(STATICLIB): $(MODULES)
$(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)

View File

@ -1,7 +1,7 @@
# 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
@ -11,9 +11,11 @@ INCLUDE = -Ilibopenjpeg
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)
@ -28,13 +30,14 @@ LIBNAME = lib$(TARGET).dylib.$(VER_MAJOR)
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)
@ -48,10 +51,13 @@ $(SHAREDLIB): $(MODULES)
$(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)

View File

@ -13,7 +13,8 @@ Please let us know how this works for you under other Linux distributions or any
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 :
@ -26,7 +27,7 @@ Simple codec compilation
------------------------
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...).
You should add '-L..' to those lines if you did not use the 'install' target (and the 'clean' target neither...).

View File

@ -6,7 +6,8 @@ While the makefiles will make a .dylib and a .a, it is recommended to simply sta
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 :
@ -22,4 +23,4 @@ Once you've built the library, you might want to test it with a basic codec. To
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...).
You should add '-L..' to those lines if you did not use the 'osxinstall' target (and the 'osxclean' target neither...).