aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2011-10-15 00:29:47 +0200
committerSylvain Munaut <tnt@246tNt.com>2011-10-15 16:53:51 +0200
commitf95ac67d650851366d1069083dd14c33fd7af99c (patch)
treeb5f137b9f42ee79fa04216aac4be6d7e9881bf5f /Makefile.am
parent7c73e82a2b2d94854267a54a49bf119998982fff (diff)
build: Add all the autotools 'magic'
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am43
1 files changed, 43 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..aa66251
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,43 @@
+AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
+ACLOCAL_AMFLAGS = -I m4
+
+INCLUDES = $(all_includes) -I$(top_srcdir)/include
+SUBDIRS = include src
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libosmosdr.pc
+
+BUILT_SOURCES = $(top_srcdir)/.version
+$(top_srcdir)/.version:
+ echo $(VERSION) > $@-t && mv $@-t $@
+dist-hook:
+ echo $(VERSION) > $(distdir)/.tarball-version
+
+EXTRA_DIST = git-version-gen
+
+if HAVE_DOXYGEN
+
+pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION)
+doc_htmldir=$(pkgdocdir)/html
+
+doc_html_DATA = $(top_builddir)/doc/html.tar
+
+$(doc_html_DATA): $(top_builddir)/doc/html/index.html
+ cd $(top_builddir)/doc && tar cf html.tar html
+
+$(top_builddir)/doc/html/index.html: $(SOURCES) Doxyfile
+ @rm -rf doc
+ mkdir -p doc
+ $(DOXYGEN) Doxyfile
+
+install-data-hook:
+ cd $(DESTDIR)$(doc_htmldir) && tar xf html.tar --strip-components 1 && rm -f html.tar
+
+uninstall-hook:
+ cd $(DESTDIR) && rm -rf $(doc_htmldir)
+
+DX_CLEAN = doc/{html,latex}/* doc/html.tar
+
+endif
+
+MOSTLYCLEANFILES = $(DX_CLEAN)