From f7c9b01800446213919cac9246c9bd66eb3701ad Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Fri, 23 Mar 2007 14:08:15 +0000 Subject: [PATCH] Fixed Makefile.osx and changed Readme.osx accordingly --- ChangeLog | 3 +++ Makefile.osx | 18 ++++++++++-------- README.osx | 6 +++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 267b6128..490a330b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/Makefile.osx b/Makefile.osx index 1d71bcd7..960fb068 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -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) diff --git a/README.osx b/README.osx index b9871ec8..9338cf7f 100644 --- a/README.osx +++ b/README.osx @@ -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...).