Bugfixes
[rtl-433.git] / Makefile.am
1 AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
2 ACLOCAL_AMFLAGS = -I m4
3
4 INCLUDES = $(all_includes) -I$(top_srcdir)/include
5 SUBDIRS = include src
6
7 pkgconfigdir = $(libdir)/pkgconfig
8 pkgconfig_DATA = rtl433.pc
9
10 BUILT_SOURCES = $(top_srcdir)/.version
11 $(top_srcdir)/.version:
12         echo $(VERSION) > $@-t && mv $@-t $@
13 dist-hook:
14         echo $(VERSION) > $(distdir)/.tarball-version
15
16 EXTRA_DIST = git-version-gen
17
18 if HAVE_DOXYGEN
19
20 pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION)
21 doc_htmldir=$(pkgdocdir)/html
22
23 doc_html_DATA = $(top_builddir)/doc/html.tar
24
25 $(doc_html_DATA): $(top_builddir)/doc/html/index.html
26         cd $(top_builddir)/doc && tar cf html.tar html
27
28 $(top_builddir)/doc/html/index.html: $(SOURCES) Doxyfile
29         @rm -rf doc
30         mkdir -p doc
31         $(DOXYGEN) Doxyfile
32
33 install-data-hook:
34         cd $(DESTDIR)$(doc_htmldir) && tar xf html.tar --strip-components 1 && rm -f html.tar
35
36 uninstall-hook:
37         cd $(DESTDIR) && rm -rf $(doc_htmldir)
38
39 DX_CLEAN = doc/{html,latex}/* doc/html.tar
40
41 endif
42
43 MOSTLYCLEANFILES = $(DX_CLEAN)