aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/Makefile
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-07-06 10:46:29 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-07-06 10:46:29 +0000
commitb7d34829a343a9fcc9e5d6a64d6138bc6ce0d160 (patch)
tree55fdbbc8a6878bbfcbc00826dce1138f17d721e2 /extras/mini-os/Makefile
parent3f54e6d5ece9b20caa0fd77d2c8342c69c6733b2 (diff)
downloadxen-b7d34829a343a9fcc9e5d6a64d6138bc6ce0d160.tar.gz
xen-b7d34829a343a9fcc9e5d6a64d6138bc6ce0d160.tar.bz2
xen-b7d34829a343a9fcc9e5d6a64d6138bc6ce0d160.zip
Mini-os updates from Grzegorz Milos.
Diffstat (limited to 'extras/mini-os/Makefile')
-rw-r--r--extras/mini-os/Makefile26
1 files changed, 15 insertions, 11 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
index 56bc7f9e5f..60e598207d 100644
--- a/extras/mini-os/Makefile
+++ b/extras/mini-os/Makefile
@@ -1,11 +1,12 @@
+debug ?= y
-CC := gcc
-LD := ld
+include $(CURDIR)/../../Config.mk
-TARGET_ARCH := $(shell uname -m | sed -e s/i.86/x86_32/)
+# Set TARGET_ARCH
+override TARGET_ARCH := $(XEN_TARGET_ARCH)
# NB. '-Wcast-qual' is nasty, so I omitted it.
-CFLAGS := -fno-builtin -O3 -Wall -Ih/ -Wredundant-decls -Wno-format
+CFLAGS := -fno-builtin -Wall -Werror -Iinclude/ -Wredundant-decls -Wno-format
CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
ifeq ($(TARGET_ARCH),x86_32)
@@ -19,23 +20,25 @@ CFLAGS += -fno-asynchronous-unwind-tables
LDFLAGS := -m elf_x86_64
endif
+ifeq ($(debug),y)
+CFLAGS += -g
+else
+CFLAGS += -O3
+endif
+
TARGET := mini-os
OBJS := $(TARGET_ARCH).o
OBJS += $(patsubst %.c,%.o,$(wildcard *.c))
OBJS += $(patsubst %.c,%.o,$(wildcard lib/*.c))
-OBJS := $(subst events.o,,$(OBJS))
-OBJS := $(subst hypervisor.o,,$(OBJS))
-OBJS := $(subst time.o,,$(OBJS))
-
-HDRS := $(wildcard h/*.h)
-HDRS += $(wildcard h/xen-public/*.h)
+HDRS := $(wildcard include/*.h)
+HDRS += $(wildcard include/xen/*.h)
default: $(TARGET)
xen-public:
- [ -e h/xen-public ] || ln -sf ../../../xen/include/public h/xen-public
+ [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
$(TARGET): xen-public $(OBJS)
$(LD) -N -T minios-$(TARGET_ARCH).lds $(OBJS) -o $@.elf
@@ -51,3 +54,4 @@ clean:
%.o: %.S $(HDRS) Makefile
$(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
+