* [PATCH] stubdom: add C example target
@ 2008-03-19 16:18 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2008-03-19 16:18 UTC (permalink / raw)
To: xen-devel
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;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-19 16:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 16:18 [PATCH] stubdom: add C example target Samuel Thibault
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.