forked from libguestfs/libguestfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
115 lines (97 loc) · 2.82 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include $(top_srcdir)/subdir-rules.mk
generator_built = \
bindtests.erl \
actions-0.c \
actions-1.c \
actions-2.c \
actions-3.c \
actions-4.c \
actions-5.c \
actions-6.c \
actions.h \
dispatch.c \
structs.c \
guestfs.erl
EXTRA_DIST = \
$(generator_built) \
run-bindtests \
tests/*.erl \
README
CLEANFILES += \
$(erlang_bin_DATA)
# Erlang makes a new libguestfs-<VERSION>/ebin subdirectory each time
# we build, so we have to remove that and any previous copies.
clean-local:
rm -rf libguestfs-1.*
if HAVE_ERLANG
erlang_bindir = $(ERLANG_LIB_DIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin
erlang_bin_DATA = guestfs.beam
# In order for the tests to work on the local copy, we have to create
# a phony directory hierarchy:
#
# $(builddir)/erlang/libguestfs-$(VERSION)/ebin/guestfs.beam
#
# The ./run script will set $ERL_LIBS to point to $(builddir)/erlang.
# (See: http://www.erlang.org/doc/man/code.html)
guestfs.beam: guestfs.erl
$(guestfs_am_v_erlc)$(ERLC) +debug_info $^
mkdir -p $(PACKAGE)-$(VERSION)/ebin
cp $@ $(PACKAGE)-$(VERSION)/ebin
bin_PROGRAMS = erl-guestfs
erl_guestfs_SOURCES = \
actions-0.c \
actions-1.c \
actions-2.c \
actions-3.c \
actions-4.c \
actions-5.c \
actions-6.c \
actions.h \
dispatch.c \
structs.c \
main.c
erl_guestfs_CPPFLAGS = \
-DGUESTFS_PRIVATE=1 \
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
-I$(srcdir)/../gnulib/lib -I../gnulib/lib \
-I$(ERLANG_LIB_DIR_erl_interface)/include
erl_guestfs_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS)
erl_guestfs_LDADD = \
$(ERLANG_LIB_DIR_erl_interface)/lib/liberl_interface.a \
$(ERLANG_LIB_DIR_erl_interface)/lib/libei.a \
-lpthread \
$(top_builddir)/common/utils/libutils.la \
$(top_builddir)/lib/libguestfs.la \
$(LIBXML2_LIBS) \
$(LIBVIRT_LIBS) \
$(LTLIBINTL) \
../gnulib/lib/libgnu.la
TESTS_ENVIRONMENT = $(top_builddir)/run --test
TESTS = run-bindtests
if ENABLE_APPLIANCE
TESTS += \
tests/010-load.erl \
tests/030-config.erl \
tests/050-lvcreate.erl \
tests/060-readdir.erl \
tests/070-optargs.erl
endif
endif