initvm: add targets to the Makefile to support compilation and install
authorJames Perkins <james.perkins@linuxfoundation.org>
Sat, 18 Sep 2010 00:09:34 +0000 (17:09 -0700)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Sun, 20 Mar 2011 19:18:09 +0000 (20:18 +0100)
Packaging can now make use of new initvm-build and initvm-install
targets.

Signed-off-by: James Perkins <james.perkins@linuxfoundation.org>
Makefile

index 6c05a47..46f72ef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,7 @@ install:
            unrpm \
            $(DESTDIR)$(pkglibdir)
        install -m644 Build/*.pm $(DESTDIR)$(pkglibdir)/Build
+       install -m644 qemu-reg $(DESTDIR)$(pkglibdir)
        install -m644 *.pm baselibs_global*.conf $(DESTDIR)$(pkglibdir)
        install -m644 configs/* $(DESTDIR)$(pkglibdir)/configs
        install -m644 build.1 $(DESTDIR)$(man1dir)
@@ -66,6 +67,22 @@ install:
        ln -sf $(pkglibdir)/vc    $(DESTDIR)$(bindir)/buildvc
        ln -sf $(pkglibdir)/unrpm $(DESTDIR)$(bindir)/unrpm
 
+# Allow initvm to be packaged seperately from the rest of build.  This
+# is useful because it is distributed as a static binary package (e.g.
+# build-initvm-static) whereas the build scripts package is noarch.
+
+initvm: initvm.c
+       $(CC) -o $@ -static $(CFLAGS) initvm.c
+
+initvm-all: initvm
+
+initvm-build: initvm
+
+initvm-install: initvm
+       install -m755 -d $(DESTDIR)$(pkglibdir)
+       install -m755 initvm $(DESTDIR)$(pkglibdir)/initvm
+
+
 dist:
 ifeq ($(SCM),svn)
        rm -rf $(BUILD)-$(VERSION)$(SVNVER)