summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-17 18:44:37 +0200
committerJim Meyering <meyering@redhat.com>2009-08-18 10:06:33 +0200
commit5a07cdc35856adfa25b8d0924a8d641b2320aadf (patch)
treeb218421e3f0a8e64e01880aea324e8ba629f1a30 /src/Makefile.am
parent24a6cf4533118e04367f7fcdc6eadaa4e2dfbc56 (diff)
downloadlibguestfs-5a07cdc35856adfa25b8d0924a8d641b2320aadf.tar.gz
libguestfs-5a07cdc35856adfa25b8d0924a8d641b2320aadf.tar.xz
libguestfs-5a07cdc35856adfa25b8d0924a8d641b2320aadf.zip
avoid compiler warnings about unused vars in generated code
* src/Makefile.am: Compile protocol.c into a convenience library, so it can have its own CFLAGS, and link that with the destination one.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c6006d2b..9eb71b9a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,6 +48,14 @@ BUILT_SOURCES = \
guestfs-actions.c \
guestfs-bindtests.c
+# This convenience library is solely to avoid compiler warnings
+# in its generated sources.
+libprotocol_la_SOURCES = \
+ guestfs_protocol.c \
+ guestfs_protocol.h
+
+libprotocol_la_CFLAGS = -Wall -Wno-unused
+
$(BUILT_SOURCES): stamp-generator
CLEANFILES = guestfs_protocol.c guestfs_protocol.h
@@ -98,13 +106,15 @@ libguestfs_la_LDFLAGS = -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR)
libguestfs_la_SOURCES = \
guestfs.c \
guestfs.h \
- guestfs_protocol.c \
- guestfs_protocol.h \
guestfs-actions.h \
guestfs-actions.c \
guestfs-bindtests.c \
gettext.h
+# Make libguestfs include the convenience library.
+noinst_LTLIBRARIES = libprotocol.la
+libguestfs_la_LIBADD = libprotocol.la
+
libguestfs_la_CFLAGS = -Wall -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
if HAVE_RPCGEN