static: Use correct libraries for static binaries.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 13 Nov 2010 08:13:18 +0000 (08:13 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 13 Nov 2010 08:13:22 +0000 (08:13 +0000)
Also add virt-cat.static target.

.gitignore
Makefile.am
cat/Makefile.am
fish/Makefile.am
fuse/Makefile.am
test-tool/Makefile.am

index d69dd3c..be792c9 100644 (file)
@@ -33,6 +33,7 @@ capitests/tests.c
 capitests/test*.tmp
 cat/virt-cat
 cat/virt-cat.1
+cat/virt-cat.static
 ChangeLog
 *.class
 *.cma
index 5aa1a54..6f17146 100644 (file)
@@ -253,5 +253,7 @@ bindist:
        cp fuse/guestmount.static $(BINTMPDIR)$(bindir)/guestmount
        $(MAKE) -C test-tool libguestfs-test-tool.static
        cp test-tool/libguestfs-test-tool.static $(BINTMPDIR)$(bindir)/libguestfs-test-tool
+       $(MAKE) -C cat virt-cat.static
+       cp cat/virt-cat.static $(BINTMPDIR)$(bindir)/virt-cat
        (cd $(BINTMPDIR) && tar cf - .) | \
          gzip -c -9 > libguestfs-$(VERSION)-$(host_cpu).tar.gz
index a8e9b31..63064e6 100644 (file)
@@ -76,3 +76,9 @@ TESTS_ENVIRONMENT = \
        LIBGUESTFS_PATH=$(top_builddir)/appliance
 
 TESTS = test-virt-cat.sh
+
+# Build a partly-static library (for the binary distribution).
+
+virt-cat.static$(EXEEXT): $(virt_cat_OBJECTS) $(virt_cat_DEPENDENCIES)
+       $(top_srcdir)/relink-static.sh \
+       $(virt_cat_LINK) $(virt_cat_OBJECTS) -static $(virt_cat_LDADD) $(virt_cat_LIBS) $(LIBVIRT_LIBS) $(LIBXML2_LIBS) -lpcre -lhivex -lmagic -lz -lm
index 6debdce..2d8c16b 100644 (file)
@@ -130,7 +130,7 @@ endif
 
 guestfish.static$(EXEEXT): $(guestfish_OBJECTS) $(guestfish_DEPENDENCIES)
        $(top_srcdir)/relink-static.sh \
-       $(guestfish_LINK) $(guestfish_OBJECTS) -static $(guestfish_LDADD) $(guestfish_LIBS) -ltinfo -lpcre -lhivex -lmagic -lz -lm
+       $(guestfish_LINK) $(guestfish_OBJECTS) -static $(guestfish_LDADD) $(guestfish_LIBS) $(LIBVIRT_LIBS) $(LIBXML2_LIBS) -ltinfo -lpcre -lhivex -lmagic -lz -lm
 
 # Manual page.
 # guestfish-actions.pod and guestfish-commands.pod are autogenerated.
index 0a1d9da..5fe57bb 100644 (file)
@@ -57,7 +57,7 @@ guestmount_LDADD = \
 
 guestmount.static$(EXEEXT): $(guestmount_OBJECTS) $(guestmount_DEPENDENCIES)
        $(top_srcdir)/relink-static.sh \
-       $(guestmount_LINK) $(guestmount_OBJECTS) -static $(guestmount_LDADD) $(guestmount_LIBS) -lpcre -lhivex -lmagic -lz -lm
+       $(guestmount_LINK) $(guestmount_OBJECTS) -static $(guestmount_LDADD) $(guestmount_LIBS) $(LIBVIRT_LIBS) $(LIBXML2_LIBS) -lpcre -lhivex -lmagic -lz -lm
 
 # Documentation.
 
index ee2f2ff..c28d131 100644 (file)
@@ -43,7 +43,7 @@ libguestfs_test_tool_helper_LDFLAGS = -all-static
 
 libguestfs-test-tool.static$(EXEEXT): $(libguestfs_test_tool_OBJECTS) $(libguestfs_test_tool_DEPENDENCIES)
        $(top_srcdir)/relink-static.sh \
-       $(libguestfs_test_tool_LINK) $(libguestfs_test_tool_OBJECTS) -static $(libguestfs_test_tool_LDADD) $(libguestfs_test_tool_LIBS) -lpcre -lhivex -lmagic -lz
+       $(libguestfs_test_tool_LINK) $(libguestfs_test_tool_OBJECTS) -static $(libguestfs_test_tool_LDADD) $(libguestfs_test_tool_LIBS) $(LIBVIRT_LIBS) $(LIBXML2_LIBS) -lpcre -lhivex -lmagic -lz -lm
 
 libguestfs-test-tool.1: libguestfs-test-tool.pod
        $(POD2MAN) \