*** ./mj2/Makefile.ORIG Thu May 27 14:38:12 2010 --- ./mj2/Makefile Thu May 27 15:29:14 2010 *************** *** 1,20 **** # Makefile for the MJ2 codecs of the OpenJPEG library: frames_to_mj2, mj2_to_frames, extract_j2k_from_mj2 and wrap_j2k_in_mj2 ! CFLAGS = -O3 -lstdc++ # -g -p -pg all: frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2 frames_to_mj2: frames_to_mj2.c ../libopenjpeg.a ! gcc $(CFLAGS) compat/getopt.c mj2_convert.c mj2.c frames_to_mj2.c -o frames_to_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm mj2_to_frames: mj2_to_frames.c ../libopenjpeg.a ! gcc $(CFLAGS) compat/getopt.c mj2_convert.c mj2.c mj2_to_frames.c -o mj2_to_frames -L.. -lopenjpeg -I ../libopenjpeg/ -lm extract_j2k_from_mj2: extract_j2k_from_mj2.c ../libopenjpeg.a ! gcc $(CFLAGS) mj2.c extract_j2k_from_mj2.c -o extract_j2k_from_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm wrap_j2k_in_mj2: wrap_j2k_in_mj2.c ../libopenjpeg.a ! gcc $(CFLAGS) mj2.c wrap_j2k_in_mj2.c -o wrap_j2k_in_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm clean: rm -f frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2 --- 1,32 ---- # Makefile for the MJ2 codecs of the OpenJPEG library: frames_to_mj2, mj2_to_frames, extract_j2k_from_mj2 and wrap_j2k_in_mj2 ! CC = cc -qcpluscmt + CFLAGS = -O + + INCLUDES = -I../libopenjpeg -I.. + + LDFLAGS = -L.. -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000 + + LIBS = -lopenjpeg -lm + + all: frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2 + frames_to_mj2: frames_to_mj2.c ../libopenjpeg.a ! $(CC) $(CFLAGS) $(INCLUDES) compat/getopt.c mj2_convert.c mj2.c frames_to_mj2.c -o $@ $(LDFLAGS) $(LIBS) mj2_to_frames: mj2_to_frames.c ../libopenjpeg.a ! $(CC) $(CFLAGS) $(INCLUDES) compat/getopt.c mj2_convert.c mj2.c mj2_to_frames.c -o $@ $(LDFLAGS) $(LIBS) extract_j2k_from_mj2: extract_j2k_from_mj2.c ../libopenjpeg.a ! $(CC) $(CFLAGS) $(INCLUDES) mj2.c extract_j2k_from_mj2.c -o $@ $(LDFLAGS) $(LIBS) wrap_j2k_in_mj2: wrap_j2k_in_mj2.c ../libopenjpeg.a ! $(CC) $(CFLAGS) $(INCLUDES) mj2.c wrap_j2k_in_mj2.c -o $@ $(LDFLAGS) $(LIBS) + clean: rm -f frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2 + *** ./libopenjpeg/opj_includes.h.ORIG Thu May 27 13:50:59 2010 --- ./libopenjpeg/opj_includes.h Thu May 27 14:48:41 2010 *************** *** 100,105 **** --- 100,110 ---- } #endif + /* AIX5L V5.1 does not have lrintf */ + #ifdef _AIX51 + #define lrintf(x) ((long) (x)) + #endif + #include "j2k_lib.h" #include "opj_malloc.h" #include "event.h" *** ./libopenjpeg/opj_malloc.h.ORIG Thu May 27 14:13:58 2010 --- ./libopenjpeg/opj_malloc.h Thu May 27 14:15:13 2010 *************** *** 76,82 **** #if defined(__sun) #define HAVE_MEMALIGN /* Linux x86_64 and OSX always align allocations to 16 bytes */ ! #elif !defined(__amd64__) && !defined(__APPLE__) /* FIXME: Yes, this is a big assumption */ #define HAVE_POSIX_MEMALIGN #endif --- 76,82 ---- #if defined(__sun) #define HAVE_MEMALIGN /* Linux x86_64 and OSX always align allocations to 16 bytes */ ! #elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX51) /* FIXME: Yes, this is a big assumption */ #define HAVE_POSIX_MEMALIGN #endif *** ./codec/compat/getopt.c.ORIG Thu May 27 13:41:05 2010 --- ./codec/compat/getopt.c Thu May 27 13:41:53 2010 *************** *** 45,51 **** optind = 1, /* index into parent argv vector */ optopt, /* character checked for validity */ optreset; /* reset getopt */ ! const char *optarg; /* argument associated with option */ typedef struct option { --- 45,51 ---- optind = 1, /* index into parent argv vector */ optopt, /* character checked for validity */ optreset; /* reset getopt */ ! char *optarg; /* argument associated with option */ typedef struct option { *************** *** 71,77 **** */ int getopt(int nargc, char *const *nargv, const char *ostr) { # define __progname nargv[0] ! static const char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ if (optreset || !*place) { /* update scanning pointer */ --- 71,77 ---- */ int getopt(int nargc, char *const *nargv, const char *ostr) { # define __progname nargv[0] ! static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ if (optreset || !*place) { /* update scanning pointer */ *** ./codec/dirent.h.ORIG Thu May 27 13:37:03 2010 --- ./codec/dirent.h Thu May 27 13:39:11 2010 *************** *** 128,133 **** --- 128,135 ---- # define HAVE_DIRENT_H # elif defined(__linux__) /* Linux */ # define HAVE_DIRENT_H + # elif defined(_AIX) /* AIX */ + # define HAVE_DIRENT_H # elif defined(__GNUC__) /* GNU C/C++ */ # define HAVE_DIRENT_H # else *** ./codec/Makefile.ORIG Thu May 27 15:28:43 2010 --- ./codec/Makefile Thu May 27 15:28:43 2010 *************** *** 1,14 **** # Makefile for the main OpenJPEG codecs: j2k_to_image and image_to_j2k ! CFLAGS = -O3 -lstdc++ # -g -p -pg all: j2k_to_image image_to_j2k j2k_to_image: j2k_to_image.c ../libopenjpeg.a ! gcc $(CFLAGS) compat/getopt.c index.c convert.c j2k_to_image.c -o j2k_to_image -L.. -lopenjpeg -I ../libopenjpeg/ -lm -ltiff image_to_j2k: image_to_j2k.c ../libopenjpeg.a ! gcc $(CFLAGS) compat/getopt.c index.c convert.c image_to_j2k.c -o image_to_j2k -L.. -lopenjpeg -I ../libopenjpeg/ -lm -ltiff clean: rm -f j2k_to_image image_to_j2k --- 1,26 ---- # Makefile for the main OpenJPEG codecs: j2k_to_image and image_to_j2k ! CC = cc -qcpluscmt + CFLAGS = -O + + INCLUDES = -I../libopenjpeg -I.. + + LDFLAGS = -L.. -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000 + + LIBS = -lopenjpeg -lm -ltiff + + all: j2k_to_image image_to_j2k + j2k_to_image: j2k_to_image.c ../libopenjpeg.a ! $(CC) $(CFLAGS) $(INCLUDES) compat/getopt.c index.c convert.c j2k_to_image.c -o $@ $(LDFLAGS) $(LIBS) image_to_j2k: image_to_j2k.c ../libopenjpeg.a ! $(CC) $(CFLAGS) $(INCLUDES) compat/getopt.c index.c convert.c image_to_j2k.c -o $@ $(LDFLAGS) $(LIBS) + clean: rm -f j2k_to_image image_to_j2k + *** ./Makefile.ORIG Thu May 27 14:22:09 2010 --- ./Makefile Thu May 27 15:18:38 2010 *************** *** 1,78 **** ! # Linux makefile for OpenJPEG ! VER_MAJOR = 2 ! VER_MINOR = 1.3.0 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_malloc.h ./libopenjpeg/opj_includes.h - INCLUDE = -Ilibopenjpeg # General configuration variables: ! CC = gcc AR = ar ! PREFIX = /usr INSTALL_LIBDIR = $(PREFIX)/lib ! INSTALL_INCLUDE = $(PREFIX)/include # Converts cr/lf to just lf DOS2UNIX = dos2unix ! COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -fPIC ! LIBRARIES = -lstdc++ MODULES = $(SRCS:.c=.o) - CFLAGS = $(COMPILERFLAGS) $(INCLUDE) ! TARGET = openjpeg ! STATICLIB = lib$(TARGET).a ! SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so ! LIBNAME = lib$(TARGET).so.$(VER_MAJOR) - default: all - - all: OpenJPEG - - dist: OpenJPEG - 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) - OpenJPEG: $(STATICLIB) $(SHAREDLIB) - .c.o: ! $(CC) $(CFLAGS) -c $< -o $@ ! $(STATICLIB): $(MODULES) $(AR) r $@ $(MODULES) - $(SHAREDLIB): $(MODULES) - $(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES) - 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) - osx: - make -f Makefile.osx - - osxinstall: - make -f Makefile.osx install - - osxclean: - make -f Makefile.osx clean --- 1,51 ---- ! # AIX makefile for OpenJPEG ! VER_MAJOR = 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_malloc.h ./libopenjpeg/opj_includes.h # General configuration variables: ! CC = cc -qcpluscmt AR = ar ! TARGET = openjpeg ! ! PREFIX = /opt/freeware INSTALL_LIBDIR = $(PREFIX)/lib ! INSTALL_INCLUDE = $(PREFIX)/include/$(TARGET) # Converts cr/lf to just lf DOS2UNIX = dos2unix ! LIBRARIES = -lm MODULES = $(SRCS:.c=.o) ! LIBNAME = lib$(TARGET).a + INCLUDES = -I. -I${TARGET} + OpenJPEG: $(LIBNAME) dos2unix: @$(DOS2UNIX) $(SRCS) $(INCLS) .c.o: ! $(CC) $(CFLAGS) ${INCLUDES} $(CFLAGS) -c $< -o $@ ! $(LIBNAME): $(MODULES) $(AR) r $@ $(MODULES) install: OpenJPEG ! mkdir -p $(DESTDIR)$(INSTALL_LIBDIR) $(DESTDIR)$(INSTALL_INCLUDE) ! chmod 0755 $(DESTDIR)$(INSTALL_LIBDIR) $(DESTDIR)$(INSTALL_INCLUDE) ! cp $(LIBNAME) $(DESTDIR)$(INSTALL_LIBDIR) ! chmod 0644 $(DESTDIR)$(INSTALL_LIBDIR)/* ! cp libopenjpeg/openjpeg.h $(DESTDIR)$(INSTALL_INCLUDE) ! ln -s $(TARGET)/$(TARGET).h $(DESTDIR)$(PREFIX)/include ! chmod 0644 $(DESTDIR)$(INSTALL_INCLUDE)/* clean: ! rm -rf core u2dtmp* $(MODULES) $(LIBNAME)