ia64/xen-unstable

view extras/mini-os/minios.mk @ 18811:390ef36eb596

Remove Xen-private definitions from kexec public header.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Nov 19 13:13:39 2008 +0000 (2008-11-19)
parents 183d2d7adc2f
children
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 -Wno-redundant-decls
10 DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
11 DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
12 DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
13 DEF_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
15 DEF_ASFLAGS += -D__ASSEMBLY__
16 DEF_LDFLAGS +=
18 ifeq ($(debug),y)
19 DEF_CFLAGS += -g
20 #DEF_CFLAGS += -DMM_DEBUG
21 #DEF_CFLAGS += -DFS_DEBUG
22 #DEF_CFLAGS += -DLIBC_DEBUG
23 DEF_CFLAGS += -DGNT_DEBUG
24 DEF_CFLAGS += -DGNTMAP_DEBUG
25 else
26 DEF_CFLAGS += -O3
27 endif
29 # Make the headers define our internal stuff
30 DEF_CFLAGS += -D__INSIDE_MINIOS__
32 # Build the CFLAGS and ASFLAGS for compiling and assembling.
33 # DEF_... flags are the common mini-os flags,
34 # ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk
35 CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS)
36 CPPFLAGS := $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS)
37 ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
38 LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
40 # Special build dependencies.
41 # Rebuild all after touching this/these file(s)
42 EXTRA_DEPS = $(MINI-OS_ROOT)/minios.mk \
43 $(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
45 # Find all header files for checking dependencies.
46 HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h)
47 HDRS += $(wildcard $(MINI-OS_ROOT)/include/xen/*.h)
48 HDRS += $(wildcard $(ARCH_INC)/*.h)
49 # For special wanted header directories.
50 extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h))
51 HDRS += $(extra_heads)
53 # Add the special header directories to the include paths.
54 override CPPFLAGS := $(CPPFLAGS) $(extra_incl)
56 # The name of the architecture specific library.
57 # This is on x86_32: libx86_32.a
58 # $(ARCH_LIB) has to built in the architecture specific directory.
59 ARCH_LIB_NAME = $(XEN_TARGET_ARCH)
60 ARCH_LIB := lib$(ARCH_LIB_NAME).a
62 # This object contains the entrypoint for startup from Xen.
63 # $(HEAD_ARCH_OBJ) has to be built in the architecture specific directory.
64 HEAD_ARCH_OBJ := $(XEN_TARGET_ARCH).o
65 HEAD_OBJ := $(OBJ_DIR)/$(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
68 $(OBJ_DIR)/%.o: %.c $(HDRS) Makefile $(EXTRA_DEPS)
69 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
71 $(OBJ_DIR)/%.o: %.S $(HDRS) Makefile $(EXTRA_DEPS)
72 $(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@