Fixed Makefile.osx and changed Readme.osx accordingly

This commit is contained in:
Antonin Descampe 2007-03-23 14:08:15 +00:00
parent 6045158ce6
commit f7c9b01800
3 changed files with 16 additions and 11 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed
+ : added
March 23, 2007
* [antonin] Fixed Makefile.osx and changed Readme.osx accordingly
March 21, 2007
* [Parvatha] Fixed j2k_prog_order_list[]. Modifications in j2k.c.
* [Parvatha] Fixed t1_decode_cblks. Modifications in t1.c.

View File

@ -1,4 +1,4 @@
# Mac OSX makefile for OpenJPEG
# MacOSX makefile for OpenJPEG
VER_MAJOR = 1
VER_MINOR = 1.1
@ -9,14 +9,14 @@ INCLUDE = -Ilibopenjpeg
# General configuration variables:
CC = gcc
LIBTOOL = libtool
LIBTOOLSTAT = libtool
LIBTOOLDYN = gcc
PREFIX = /usr
INSTALL_LIBDIR = $(PREFIX)/lib
INSTALL_INCLUDE = $(PREFIX)/include
COMPILERFLAGS = -O3 -fPIC
LIBRARIES = -lc -lgcc -lstdc++
MODULES = $(SRCS:.c=.o)
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
@ -24,7 +24,7 @@ CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
TARGET = openjpeg
STATICLIB = lib$(TARGET).a
SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).dylib
LIBNAME = lib$(TARGET).dylib.$(VER_MAJOR)
LIBNAME = lib$(TARGET).dylib
@ -32,6 +32,9 @@ default: all
all: OpenJPEG
dos2unix:
@$(DOS2UNIX) $(SRCS) $(INCLS)
dist: OpenJPEG
install -d dist
install -m 644 $(STATICLIB) dist
@ -45,10 +48,10 @@ OpenJPEG: $(STATICLIB) $(SHAREDLIB)
$(CC) $(CFLAGS) -c $< -o $@
$(STATICLIB): $(MODULES)
$(LIBTOOL) -o $@ $(MODULES)
$(LIBTOOLSTAT) -o $@ $(MODULES)
$(SHAREDLIB): $(MODULES)
$(LIBTOOL) -dynamic $(LIBRARIES) -o $@ $(MODULES)
$(LIBTOOLDYN) -dynamiclib -o $@ $(MODULES)
install:
install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)'
@ -56,8 +59,7 @@ install:
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
install -m 644 -o root -g wheel ./libopenjpeg/openjpeg.h '$(DESTDIR)$(INSTALL_INCLUDE)'
clean:
rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)

View File

@ -20,7 +20,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 'osxinstall' target (and the 'osxclean' target neither...).
You should add '-L..' and to those lines if you did not use the 'install' target (and the 'clean' target neither...).