diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-05-28 09:30:48 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-05-28 09:30:48 +0100 |
commit | f9b4231a673d75dd6404ac5df8a47adc04437e6b (patch) | |
tree | 67d37f19b98706274ec6af9245082f25622341a8 /extras/mini-os/Makefile | |
parent | 4151cc56f19b3fe8aabde12ddf532cd9502c637d (diff) | |
download | xen-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 'extras/mini-os/Makefile')
-rw-r--r-- | extras/mini-os/Makefile | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile index 8cec019e42..18497e1843 100644 --- a/extras/mini-os/Makefile +++ b/extras/mini-os/Makefile @@ -73,44 +73,25 @@ lwip.a: $(LWO) OBJS += lwip.a endif -OBJS := $(filter-out lwip%.o $(LWO), $(OBJS)) - -ifeq ($(caml),y) -CAMLLIB = $(shell ocamlc -where) -APP_OBJS += main-caml.o -APP_OBJS += $(CAMLDIR)/caml.o -APP_OBJS += $(CAMLLIB)/libasmrun.a -CFLAGS += -I$(CAMLLIB) -APP_LDLIBS += -lm -endif -OBJS := $(filter-out main-caml.o, $(OBJS)) - -ifeq ($(qemu),y) -APP_OBJS += $(QEMUDIR)/i386-dm-stubdom/qemu.a $(QEMUDIR)/i386-dm-stubdom/libqemu.a -CFLAGS += -DCONFIG_QEMU -endif - -ifneq ($(CDIR),) -APP_OBJS += $(CDIR)/main.a -APP_LDLIBS += -endif +OBJS := $(filter-out main.o lwip%.o $(LWO), $(OBJS)) ifeq ($(libc),y) APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libxc -whole-archive -lxenguest -lxenctrl -no-whole-archive APP_LDLIBS += -lpci APP_LDLIBS += -lz +APP_LDLIBS += -lm LDLIBS += -lc endif -ifneq ($(caml)-$(qemu)-$(CDIR)-$(lwip),---y) +ifneq ($(APP_OBJS)-$(lwip),-y) OBJS := $(filter-out daytime.o, $(OBJS)) endif -app.o: $(APP_OBJS) app.lds - $(LD) -r -d $(LDFLAGS) $^ $(APP_LDLIBS) --undefined main -o $@ +$(TARGET)_app.o: $(APP_OBJS) app.lds + $(LD) -r -d $(LDFLAGS) $^ $(APP_LDLIBS) --undefined app_main -o $@ -$(TARGET): links $(OBJS) app.o arch_lib - $(LD) -r $(LDFLAGS) $(HEAD_OBJ) app.o $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o +$(TARGET): links $(OBJS) $(TARGET)_app.o arch_lib + $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(TARGET)_app.o $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@ gzip -f -9 -c $@ >$@.gz |