All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] stubdom: add C example target
Date: Wed, 19 Mar 2008 16:18:45 +0000	[thread overview]
Message-ID: <20080319161845.GD9372@implementation.uk.xensource.com> (raw)

stubdom: add C example target

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

diff -r 7d8892a90c90 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile	Wed Mar 19 14:13:17 2008 +0000
+++ b/extras/mini-os/Makefile	Wed Mar 19 16:12:04 2008 +0000
@@ -88,6 +88,11 @@
 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
 endif
 
-ifneq ($(caml)-$(qemu)-$(lwip),--y)
+ifneq ($(caml)-$(qemu)-$(CDIR)-$(lwip),---y)
 OBJS := $(filter-out daytime.o, $(OBJS))
 endif
 
--- a/stubdom/Makefile	Wed Mar 19 14:13:17 2008 +0000
+++ b/stubdom/Makefile	Wed Mar 19 16:12:04 2008 +0000
@@ -201,6 +201,14 @@
 caml:
 	$(MAKE) -C $@
 
+###
+# C
+###
+
+.PHONY: c
+c:
+	$(MAKE) -C $@
+
 ########
 # minios
 ########
@@ -211,7 +219,11 @@
 
 .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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubdom/c/Makefile	Wed Mar 19 16:12:04 2008 +0000
@@ -0,0 +1,9 @@
+XEN_ROOT = ../..
+
+include $(XEN_ROOT)/Config.mk
+
+main.a: main.o
+	$(AR) cr $@ $^
+
+clean:
+	rm -f *.a *.o
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubdom/c/main.c	Wed Mar 19 16:12:04 2008 +0000
@@ -0,0 +1,6 @@
+#include <stdio.h>
+int main(void) {
+        sleep(2);
+        printf("Hello, world!\n");
+        return 0;
+}

                 reply	other threads:[~2008-03-19 16:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080319161845.GD9372@implementation.uk.xensource.com \
    --to=samuel.thibault@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.