2010-07-07 15:00:39 +02:00
|
|
|
|
|
|
|
# ************************************************
|
|
|
|
# NOTE : This Makefile is not maintained anymore.
|
|
|
|
# Please use the cmake tool (see README.cmake) to
|
|
|
|
# generate the right Makefile for your platform.
|
|
|
|
# ************************************************
|
|
|
|
|
|
|
|
|
2005-12-08 10:38:47 +01:00
|
|
|
# Linux makefile for OpenJPEG
|
|
|
|
|
2007-06-04 15:27:25 +02:00
|
|
|
VER_MAJOR = 2
|
2010-03-05 22:28:20 +01:00
|
|
|
VER_MINOR = 1.4.0
|
2005-12-08 10:38:47 +01:00
|
|
|
|
2006-02-01 22:25:11 +01:00
|
|
|
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
|
2007-10-18 14:26:11 +02:00
|
|
|
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
|
2005-12-08 10:38:47 +01:00
|
|
|
INCLUDE = -Ilibopenjpeg
|
|
|
|
|
|
|
|
# General configuration variables:
|
|
|
|
CC = gcc
|
|
|
|
AR = ar
|
|
|
|
|
2007-03-14 08:35:54 +01:00
|
|
|
PREFIX = /usr
|
|
|
|
INSTALL_LIBDIR = $(PREFIX)/lib
|
|
|
|
INSTALL_INCLUDE = $(PREFIX)/include
|
2005-12-08 10:38:47 +01:00
|
|
|
|
|
|
|
# Converts cr/lf to just lf
|
|
|
|
DOS2UNIX = dos2unix
|
|
|
|
|
2007-11-08 15:26:03 +01:00
|
|
|
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -fPIC
|
2005-12-08 10:38:47 +01:00
|
|
|
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
|
|
|
|
|
2007-03-14 08:35:54 +01:00
|
|
|
all: OpenJPEG
|
2005-12-08 10:38:47 +01:00
|
|
|
|
|
|
|
dist: OpenJPEG
|
2007-03-14 08:35:54 +01:00
|
|
|
install -d dist
|
|
|
|
install -m 644 $(STATICLIB) dist
|
|
|
|
install -m 755 $(SHAREDLIB) dist
|
|
|
|
ln -sf $(SHAREDLIB) dist/$(LIBNAME)
|
|
|
|
install libopenjpeg/openjpeg.h dist
|
2005-12-08 10:38:47 +01:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2007-03-14 08:35:54 +01:00
|
|
|
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
|
2005-12-08 10:38:47 +01:00
|
|
|
|
|
|
|
clean:
|
2005-12-21 15:54:37 +01:00
|
|
|
rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
|
2005-12-08 10:38:47 +01:00
|
|
|
|
|
|
|
osx:
|
|
|
|
make -f Makefile.osx
|
|
|
|
|
|
|
|
osxinstall:
|
|
|
|
make -f Makefile.osx install
|
2005-12-21 15:54:37 +01:00
|
|
|
|
|
|
|
osxclean:
|
|
|
|
make -f Makefile.osx clean
|