diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-10-06 17:44:09 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-10-06 17:44:09 +0000 |
commit | 550718896b662801261d4679543ce2d5a8fa2bfb (patch) | |
tree | 434f72bd32e1698e7e41a47d9a501d9883ee46b8 /extras | |
parent | e4130630e189f44c1371dc8c78b66b8bcf6df732 (diff) | |
download | xen-550718896b662801261d4679543ce2d5a8fa2bfb.tar.gz xen-550718896b662801261d4679543ce2d5a8fa2bfb.tar.bz2 xen-550718896b662801261d4679543ce2d5a8fa2bfb.zip |
bitkeeper revision 1.484 (3f81a9e9NHEXcbdhSQY4okBiJfC9XA)
mini-os Makefile improvements
Diffstat (limited to 'extras')
-rw-r--r-- | extras/mini-os/Makefile | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile index 251ee273ba..f437cf2f58 100644 --- a/extras/mini-os/Makefile +++ b/extras/mini-os/Makefile @@ -5,7 +5,7 @@ LD := ld MONITOR_BASE := 0xE0100000 CFLAGS := -fno-builtin -O3 -Wall -Ih/ -TARGET := image.final +TARGET := mini-os LOBJS:= lib/malloc.o lib/math.o lib/printf.o lib/string.o OBJS := entry.o kernel.o traps.o hypervisor.o mm.o events.o time.o ${LOBJS} @@ -15,22 +15,26 @@ HDRS := h/os.h h/types.h h/hypervisor.h h/mm.h h/events.h h/time.h h/lib.h $(HI default: $(TARGET) -$(TARGET): head.o $(OBJS) +hypervisor-ifs: + ln -sf ../../../xen/include/hypervisor-ifs h/hypervisor-ifs + +$(TARGET): hypervisor-ifs head.o $(OBJS) # Image will load at 0xC0000000. First bytes from head.o - #$(LD) -N -Ttext 0xC0000000 head.o $(OBJS) -o image.elf - $(LD) -N -T vmlinux.lds head.o $(OBJS) -o image.elf + #$(LD) -N -Ttext 0xC0000000 head.o $(OBJS) -o $@.elf + $(LD) -N -T vmlinux.lds head.o $(OBJS) -o $@.elf # Guest OS header -- first 8 bytes are identifier 'XenoGues'. echo -e -n 'XenoGues' >$@ # Guest OS header -- next 4 bytes are load address (0xC0000000). echo -e -n '\000\000\000\300' >>$@ # Create a raw bag of bytes from the ELF image. - objcopy -O binary -R .note -R .comment image.elf image.raw + objcopy -O binary -R .note -R .comment $@.elf $@.raw # Guest OS header is immediately followed by raw OS image. - cat image.raw >>$@ - #gzip -f -9 $@ + cat $@.raw >>$@ + gzip -f -9 -c $@ >$@.gz clean: - rm -f *.o *~ core image.elf image.raw image.final image.final.gz + find . -type f -name '*.o' | xargs rm -f + rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz %.o: %.c $(HDRS) Makefile $(CC) $(CFLAGS) -c $< -o $@ |