[1.5] fix output when --disable-shared or --disable-static is
[openjpeg.git] / applications / jpip / libopenjpip / Makefile.am
1 MAINTAINERCLEANFILES = Makefile.in
2
3 includesdir = $(includedir)/openjpeg-$(MAJOR_NR).$(MINOR_NR)
4 includes_HEADERS = 
5
6 lib_LTLIBRARIES = libopenjpip_server.la libopenjpip_local.la
7
8 JPIP_SRC = \
9 boxheader_manager.c \
10 codestream_manager.c \
11 imgreg_manager.c \
12 marker_manager.c \
13 msgqueue_manager.c \
14 box_manager.c \
15 faixbox_manager.c \
16 index_manager.c \
17 metadata_manager.c \
18 placeholder_manager.c \
19 byte_manager.c \
20 ihdrbox_manager.c \
21 manfbox_manager.c \
22 mhixbox_manager.c \
23 target_manager.c \
24 cachemodel_manager.c \
25 bool.h \
26 boxheader_manager.h \
27 box_manager.h \
28 byte_manager.h \
29 codestream_manager.h \
30 faixbox_manager.h \
31 ihdrbox_manager.h \
32 imgreg_manager.h \
33 index_manager.h \
34 manfbox_manager.h \
35 marker_manager.h \
36 metadata_manager.h \
37 mhixbox_manager.h \
38 msgqueue_manager.h \
39 placeholder_manager.h \
40 target_manager.h \
41 cachemodel_manager.h
42
43 libopenjpip_server_la_CPPFLAGS = \
44 -I. \
45 -I$(top_srcdir)/applications/jpip/libopenjpip \
46 -I$(top_builddir)/applications/jpip/libopenjpip \
47 @FCGI_CFLAGS@ \
48 -DSERVER
49 libopenjpip_server_la_CFLAGS =
50 libopenjpip_server_la_LIBADD = @FCGI_LIBS@ -lm
51 libopenjpip_server_la_LDFLAGS = -no-undefined -version-info @lt_version@
52 libopenjpip_server_la_SOURCES = $(JPIP_SRC)
53
54 libopenjpip_local_la_CPPFLAGS = \
55 -I. \
56 -I$(top_srcdir)/applications/jpip/libopenjpip \
57 -I$(top_builddir)/applications/jpip/libopenjpip
58 libopenjpip_local_la_CFLAGS =
59 libopenjpip_local_la_LIBADD = -lm
60 libopenjpip_local_la_LDFLAGS = -no-undefined -version-info @lt_version@
61 libopenjpip_local_la_SOURCES = $(JPIP_SRC)
62
63 install-data-hook:
64         @echo -e " (LA)\t$(libdir)/libopenjpip_server.la" >> $(top_builddir)/report.txt
65 if BUILD_SHARED
66         @( $(call solist_s) ) >> $(top_builddir)/report.txt
67 endif
68 if BUILD_STATIC
69         @echo -e " (A)\t$(base_s)/$(a_s)" >> $(top_builddir)/report.txt
70 endif
71         @echo -e " (LA)\t$(libdir)/libopenjpip_local.la" >> $(top_builddir)/report.txt
72 if BUILD_SHARED
73         @( $(call solist_c) ) >> $(top_builddir)/report.txt
74 endif
75 if BUILD_STATIC
76         @echo -e " (A)\t$(base_c)/$(a_c)" >> $(top_builddir)/report.txt
77 endif
78
79 solist_s    = $(foreach f, $(dll_s) $(so_s), echo -e ' $(SO_PREFIX)\t$(base_s)/$(f)' ;)
80 get_tok_s   = $(shell grep -E "^$(1)=" libopenjpip_server.la | cut -d "'" -f 2)
81 base_s      = $(call get_tok_s,libdir)
82 so_s        = $(call get_tok_s,library_names)
83 a_s         = $(call get_tok_s,old_library)
84
85 solist_c    = $(foreach f, $(dll_c) $(so_c), echo -e ' $(SO_PREFIX)\t$(base_c)/$(f)' ;)
86 get_tok_c   = $(shell grep -E "^$(1)=" libopenjpip_local.la | cut -d "'" -f 2)
87 base_c      = $(call get_tok_c,libdir)
88 so_c        = $(call get_tok_c,library_names)
89 a_c         = $(call get_tok_c,old_library)
90
91 if HAVE_WIN32
92 SO_PREFIX = (DLL)
93 dll_s     = $(call get_tok_s,dlname)
94 dll_c     = $(call get_tok_c,dlname)
95 else
96 if HAVE_DARWIN
97 SO_PREFIX = (DY)
98 dll_s     =
99 dll_c     =
100 else
101 SO_PREFIX = (SO)
102 dll_s     =
103 dll_c     =
104 endif
105 endif