1 # libguestfs Haskell bindings
2 # Copyright (C) 2009 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 include $(top_srcdir)/subdir-rules.mk
24 # $(generator_built) isn't redundant below as the wildcard rule won't match, and
25 # therefore won't generate, the files if they haven't been created yet
26 EXTRA_DIST = $(generator_built) *.hs run-bindtests
31 LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
32 LIBGUESTFS_PATH=$(top_builddir)/appliance \
35 TESTS = run-bindtests Guestfs005Load Guestfs010Basic
37 check_DATA = Bindtests
39 GHCFLAGS = -I$(top_builddir)/src -L$(top_builddir)/src/.libs
41 all_targets = Bindtests Guestfs005Load Guestfs010Basic
42 $(all_targets): $(top_builddir)/src/libguestfs.la
47 $(GHC) $(GHCFLAGS) -c $<
49 Bindtests: Bindtests.hs Guestfs.o
50 $(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
52 Guestfs005Load: Guestfs005Load.hs Guestfs.o
53 $(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
55 Guestfs010Basic: Guestfs010Basic.hs Guestfs.o
56 $(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
58 CLEANFILES = $(all_targets) *~ *.hi *.o