+libguestfs_la_LDFLAGS = -version-info 0:0:0
+libguestfs_la_SOURCES = \
+ guestfs.c \
+ guestfs.h \
+ guestfs_protocol.c \
+ guestfs_protocol.h \
+ guestfs-actions.h \
+ guestfs-actions.c \
+ guestfs-bindtests.c \
+ gettext.h
+
+libguestfs_la_CFLAGS = -Wall -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
+
+if HAVE_RPCGEN
+guestfs_protocol.c: guestfs_protocol.x
+ rm -f $@-t
+ $(RPCGEN) -c -o $@-t $<
+ mv $@-t $@
+
+guestfs_protocol.h: guestfs_protocol.x
+ rm -f $@-t
+ $(RPCGEN) -h -o $@-t $<
+ mv $@-t $@
+endif