1# $Id: Makefile.am,v 1.13 2008/08/14 02:18:22 asuraparaju Exp $
2#
3
4INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(top_builddir)
5
6h_sources = comp_decompress.h picture_decompress.h seq_decompress.h \
7            decoder_types.h dirac_cppparser.h dirac_parser.h
8
9cpp_sources = comp_decompress.cpp picture_decompress.cpp seq_decompress.cpp \
10             dirac_cppparser.cpp dirac_parser.cpp
11
12if USE_MSVC
13lib_LIBRARIES = libdirac_decoder.a
14libdirac_decoder_a_AR = link -lib -out:libdirac_decoder.a $(libdirac_decoder_a_OBJECTS); link $(LIBFLAGS) -out:libdirac_decoder$(LIBEXT) $(LDFLAGS) $(libdirac_decoder_a_OBJECTS) $(libdirac_decoder_a_DEPENDENCIES); echo
15else
16lib_LTLIBRARIES = libdirac_decoder.la
17endif
18libdirac_decoder_a_SOURCES = $(h_sources) $(cpp_sources)
19
20libdirac_decoder_a_LIBADD = \
21               $(top_builddir)/libdirac_common/libdirac_common.a \
22               $(top_builddir)/libdirac_byteio/libdirac_byteio.a
23
24libdirac_decoder_la_SOURCES = $(h_sources) $(cpp_sources)
25libdirac_decoder_la_CXXFLAGS = $(AM_CXXFLAGS)
26
27libdirac_decoder_la_LIBADD = $(top_builddir)/libdirac_common/libdirac_common.la $(top_builddir)/libdirac_byteio/libdirac_byteio.la
28
29libdirac_decoder_la_LDFLAGS= -no-undefined -version-info $(GENERIC_LIBRARY_VERSION) -export-symbols-regex '^dirac_'
30
31library_includedir=$(includedir)/$(GENERIC_LIBRARY_NAME)/libdirac_decoder
32library_include_HEADERS = dirac_parser.h decoder_types.h
33
34if USE_MSVC
35install-exec-local: libdirac_decoder.lib
36	    $(mkinstalldirs) "$(DESTDIR)$(libdir)"; \
37	    echo " $(INSTALL_PROGRAM) libdirac_decoder.lib $(DESTDIR)$(libdir)/libdirac_decoder.lib"; \
38	    $(INSTALL_PROGRAM) libdirac_decoder.lib $(DESTDIR)$(libdir)/libdirac_decoder.lib || exit 1; \
39	for ext in dll pdb; do \
40	  file="libdirac_decoder.$$ext"; \
41	  if test -f "$$file"; then \
42	    $(mkinstalldirs) "$(DESTDIR)$(bindir)"; \
43	    echo " $(INSTALL_PROGRAM) $$file $(DESTDIR)$(bindir)/$$file"; \
44	    $(INSTALL_PROGRAM) "$$file" "$(DESTDIR)$(bindir)/$$file" || exit 1; \
45	  fi \
46	done
47
48uninstall-local:
49	for file in \
50	  "$(DESTDIR)$(bindir)/libdirac_decoder.dll" \
51	  "$(DESTDIR)$(bindir)/libdirac_decoder.pdb" \
52	  "$(DESTDIR)$(libdir)/libdirac_decoder.lib"; \
53	  do \
54	  if test -f "$$file"; then \
55	    echo " rm -f" "$$file"; \
56	    rm -f "$$file"; \
57	  fi \
58	done
59endif
60if USE_MSVC
61CLEANFILES = *.pdb *.ilk *.dll *.lib *.exp *.a
62endif
63