Removed LCMS dependencies from Makefile.am/Makefile.nix
[openjpeg.git] / libopenjpeg / Makefile.am
1 MAJOR = @MAJOR_NR@
2 MINOR = @MINOR_NR@
3 BUILD = @BUILD_NR@
4 CURRENT=`expr $(MAJOR) + $(MINOR)`
5
6 lib_LTLIBRARIES = libopenjpeg.la
7
8 INCLUDES = -I.. -I.
9
10 libopenjpeg_la_LDFLAGS = -no-undefined \
11   -version-info $(CURRENT):$(BUILD):$(MINOR)
12
13 SRCS = bio.c cio.c dwt.c event.c image.c j2k.c j2k_lib.c jp2.c jpt.c \
14  mct.c mqc.c openjpeg.c pi.c raw.c t1.c t2.c tcd.c tgt.c
15
16 INCLS = bio.h cio.h dwt.h event.h fix.h image.h int.h j2k.h j2k_lib.h \
17  jp2.h jpt.h mct.h mqc.h pi.h raw.h t1.h t2.h tcd.h tgt.h opj_malloc.h \
18  opj_includes.h
19
20 libopenjpeg_la_SOURCES = $(SRCS) $(INCLS)
21
22 includedir = ${prefix}/include/openjpeg-$(MAJOR).$(MINOR)
23 include_HEADERS = openjpeg.h
24
25 # Converts cr/lf to just lf
26 DOS2UNIX = dos2unix
27
28 dos2unix:
29         @$(DOS2UNIX) $(SRCS) $(INCLS)
30
31 COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
32
33 CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
34
35 headerdir = openjpeg-$(MAJOR).$(MINOR)
36
37 all-local:
38         @$(INSTALL) -d ../bin
39         @cp -P .libs/libopenjpeg.* ../bin/
40         @rm -f ../bin/libopenjpeg.la*
41         @rm -rf .report_lib
42         @$(INSTALL) -d .report_lib
43         @cp -P .libs/libopenjpeg.* .report_lib
44         @rm -f .report_lib/libopenjpeg.lai
45         @echo "" > .report.txt
46         @echo "Installing: ${prefix}/include/${headerdir}/" >> .report.txt
47         @echo "Installing: ${prefix}/include/${headerdir}/openjpeg.h" >> .report.txt
48         @(cd .report_lib; \
49         l=`ls --file-type`; \
50         for f in $$l ; do \
51         echo "Installing: ${prefix}/lib/$$f" >> ../.report.txt ; \
52         done)
53         @rm -rf .report_lib
54
55 install-data-hook:
56         (cd $(DESTDIR)${prefix}/include && rm -f openjpeg.h)
57         (cd $(DESTDIR)${prefix}/include && \
58         $(LN_S) ${headerdir}/openjpeg.h openjpeg.h)
59         
60 uninstall-hook:
61         (cd $(DESTDIR)${prefix}/include && rm -rf openjpeg.h ${headerdir})