stubdom: add C example target

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
This commit is contained in:
Keir Fraser committed 2008-03-19 16:21:39 +00:00
1 parent ac23908a0d
commit 98c2b2bd1e
4 files changed
+34 -2

No files matched your search

+6 -1
View File
@@ -88,6 +88,11 @@ OBJS += $(QEMUDIR)/i386-dm-stubdom/qemu.a $(QEMUDIR)/i386-dm-stubdom/libqemu.a
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 += -lz
LDLIBS += -lc
endif
ifneq ($(caml)-$(qemu)-$(lwip),--y)
ifneq ($(caml)-$(qemu)-$(CDIR)-$(lwip),---y)
OBJS := $(filter-out daytime.o, $(OBJS))
endif
+13 -1
View File
@@ -201,6 +201,14 @@ ioemu: cross-zlib cross-libpci mk-symlinks libxc
caml:
$(MAKE) -C $@
###
# C
###
.PHONY: c
c:
$(MAKE) -C $@
########
# minios
########
@@ -211,7 +219,11 @@ qemu-stubdom: mk-symlinks lwip-cvs libxc ioemu
.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
+9
View File
@@ -0,0 +1,9 @@
XEN_ROOT = ../..
include $(XEN_ROOT)/Config.mk
main.a: main.o
$(AR) cr $@ $^
clean:
rm -f *.a *.o
+6
View File
@@ -0,0 +1,6 @@
#include <stdio.h>
int main(void) {
sleep(2);
printf("Hello, world!\n");
return 0;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.