~ubuntu-branches/ubuntu/oneiric/openjpeg/oneiric-updates

« back to all changes in this revision

Viewing changes to jp3d/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-04-29 08:23:56 UTC
  • Revision ID: james.westby@ubuntu.com-20080429082356-cg1lz0oydqe1ejb8
Tags: upstream-1.3+dfsg
ImportĀ upstreamĀ versionĀ 1.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Linux makefile for OpenJPEG
 
2
 
 
3
VER_MAJOR = 1
 
4
VER_MINOR = 0.0
 
5
 
 
6
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
 
7
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
 
8
INCLUDE = -Ilibopenjpeg
 
9
 
 
10
# General configuration variables:
 
11
CC = gcc
 
12
AR = ar
 
13
 
 
14
INSTALLDIR = /usr/lib
 
15
 
 
16
# Converts cr/lf to just lf
 
17
DOS2UNIX = dos2unix
 
18
 
 
19
COMPILERFLAGS = -O3
 
20
LIBRARIES = -lstdc++
 
21
 
 
22
MODULES = $(SRCS:.c=.o)
 
23
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
 
24
 
 
25
TARGET  = openjpeg
 
26
STATICLIB = lib$(TARGET).a
 
27
SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
 
28
LIBNAME = lib$(TARGET).so.$(VER_MAJOR)
 
29
 
 
30
 
 
31
 
 
32
default: all
 
33
 
 
34
all: dist
 
35
 
 
36
dist: OpenJPEG
 
37
        mkdir dist
 
38
        cp *.a dist/
 
39
        cp *.so dist/
 
40
        cp libopenjpeg/openjpeg.h dist/
 
41
 
 
42
dos2unix:
 
43
        @$(DOS2UNIX) $(SRCS) $(INCLS)
 
44
 
 
45
OpenJPEG: $(STATICLIB) $(SHAREDLIB)
 
46
 
 
47
.c.o:
 
48
        $(CC) $(CFLAGS) -c $< -o $@
 
49
 
 
50
$(STATICLIB): $(MODULES)
 
51
        $(AR) r $@ $(MODULES)
 
52
 
 
53
$(SHAREDLIB): $(MODULES)
 
54
        $(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
 
55
 
 
56
install:
 
57
        install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
 
58
        install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
 
59
        ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
 
60
        ldconfig
 
61
 
 
62
clean:
 
63
        rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
 
64
 
 
65
osx:
 
66
        make -f Makefile.osx
 
67
 
 
68
osxinstall:
 
69
        make -f Makefile.osx install
 
70
 
 
71
osxclean:
 
72
        make -f Makefile.osx clean