]> granicus.if.org Git - openjpeg/commitdiff
Fixed linux makefile, with help from David Fries and Guido
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 14 Mar 2007 07:35:54 +0000 (07:35 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 14 Mar 2007 07:35:54 +0000 (07:35 +0000)
ChangeLog
Makefile
Makefile.osx
README.linux
README.osx

index 3c55378f72a58387b24f57e44b9627a53c5848e1..409af193945674208896a4a4468158055028ede0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 23e0bc984bba80b04c271633ba840150703ee31e..932128b40f2a2327c3104947d8e884cb77477d2f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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)
index 2f44ff5aedb3f0ce086b0a4331fedbb2ec77dd11..1d71bcd7bcdff072d4a3adf6d3d6f280a0773cd5 100644 (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)
index 2fff9b55c7cec1d15ca43faed524510de36250ae..677e2d8d3b94eb2bfd7291cc8c47d184d6b5e5df 100644 (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...).
\ 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...).
index 0401d8f5f7ec7c0d75f63563890274298b298d2f..b9871ec8f82105d43ebdfdb764d0340d5f5e4164 100644 (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...).
\ 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...).