Daemon and library are mostly talking to each other now.
[libguestfs.git] / src / Makefile.am
index a0066db..68cabba 100644 (file)
 
 lib_LTLIBRARIES = libguestfs.la
 
 
 lib_LTLIBRARIES = libguestfs.la
 
-libguestfs_la_SOURCES = guestfs.c guestfs.h
-libguestfs_la_CFLAGS = -Wall -Werror
\ No newline at end of file
+# NB. guestfs-actions.c is #include'd into guestfs.c, so it should not
+# be listed as a source file.
+EXTRA_DIST = guestfs-actions.c
+
+libguestfs_la_SOURCES = \
+       guestfs.c \
+       guestfs.h \
+       guestfs_protocol.c \
+       guestfs_protocol.h \
+       guestfs-actions.h
+
+libguestfs_la_CFLAGS = -Wall
+
+if 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
\ No newline at end of file