4c160e08c23d2db5eb8420dc9894b0d73e1a95a4
[openjpeg.git] / libopenjpeg / Makefile.am
1 MAINTAINERCLEANFILES = Makefile.in
2
3 SUBDIRS = .
4
5 if WANT_JPWL
6 SUBDIRS += jpwl
7 endif
8
9 includesdir = $(includedir)/openjpeg-$(MAJOR_NR).$(MINOR_NR)
10 includes_HEADERS = openjpeg.h
11
12 lib_LTLIBRARIES = libopenjpeg.la
13
14 libopenjpeg_la_CPPFLAGS = \
15 -I. \
16 -I$(top_srcdir)/libopenjpeg \
17 -I$(top_builddir)/libopenjpeg
18 libopenjpeg_la_CFLAGS =
19 libopenjpeg_la_LIBADD = -lm
20 libopenjpeg_la_LDFLAGS = -no-undefined -version-info @lt_version@
21
22 libopenjpeg_la_SOURCES = \
23 bio.c \
24 cio.c \
25 dwt.c \
26 event.c \
27 image.c \
28 j2k.c \
29 j2k_lib.c \
30 jp2.c \
31 jpt.c \
32 mct.c \
33 mqc.c \
34 openjpeg.c \
35 pi.c \
36 raw.c \
37 t1.c \
38 t1_generate_luts.c \
39 t2.c \
40 tcd.c \
41 tgt.c \
42 cidx_manager.c \
43 phix_manager.c \
44 ppix_manager.c \
45 thix_manager.c \
46 tpix_manager.c \
47 bio.h \
48 cio.h \
49 dwt.h \
50 event.h \
51 fix.h \
52 image.h \
53 int.h \
54 j2k.h \
55 j2k_lib.h \
56 jp2.h \
57 jpt.h \
58 mct.h \
59 mqc.h \
60 opj_includes.h \
61 opj_malloc.h \
62 pi.h \
63 raw.h \
64 t1.h \
65 t1_luts.h \
66 t2.h \
67 tcd.h \
68 tgt.h \
69 cidx_manager.h
70
71 EXTRA_DIST = \
72 CMakeLists.txt
73
74 install-data-hook:
75         cd $(DESTDIR)$(includedir) && \
76           rm -f openjpeg.h && \
77           $(LN_S) openjpeg-$(MAJOR_NR).$(MINOR_NR)/openjpeg.h \
78                   openjpeg.h
79         @rm -rf $(top_builddir)/report.txt
80         @echo -e " (LA)\t$(libdir)/libopenjpeg.la" >> $(top_builddir)/report.txt
81         @( $(call solist) ) >> $(top_builddir)/report.txt
82         @echo -e " (A)\t$(base)/$(a)" >> $(top_builddir)/report.txt
83         @echo -e " (H)\t$(includedir)/openjpeg-$(MAJOR_NR).$(MINOR_NR)/openjpeg.h" >> $(top_builddir)/report.txt
84         @echo -e " (LN)\t$(includedir)/openjpeg.h" >> $(top_builddir)/report.txt
85
86 uninstall-hook:
87         rm -f $(DESTDIR)$(includedir)/openjpeg.h
88
89 solist    = $(foreach f, $(dll) $(so), echo -e ' $(SO_PREFIX)\t$(base)/$(f)' ;)
90 get_tok   = $(shell grep -E "^$(1)=" $(lib_LTLIBRARIES) | cut -d "'" -f 2)
91 base      = $(call get_tok,libdir)
92 so        = $(call get_tok,library_names)
93 a         = $(call get_tok,old_library)
94
95 if HAVE_WIN32
96 SO_PREFIX = (DLL)
97 dll       = $(call get_tok,dlname)
98 else
99 if HAVE_DARWIN
100 SO_PREFIX = (DY)
101 dll       =
102 else
103 SO_PREFIX = (SO)
104 dll       =
105 endif
106 endif