ia64/xen-unstable

view extras/mini-os/Makefile @ 1041:7c3b17193b4b

bitkeeper revision 1.680 (40083bb4Kb4q4cb9z5eySYtCRnVh3A)

maw_vd.patch
author kaf24@scramble.cl.cam.ac.uk[kaf24]
date Fri Jan 16 19:29:56 2004 +0000 (2004-01-16)
parents 71f9c171157e
children aadd0dc51c45
line source
2 CC := gcc
3 LD := ld
4 # Linker should relocate monitor to this address
5 MONITOR_BASE := 0xE0100000
6 CFLAGS := -fno-builtin -O3 -Wall -Ih/
8 TARGET := mini-os
10 LOBJS:= lib/malloc.o lib/math.o lib/printf.o lib/string.o
11 OBJS := entry.o kernel.o traps.o hypervisor.o mm.o events.o time.o ${LOBJS}
13 HINTF := h/hypervisor-ifs/hypervisor-if.h
14 HDRS := h/os.h h/types.h h/hypervisor.h h/mm.h h/events.h h/time.h h/lib.h $(HINTF)
16 default: $(TARGET)
18 hypervisor-ifs:
19 ln -sf ../../../xen/include/hypervisor-ifs h/hypervisor-ifs
21 $(TARGET): hypervisor-ifs head.o $(OBJS)
22 # Image will load at 0xC0000000. First bytes from head.o
23 #$(LD) -N -Ttext 0xC0000000 head.o $(OBJS) -o $@.elf
24 $(LD) -N -T minios.lds head.o $(OBJS) -o $@.elf
25 # Guest OS header -- first 8 bytes are identifier 'XenoGues'.
26 echo -e -n 'XenoGues' >$@
27 # Guest OS header -- next 4 bytes are load address (0xC0000000).
28 echo -e -n '\000\000\000\300' >>$@
29 # Create a raw bag of bytes from the ELF image.
30 objcopy -O binary -R .note -R .comment $@.elf $@.raw
31 # Guest OS header is immediately followed by raw OS image.
32 cat $@.raw >>$@
33 gzip -f -9 -c $@ >$@.gz
35 clean:
36 find . -type f -name '*.o' | xargs rm -f
37 rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
38 find . -type l | xargs rm -f
40 %.o: %.c $(HDRS) Makefile
41 $(CC) $(CFLAGS) -c $< -o $@
43 %.o: %.S $(HDRS) Makefile
44 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@