aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom/Makefile
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-05-28 09:30:48 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-05-28 09:30:48 +0100
commitf9b4231a673d75dd6404ac5df8a47adc04437e6b (patch)
tree67d37f19b98706274ec6af9245082f25622341a8 /stubdom/Makefile
parent4151cc56f19b3fe8aabde12ddf532cd9502c637d (diff)
downloadxen-f9b4231a673d75dd6404ac5df8a47adc04437e6b.tar.gz
xen-f9b4231a673d75dd6404ac5df8a47adc04437e6b.tar.bz2
xen-f9b4231a673d75dd6404ac5df8a47adc04437e6b.zip
stubdom: make the build more generic by moving as many stubdom parts
into stubdom/ as possible. That also permits to build all of ioemu, c and caml stubdoms at the same time. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'stubdom/Makefile')
-rw-r--r--stubdom/Makefile31
1 files changed, 17 insertions, 14 deletions
diff --git a/stubdom/Makefile b/stubdom/Makefile
index 67a76aedff..b907f1c54d 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -37,7 +37,7 @@ export CROSS_COMPILE=$(GNU_TARGET_ARCH)-xen-elf-
export PATH:=$(CROSS_PREFIX)/bin:$(PATH)
.PHONY: all
-all: qemu-stubdom
+all: ioemu-stubdom c-stubdom
################
# Cross-binutils
@@ -174,6 +174,7 @@ mk-symlinks:
([ ! -h config-host.h ] || rm -f config-host.h) && \
([ ! -h config-host.mak ] || rm -f config-host.mak) )
[ -h mini-os ] || ln -sf ../extras/mini-os .
+ [ -h mini-os/include/xen ] || ln -sf ../../../xen/include/public mini-os/include/xen
#######
# libxc
@@ -198,40 +199,41 @@ ioemu: cross-zlib cross-libpci mk-symlinks libxc
######
.PHONY: caml
-caml:
- $(MAKE) -C $@
+caml: mk-symlinks
+ $(MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-cvs
###
# C
###
.PHONY: c
-c:
- $(MAKE) -C $@
+c: mk-symlinks
+ $(MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-cvs
########
# minios
########
-.PHONY: qemu-stubdom
-qemu-stubdom: mk-symlinks lwip-cvs libxc ioemu
- $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs QEMUDIR=$(CURDIR)/ioemu
+.PHONY: ioemu-stubdom
+ioemu-stubdom: lwip-cvs libxc ioemu
+ $(MAKE) -C mini-os TARGET=$@ LWIPDIR=$(CURDIR)/lwip-cvs APP_OBJS="$(CURDIR)/ioemu/i386-dm-stubdom/qemu.a $(CURDIR)/ioemu/i386-dm-stubdom/libqemu.a"
+CAMLLIB = $(shell ocamlc -where)
.PHONY: caml-stubdom
-caml-stubdom: mk-symlinks lwip-cvs libxc cross-libpci caml
- $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs CAMLDIR=$(CURDIR)/caml
+caml-stubdom: lwip-cvs libxc caml
+ $(MAKE) -C mini-os TARGET=$@ LWIPDIR=$(CURDIR)/lwip-cvs APP_OBJS="$(CURDIR)/caml/main-c.o $(CURDIR)/caml/main-caml.o $(CURDIR)/caml/caml.o $(CAMLLIB)/libasmrun.a"
.PHONY: c-stubdom
-c-stubdom: mk-symlinks lwip-cvs libxc cross-libpci c
- $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs CDIR=$(CURDIR)/c
+c-stubdom: lwip-cvs libxc c
+ $(MAKE) -C mini-os TARGET=$@ LWIPDIR=$(CURDIR)/lwip-cvs APP_OBJS=$(CURDIR)/c/main.a
#########
# install
#########
-install: mini-os/mini-os.gz
+install: mini-os/ioemu-stubdom.gz
$(INSTALL_PROG) stubdom-dm "$(DESTDIR)/usr/lib/xen/bin"
- $(INSTALL_PROG) mini-os/mini-os.gz "$(DESTDIR)/usr/lib/xen/boot/stubdom.gz"
+ $(INSTALL_PROG) $< "$(DESTDIR)/usr/lib/xen/boot/stubdom.gz"
#######
# clean
@@ -242,6 +244,7 @@ install: mini-os/mini-os.gz
clean:
-$(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs clean
$(MAKE) -C caml clean
+ $(MAKE) -C c clean
rm -fr libxc ioemu mini-os include
# clean the cross-compilation result