ia64/xen-unstable

view extras/mini-os/Makefile @ 3251:a169836882cb

bitkeeper revision 1.1159.170.59 (41b4c2fdJ2gj_BWy27Vj3ptayZp_yg)

sync w/ head.
author cl349@arcadians.cl.cam.ac.uk
date Mon Dec 06 20:37:17 2004 +0000 (2004-12-06)
parents 3f929065a1d1
children 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/xen-public/xen.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 xen-public:
24 [ -e h/xen-public] || ln -sf ../../../xen/include/public h/xen-public
26 $(TARGET): xen-public 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 $@