#
# 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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include $(top_srcdir)/subdir-rules.mk
check_DATA = Bindtests
-GHCFLAGS = -I$(top_builddir)/src -L$(top_builddir)/src/.libs
+GHCFLAGS = -I$(top_builddir)/src -L$(top_builddir)/src/.libs -i$(srcdir)
all_targets = Bindtests Guestfs005Load Guestfs010Basic
$(all_targets): $(top_builddir)/src/libguestfs.la
all: $(all_targets)
-Guestfs.o: Guestfs.hs
- $(GHC) $(GHCFLAGS) -c $<
+Guestfs.o: $(srcdir)/Guestfs.hs
+ $(GHC) $(GHCFLAGS) -c $< -o $@
-Bindtests: Bindtests.hs Guestfs.o
+Bindtests: $(srcdir)/Bindtests.hs Guestfs.o
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
-Guestfs005Load: Guestfs005Load.hs Guestfs.o
+Guestfs005Load: $(srcdir)/Guestfs005Load.hs Guestfs.o
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
-Guestfs010Basic: Guestfs010Basic.hs Guestfs.o
+Guestfs010Basic: $(srcdir)/Guestfs010Basic.hs Guestfs.o
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
CLEANFILES = $(all_targets) *~ *.hi *.o