direct-io.hg

changeset 9320:f513384a18ee

Conditionalize building the Xen ACPI driver.

Also introduces some cleanups to the Xen build system.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Mar 19 13:13:35 2006 +0100 (2006-03-19)
parents 5b56d1e1ac8b
children 9795d9407acc
files xen/Post.mk xen/Rules.mk xen/arch/ia64/Rules.mk xen/arch/x86/Rules.mk xen/drivers/Makefile
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xen/Post.mk	Sun Mar 19 13:13:35 2006 +0100
     1.3 @@ -0,0 +1,15 @@
     1.4 +
     1.5 +subdirs-all := $(subdirs-y) $(subdirs-n)
     1.6 +
     1.7 +default: $(subdirs-y)
     1.8 +
     1.9 +.PHONY: FORCE
    1.10 +FORCE:
    1.11 +
    1.12 +%/: FORCE
    1.13 +	$(MAKE) -C $*
    1.14 +
    1.15 +clean: $(addprefix _clean_, $(subdirs-all))
    1.16 +_clean_%/: FORCE
    1.17 +	$(MAKE) -C $* clean
    1.18 +
     2.1 --- a/xen/Rules.mk	Sun Mar 19 12:48:51 2006 +0100
     2.2 +++ b/xen/Rules.mk	Sun Mar 19 13:13:35 2006 +0100
     2.3 @@ -8,6 +8,15 @@ perfc       ?= n
     2.4  perfc_arrays?= n
     2.5  crash_debug ?= n
     2.6  
     2.7 +# Hardcoded configuration implications and dependencies.
     2.8 +# Do this is a neater way if it becomes unwieldy.
     2.9 +ifeq ($(debug),y)
    2.10 +verbose := y
    2.11 +endif
    2.12 +ifeq ($(perfc_arrays),y)
    2.13 +perfc := y
    2.14 +endif
    2.15 +
    2.16  XEN_ROOT=$(BASEDIR)/..
    2.17  include $(XEN_ROOT)/Config.mk
    2.18  
    2.19 @@ -32,36 +41,29 @@ S_SRCS  := $(wildcard *.S)
    2.20  OBJS    := $(patsubst %.S,%.o,$(S_SRCS))
    2.21  OBJS    += $(patsubst %.c,%.o,$(C_SRCS))
    2.22  
    2.23 -# Note that link order matters!
    2.24 -ALL_OBJS := $(BASEDIR)/common/common.o
    2.25 -ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
    2.26 -ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
    2.27 -ifeq ($(ACM_SECURITY),y)
    2.28 -ALL_OBJS += $(BASEDIR)/acm/acm.o
    2.29 -CFLAGS += -DACM_SECURITY
    2.30 -endif
    2.31 -ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
    2.32 +ALL_OBJS-y :=
    2.33 +CFLAGS-y   :=
    2.34 +subdirs-y  :=
    2.35 +subdirs-n  :=
    2.36  
    2.37  include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
    2.38  
    2.39 -CFLAGS += -g -D__XEN__
    2.40 -
    2.41 -ifneq ($(debug)$(verbose),nn)
    2.42 -CFLAGS += -DVERBOSE
    2.43 -endif
    2.44 +# Note that link order matters!
    2.45 +ALL_OBJS-y               += $(BASEDIR)/common/common.o
    2.46 +ALL_OBJS-y               += $(BASEDIR)/drivers/char/driver.o
    2.47 +ALL_OBJS-$(HAS_ACPI)     += $(BASEDIR)/drivers/acpi/driver.o
    2.48 +ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/acm.o
    2.49 +ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
    2.50  
    2.51 -ifeq ($(crash_debug),y)
    2.52 -CFLAGS += -DCRASH_DEBUG
    2.53 -endif
    2.54 +CFLAGS-y               += -g -D__XEN__
    2.55 +CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
    2.56 +CFLAGS-$(verbose)      += -DVERBOSE
    2.57 +CFLAGS-$(crash_debug)  += -DCRASH_DEBUG
    2.58 +CFLAGS-$(perfc)        += -DPERF_COUNTERS
    2.59 +CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
    2.60  
    2.61 -ifeq ($(perfc),y)
    2.62 -CFLAGS += -DPERF_COUNTERS
    2.63 -ifeq ($(perfc_arrays),y)
    2.64 -CFLAGS += -DPERF_ARRAYS
    2.65 -endif
    2.66 -endif
    2.67 -
    2.68 -CFLAGS := $(strip $(CFLAGS))
    2.69 +ALL_OBJS := $(ALL_OBJS-y)
    2.70 +CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y))
    2.71  
    2.72  %.o: %.c $(HDRS) Makefile
    2.73  	$(CC) $(CFLAGS) -c $< -o $@
     3.1 --- a/xen/arch/ia64/Rules.mk	Sun Mar 19 12:48:51 2006 +0100
     3.2 +++ b/xen/arch/ia64/Rules.mk	Sun Mar 19 13:13:35 2006 +0100
     3.3 @@ -1,6 +1,7 @@
     3.4  ########################################
     3.5  # ia64-specific definitions
     3.6  
     3.7 +HAS_ACPI := y
     3.8  VALIDATE_VT	?= n
     3.9  ifneq ($(COMPILE_ARCH),$(TARGET_ARCH))
    3.10  CROSS_COMPILE ?= /usr/local/sp_env/v2.2.5/i686/bin/ia64-unknown-linux-
     4.1 --- a/xen/arch/x86/Rules.mk	Sun Mar 19 12:48:51 2006 +0100
     4.2 +++ b/xen/arch/x86/Rules.mk	Sun Mar 19 13:13:35 2006 +0100
     4.3 @@ -1,6 +1,8 @@
     4.4  ########################################
     4.5  # x86-specific definitions
     4.6  
     4.7 +HAS_ACPI := y
     4.8 +
     4.9  #
    4.10  # If you change any of these configuration options then you must
    4.11  # 'make clean' before rebuilding.
     5.1 --- a/xen/drivers/Makefile	Sun Mar 19 12:48:51 2006 +0100
     5.2 +++ b/xen/drivers/Makefile	Sun Mar 19 13:13:35 2006 +0100
     5.3 @@ -1,8 +1,6 @@
     5.4 +include $(BASEDIR)/Rules.mk
     5.5  
     5.6 -default:
     5.7 -	$(MAKE) -C char
     5.8 -	$(MAKE) -C acpi
     5.9 +subdirs-y := char/
    5.10 +subdirs-$(HAS_ACPI) += acpi/
    5.11  
    5.12 -clean:
    5.13 -	$(MAKE) -C char clean
    5.14 -	$(MAKE) -C acpi clean
    5.15 +include $(BASEDIR)/Post.mk