WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] stubdom: add C example target

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] stubdom: add C example target
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:41:17 -0700
Delivery-date: Thu, 20 Mar 2008 05:46:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205943699 0
# Node ID edfd0c343b13e76f04b6dc491be30464f0fe6216
# Parent  e690252848326b7564ff5a3a98950fecf7dd53c1
stubdom: add C example target

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 extras/mini-os/Makefile |    7 ++++++-
 stubdom/Makefile        |   14 +++++++++++++-
 stubdom/c/Makefile      |    9 +++++++++
 stubdom/c/main.c        |    6 ++++++
 4 files changed, 34 insertions(+), 2 deletions(-)

diff -r e69025284832 -r edfd0c343b13 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile   Wed Mar 19 16:21:01 2008 +0000
+++ b/extras/mini-os/Makefile   Wed Mar 19 16:21:39 2008 +0000
@@ -88,6 +88,11 @@ CFLAGS += -DCONFIG_QEMU
 CFLAGS += -DCONFIG_QEMU
 endif
 
+ifneq ($(CDIR),)
+OBJS += $(CDIR)/main.a
+LDLIBS += 
+endif
+
 ifeq ($(libc),y)
 LDLIBS += -L$(XEN_ROOT)/stubdom/libxc -lxenctrl -lxenguest
 LDLIBS += -lpci
@@ -95,7 +100,7 @@ LDLIBS += -lc
 LDLIBS += -lc
 endif
 
-ifneq ($(caml)-$(qemu)-$(lwip),--y)
+ifneq ($(caml)-$(qemu)-$(CDIR)-$(lwip),---y)
 OBJS := $(filter-out daytime.o, $(OBJS))
 endif
 
diff -r e69025284832 -r edfd0c343b13 stubdom/Makefile
--- a/stubdom/Makefile  Wed Mar 19 16:21:01 2008 +0000
+++ b/stubdom/Makefile  Wed Mar 19 16:21:39 2008 +0000
@@ -201,6 +201,14 @@ caml:
 caml:
        $(MAKE) -C $@
 
+###
+# C
+###
+
+.PHONY: c
+c:
+       $(MAKE) -C $@
+
 ########
 # minios
 ########
@@ -211,7 +219,11 @@ qemu-stubdom: mk-symlinks lwip-cvs libxc
 
 .PHONY: caml-stubdom
 caml-stubdom: mk-symlinks lwip-cvs libxc cross-libpci caml
-       $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwia-cvs CAMLDIR=$(CURDIR)/caml
+       $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs CAMLDIR=$(CURDIR)/caml
+
+.PHONY: c-stubdom
+c-stubdom: mk-symlinks lwip-cvs libxc cross-libpci c
+       $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs CDIR=$(CURDIR)/c
 
 #########
 # install
diff -r e69025284832 -r edfd0c343b13 stubdom/c/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/stubdom/c/Makefile        Wed Mar 19 16:21:39 2008 +0000
@@ -0,0 +1,9 @@
+XEN_ROOT = ../..
+
+include $(XEN_ROOT)/Config.mk
+
+main.a: main.o
+       $(AR) cr $@ $^
+
+clean:
+       rm -f *.a *.o
diff -r e69025284832 -r edfd0c343b13 stubdom/c/main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/stubdom/c/main.c  Wed Mar 19 16:21:39 2008 +0000
@@ -0,0 +1,6 @@
+#include <stdio.h>
+int main(void) {
+        sleep(2);
+        printf("Hello, world!\n");
+        return 0;
+}

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] stubdom: add C example target, Xen patchbot-unstable <=