ia64/xen-unstable

view extras/mini-os/Makefile @ 9788:bdcc838b9a72

Add small memory warning message to domain configuration examples.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
author stekloff@dyn9047022152.beaverton.ibm.com
date Wed Apr 19 22:58:24 2006 +0100 (2006-04-19)
parents b454a09cddb1
children 62c8e97d56cf
line source
1 debug ?= y
3 include $(CURDIR)/../../Config.mk
5 # Set TARGET_ARCH
6 override TARGET_ARCH := $(XEN_TARGET_ARCH)
8 # NB. '-Wcast-qual' is nasty, so I omitted it.
9 CFLAGS := -fno-builtin -Wall -Werror -Iinclude/ -Wredundant-decls -Wno-format
10 CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
12 ifeq ($(TARGET_ARCH),x86_32)
13 CFLAGS += -m32 -march=i686
14 LDFLAGS := -m elf_i386
15 endif
17 ifeq ($(TARGET_ARCH),x86_64)
18 CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
19 CFLAGS += -fno-asynchronous-unwind-tables
20 LDFLAGS := -m elf_x86_64
21 endif
23 ifeq ($(debug),y)
24 CFLAGS += -g
25 else
26 CFLAGS += -O3
27 endif
29 TARGET := mini-os
31 OBJS := $(TARGET_ARCH).o
32 OBJS += $(patsubst %.c,%.o,$(wildcard *.c))
33 OBJS += $(patsubst %.c,%.o,$(wildcard lib/*.c))
34 OBJS += $(patsubst %.c,%.o,$(wildcard xenbus/*.c))
35 OBJS += $(patsubst %.c,%.o,$(wildcard console/*.c))
37 HDRS := $(wildcard include/*.h)
38 HDRS += $(wildcard include/xen/*.h)
40 .PHONY: default
41 default: $(TARGET)
43 .PHONY: links
44 links:
45 [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
47 $(TARGET): links $(OBJS)
48 $(LD) -N -T minios-$(TARGET_ARCH).lds $(OBJS) -o $@.elf
49 gzip -f -9 -c $@.elf >$@.gz
51 .PHONY: clean
52 clean:
53 find . -type f -name '*.o' | xargs rm -f
54 rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
55 find . -type l | xargs rm -f
57 %.o: %.c $(HDRS) Makefile
58 $(CC) $(CFLAGS) -c $< -o $@
60 %.o: %.S $(HDRS) Makefile
61 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@