ia64/xen-unstable

view extras/mini-os/minios.mk @ 16536:89e7031e153c

hvm: Initialize vlapic->timer_last_update.

Without the fix, before the first vlapic timer interrupt is injected,
the "vlapic->timer_last_update" in vlapic_get_tmcct() is always 0,
causing a wrong value of counter_passed.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 05 14:01:39 2007 +0000 (2007-12-05)
parents dcab07f0776d
children 3c49ae5641b0
line source
1 #
2 # The file contains the common make rules for building mini-os.
3 #
5 debug = y
7 # Define some default flags.
8 # NB. '-Wcast-qual' is nasty, so I omitted it.
9 DEF_CFLAGS := -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format
10 DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
11 DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
12 DEF_CFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
14 DEF_ASFLAGS = -D__ASSEMBLY__
15 DEF_LDFLAGS =
17 ifeq ($(debug),y)
18 DEF_CFLAGS += -g
19 else
20 DEF_CFLAGS += -O3
21 endif
23 # Build the CFLAGS and ASFLAGS for compiling and assembling.
24 # DEF_... flags are the common mini-os flags,
25 # ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk
26 CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS)
27 ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
28 LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
30 # The path pointing to the architecture specific header files.
31 ARCH_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
33 # Special build dependencies.
34 # Rebuild all after touching this/these file(s)
35 EXTRA_DEPS = $(MINI-OS_ROOT)/minios.mk \
36 $(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
38 # Find all header files for checking dependencies.
39 HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h)
40 HDRS += $(wildcard $(MINI-OS_ROOT)/include/xen/*.h)
41 HDRS += $(wildcard $(ARCH_INC)/*.h)
42 # For special wanted header directories.
43 extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h))
44 HDRS += $(extra_heads)
46 # Add the special header directories to the include paths.
47 extra_incl := $(foreach dir,$(EXTRA_INC),-I$(MINI-OS_ROOT)/include/$(dir))
48 override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_INC) $(extra_incl)
50 # The name of the architecture specific library.
51 # This is on x86_32: libx86_32.a
52 # $(ARCH_LIB) has to built in the architecture specific directory.
53 ARCH_LIB_NAME = $(TARGET_ARCH)
54 ARCH_LIB := lib$(ARCH_LIB_NAME).a
56 # This object contains the entrypoint for startup from Xen.
57 # $(HEAD_ARCH_OBJ) has to be built in the architecture specific directory.
58 HEAD_ARCH_OBJ := $(TARGET_ARCH).o
59 HEAD_OBJ := $(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
62 %.o: %.c $(HDRS) Makefile $(EXTRA_DEPS)
63 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
65 %.o: %.S $(HDRS) Makefile $(EXTRA_DEPS)
66 $(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@