diff options
author | Richard Jones <rjones@redhat.com> | 2009-11-26 11:01:01 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-11-26 11:27:45 +0000 |
commit | 929ba5a843722ab490dd6c8d6f38daf0a1858533 (patch) | |
tree | 91da52c3475c1f34184349f7f6c766fea791ec29 /daemon/Makefile.am | |
parent | 12f3e9780f2f35f6b81da8eb90ff24dd9ac93253 (diff) | |
download | libguestfs-929ba5a843722ab490dd6c8d6f38daf0a1858533.tar.gz libguestfs-929ba5a843722ab490dd6c8d6f38daf0a1858533.tar.xz libguestfs-929ba5a843722ab490dd6c8d6f38daf0a1858533.zip |
daemon: Link guestfs_protocol.[ch] into the daemon directory.
Instead of doing a recursive call into the src/ directory to build
the object files, hard link the source files into the daemon
directory and build them separately.
See:
http://www.redhat.com/archives/libguestfs/2009-November/msg00254.html
Thanks to Jim Meyering for noticing a typo in the original version.
Diffstat (limited to 'daemon/Makefile.am')
-rw-r--r-- | daemon/Makefile.am | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 485f3408..103e49d9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -32,12 +32,31 @@ $(generator_built): $(libsrcdir)/stamp-generator $(libsrcdir)/stamp-generator: force $(MAKE) -C $(libsrcdir) stamp-generator -BUILT_SOURCES = $(generator_built) +BUILT_SOURCES = \ + $(generator_built) \ + guestfs_protocol.c \ + guestfs_protocol.h EXTRA_DIST = $(BUILT_SOURCES) -$(libsrcdir)/guestfs_protocol.o: force - $(MAKE) -C $(libsrcdir) guestfs_protocol.o +# This convenience library is solely to avoid compiler warnings +# in its generated sources. +noinst_LIBRARIES = libprotocol.a +libprotocol_a_SOURCES = \ + guestfs_protocol.c \ + guestfs_protocol.h +libprotocol_a_CFLAGS = + +guestfs_protocol.c: $(libsrcdir)/guestfs_protocol.c + rm -f $@ + ln $< $@ +guestfs_protocol.h: $(libsrcdir)/guestfs_protocol.h + rm -f $@ + ln $< $@ +$(libsrcdir)/guestfs_protocol.c: force + $(MAKE) -C $(libsrcdir) guestfs_protocol.c +$(libsrcdir)/guestfs_protocol.h: force + $(MAKE) -C $(libsrcdir) guestfs_protocol.h noinst_PROGRAMS = guestfsd guestfsd_SOURCES = \ @@ -110,8 +129,8 @@ guestfsd_SOURCES = \ zero.c \ zerofree.c guestfsd_LDADD = \ - $(libsrcdir)/guestfs_protocol.o \ - lib/libgnu.a $(LIB_CLOCK_GETTIME) + libprotocol.a \ + lib/libgnu.a $(LIB_CLOCK_GETTIME) AM_CPPFLAGS = -I$(srcdir)/lib -Ilib guestfsd_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) |