ia64/xen-unstable

view extras/mini-os/Makefile @ 2743:df9ad701dbce

bitkeeper revision 1.1159.1.282 (417e5b60oXUOPTWl81d5zD6oq1tOTQ)

Clean up docs dir layout.
author kaf24@freefall.cl.cam.ac.uk
date Tue Oct 26 14:12:48 2004 +0000 (2004-10-26)
parents 369b77bc3884
children b914ff7d73b5 3f929065a1d1 0a4b76b6b5a0
line source
2 CC := gcc
3 LD := ld
5 # Linker should relocate monitor to this address
6 MONITOR_BASE := 0xE0100000
8 # NB. '-Wcast-qual' is nasty, so I omitted it.
9 CFLAGS := -fno-builtin -O3 -Wall -Ih/ -Wredundant-decls
10 CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -ansi
12 TARGET := mini-os
14 LOBJS := lib/malloc.o lib/math.o lib/printf.o lib/string.o
15 OBJS := entry.o kernel.o traps.o hypervisor.o mm.o events.o time.o ${LOBJS}
17 HINTF := h/hypervisor-ifs/hypervisor-if.h
18 HDRS := h/os.h h/types.h h/hypervisor.h h/mm.h h/events.h h/time.h h/lib.h
19 HDRS += $(HINTF)
21 default: $(TARGET)
23 hypervisor-ifs:
24 ln -sf ../../../xen/include/hypervisor-ifs h/hypervisor-ifs
26 $(TARGET): hypervisor-ifs head.o $(OBJS)
27 $(LD) -N -T minios.lds head.o $(OBJS) -o $@.elf
28 objcopy -R .note -R .comment $@.elf $@
29 gzip -f -9 -c $@ >$@.gz
31 clean:
32 find . -type f -name '*.o' | xargs rm -f
33 rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
34 find . -type l | xargs rm -f
36 %.o: %.c $(HDRS) Makefile
37 $(CC) $(CFLAGS) -c $< -o $@
39 %.o: %.S $(HDRS) Makefile
40 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@