ia64/xen-unstable

annotate xen/Rules.mk @ 16542:1936e6a79f85

x86: Fix management support on HP ProLiant systems.

Adds support to allow host-platform-specific handling of I/O port
traps. Specifically adds support to handle an HP ProLiant I/O port in a
special way.

Signed-off-by: Mike Garrett <michael.garrett@hp.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Dec 06 11:23:04 2007 +0000 (2007-12-06)
parents ba69fe2dce91
children 04d3ca600f74
rev   line source
kaf24@8763 1
kaf24@5581 2 #
kaf24@5581 3 # If you change any of these configuration options then you must
kaf24@5581 4 # 'make clean' before rebuilding.
kaf24@5581 5 #
kfraser@15290 6 verbose ?= n
kfraser@15290 7 perfc ?= n
kfraser@15290 8 perfc_arrays ?= n
kfraser@15290 9 crash_debug ?= n
kfraser@15290 10 frame_pointer ?= n
kaf24@1444 11
kfraser@11209 12 XEN_ROOT=$(BASEDIR)/..
kfraser@11209 13 include $(XEN_ROOT)/Config.mk
kfraser@11209 14
kaf24@9330 15 # Hardcoded configuration implications and dependencies.
kaf24@9330 16 # Do this is a neater way if it becomes unwieldy.
kaf24@9330 17 ifeq ($(debug),y)
kfraser@15290 18 verbose := y
kfraser@15290 19 frame_pointer := y
kaf24@9330 20 endif
kaf24@9330 21 ifeq ($(perfc_arrays),y)
kaf24@9330 22 perfc := y
kaf24@9330 23 endif
kfraser@15290 24 ifeq ($(frame_pointer),y)
kfraser@15290 25 CFLAGS := $(shell echo $(CFLAGS) | sed -e 's/-f[^ ]*omit-frame-pointer//g')
kfraser@15290 26 endif
kaf24@9330 27
cl349@5092 28 # Set ARCH/SUBARCH appropriately.
cl349@5092 29 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
cl349@5092 30 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
kaf24@10742 31 override COMPILE_ARCH := $(shell echo $(XEN_COMPILE_ARCH) | \
kfraser@11840 32 sed -e 's/x86.*/x86/' \
kfraser@11840 33 -e 's/powerpc.*/powerpc/')
kaf24@10742 34 override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \
kfraser@11840 35 sed -e 's/x86.*/x86/' \
kfraser@11840 36 -e 's/powerpc.*/powerpc/')
cl349@5092 37
kaf24@9594 38 TARGET := $(BASEDIR)/xen
kaf24@9594 39
keir@16092 40 HDRS := $(wildcard *.h)
keir@16092 41 HDRS += $(wildcard $(BASEDIR)/include/xen/*.h)
keir@16379 42 HDRS += $(wildcard $(BASEDIR)/include/xen/hvm/*.h)
kaf24@9594 43 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
keir@16154 44 HDRS += $(wildcard $(BASEDIR)/include/public/*/*.h)
ack@13290 45 HDRS += $(wildcard $(BASEDIR)/include/compat/*.h)
kaf24@9594 46 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
kaf24@9594 47 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
iap10@236 48
kaf24@1157 49 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
iap10@236 50
kaf24@9594 51 # Do not depend on auto-generated header files.
kfraser@14216 52 AHDRS := $(filter-out %/include/xen/compile.h,$(HDRS))
kfraser@14216 53 HDRS := $(filter-out %/asm-offsets.h,$(AHDRS))
kaf24@9594 54
kaf24@9330 55 # Note that link order matters!
kaf24@9331 56 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
kaf24@9331 57 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
kfraser@15815 58 ALL_OBJS-y += $(BASEDIR)/xsm/built_in.o
kaf24@9332 59 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
kaf24@1274 60
kfraser@15290 61 CFLAGS-y += -g -D__XEN__
kfraser@15815 62 CFLAGS-$(XSM_ENABLE) += -DXSM_ENABLE
kfraser@15819 63 CFLAGS-$(FLASK_ENABLE) += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
kfraser@15819 64 CFLAGS-$(FLASK_ENABLE) += -DFLASK_DEVELOP -DFLASK_BOOTPARAM -DFLASK_AVC_STATS
kfraser@15819 65 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY -DXSM_MAGIC=0xbcde0100
kfraser@15290 66 CFLAGS-$(verbose) += -DVERBOSE
kfraser@15290 67 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
kfraser@15290 68 CFLAGS-$(perfc) += -DPERF_COUNTERS
kfraser@15290 69 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
kfraser@15290 70 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
kaf24@1274 71
kaf24@9517 72 ifneq ($(max_phys_cpus),)
kfraser@15290 73 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
kaf24@9517 74 endif
kaf24@9517 75
kfraser@15290 76 AFLAGS-y += -D__ASSEMBLY__
kaf24@9533 77
kaf24@9330 78 ALL_OBJS := $(ALL_OBJS-y)
kfraser@11872 79
kaf24@9330 80 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
kfraser@11872 81
kfraser@11872 82 # Most CFLAGS are safe for assembly files:
kfraser@11872 83 # -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
kaf24@9533 84 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
kfraser@11872 85 AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS))
kaf24@2975 86
kfraser@11878 87 # LDFLAGS are only passed directly to $(LD)
kfraser@11879 88 LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
kfraser@11878 89
kaf24@9595 90 include Makefile
kaf24@9595 91
kaf24@9595 92 # Ensure each subdirectory has exactly one trailing slash.
kaf24@9595 93 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
kaf24@9595 94 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
kaf24@9595 95
kaf24@9595 96 # Add explicitly declared subdirectories to the object list.
kaf24@9635 97 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
kaf24@9595 98
kaf24@9595 99 # Add implicitly declared subdirectories (in the object list) to the
kaf24@9595 100 # subdirectory list, and rewrite the object-list entry.
kaf24@9595 101 subdir-y += $(filter %/,$(obj-y))
kaf24@9595 102 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
kaf24@9595 103
kaf24@9595 104 subdir-all := $(subdir-y) $(subdir-n)
kaf24@9595 105
kaf24@9595 106 built_in.o: $(obj-y)
kaf24@9595 107 $(LD) $(LDFLAGS) -r -o $@ $^
kaf24@9595 108
kaf24@9660 109 # Force execution of pattern rules (for which PHONY cannot be directly used).
kaf24@9595 110 .PHONY: FORCE
kaf24@9595 111 FORCE:
kaf24@9595 112
kaf24@9595 113 %/built_in.o: FORCE
kaf24@9595 114 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
kaf24@9595 115
kaf24@9660 116 .PHONY: clean
kaf24@9660 117 clean:: $(addprefix _clean_, $(subdir-all))
kaf24@9595 118 rm -f *.o *~ core
kaf24@9595 119 _clean_%/: FORCE
kaf24@9595 120 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
kaf24@9595 121
iap10@236 122 %.o: %.c $(HDRS) Makefile
kaf24@509 123 $(CC) $(CFLAGS) -c $< -o $@
iap10@236 124
kfraser@14216 125 %.o: %.S $(AHDRS) Makefile
kfraser@11872 126 $(CC) $(AFLAGS) -c $< -o $@
kfraser@10915 127
kfraser@10915 128 %.i: %.c $(HDRS) Makefile
kfraser@10915 129 $(CPP) $(CFLAGS) $< -o $@
kfraser@10915 130
kfraser@11872 131 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker
kfraser@14216 132 %.s: %.S $(AHDRS) Makefile
kfraser@11872 133 $(CPP) $(AFLAGS) $< -o $@