summaryrefslogtreecommitdiffstats
path: root/erlang/Makefile.am
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-09-20 18:03:58 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-09-21 15:21:58 +0100
commit84763d7fca3668c62ee3fe53d0e00a5a672f687b (patch)
tree823b91a69e995438e4af670099408d3285a02176 /erlang/Makefile.am
parent917f947590c92318fee2545ba88245d0de012e31 (diff)
downloadlibguestfs-84763d7fca3668c62ee3fe53d0e00a5a672f687b.tar.gz
libguestfs-84763d7fca3668c62ee3fe53d0e00a5a672f687b.tar.xz
libguestfs-84763d7fca3668c62ee3fe53d0e00a5a672f687b.zip
Add Erlang bindings.
Diffstat (limited to 'erlang/Makefile.am')
-rw-r--r--erlang/Makefile.am54
1 files changed, 54 insertions, 0 deletions
diff --git a/erlang/Makefile.am b/erlang/Makefile.am
new file mode 100644
index 00000000..933e6026
--- /dev/null
+++ b/erlang/Makefile.am
@@ -0,0 +1,54 @@
+# libguestfs Erlang bindings
+# Copyright (C) 2011 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+include $(top_srcdir)/subdir-rules.mk
+
+generator_built = \
+ guestfs.erl \
+ erl-guestfs.c
+
+EXTRA_DIST = \
+ $(generator_built) \
+ README
+
+if HAVE_ERLANG
+
+erlang_bindir = $(libdir)/erlang/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin
+
+erlang_bin_DATA = guestfs.beam
+
+guestfs.beam: guestfs.erl
+ $(ERLC) +debug_info guestfs.erl
+
+bin_PROGRAMS = erl-guestfs
+
+erl_guestfs_SOURCES = erl-guestfs.c erl-guestfs-proto.c
+
+erl_guestfs_CFLAGS = \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
+ -I$(ERL_INTERFACEDIR)/include \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS)
+
+erl_guestfs_LDADD = \
+ $(ERL_INTERFACEDIR)/lib/liberl_interface.a \
+ $(ERL_INTERFACEDIR)/lib/libei.a \
+ -lpthread \
+ $(top_builddir)/src/libguestfs.la \
+ ../gnulib/lib/libgnu.la
+
+endif