diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-19 13:13:35 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-19 13:13:35 +0100 |
commit | e09c21cb7fee9339e49cdabd1daec665608918bf (patch) | |
tree | b88bfe1fdc6a21194d5859cb54d334a7e80dc1ca /xen/Rules.mk | |
parent | ff24170e9c3739fc2b09a79c15a1843e54ed322f (diff) | |
download | xen-e09c21cb7fee9339e49cdabd1daec665608918bf.tar.gz xen-e09c21cb7fee9339e49cdabd1daec665608918bf.tar.bz2 xen-e09c21cb7fee9339e49cdabd1daec665608918bf.zip |
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>
Diffstat (limited to 'xen/Rules.mk')
-rw-r--r-- | xen/Rules.mk | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/xen/Rules.mk b/xen/Rules.mk index 2ece51a889..ce51931923 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -8,6 +8,15 @@ perfc ?= n perfc_arrays?= n crash_debug ?= n +# Hardcoded configuration implications and dependencies. +# Do this is a neater way if it becomes unwieldy. +ifeq ($(debug),y) +verbose := y +endif +ifeq ($(perfc_arrays),y) +perfc := y +endif + XEN_ROOT=$(BASEDIR)/.. include $(XEN_ROOT)/Config.mk @@ -32,36 +41,29 @@ S_SRCS := $(wildcard *.S) OBJS := $(patsubst %.S,%.o,$(S_SRCS)) OBJS += $(patsubst %.c,%.o,$(C_SRCS)) -# Note that link order matters! -ALL_OBJS := $(BASEDIR)/common/common.o -ALL_OBJS += $(BASEDIR)/drivers/char/driver.o -ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o -ifeq ($(ACM_SECURITY),y) -ALL_OBJS += $(BASEDIR)/acm/acm.o -CFLAGS += -DACM_SECURITY -endif -ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o +ALL_OBJS-y := +CFLAGS-y := +subdirs-y := +subdirs-n := include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk -CFLAGS += -g -D__XEN__ - -ifneq ($(debug)$(verbose),nn) -CFLAGS += -DVERBOSE -endif - -ifeq ($(crash_debug),y) -CFLAGS += -DCRASH_DEBUG -endif +# Note that link order matters! +ALL_OBJS-y += $(BASEDIR)/common/common.o +ALL_OBJS-y += $(BASEDIR)/drivers/char/driver.o +ALL_OBJS-$(HAS_ACPI) += $(BASEDIR)/drivers/acpi/driver.o +ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/acm.o +ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o -ifeq ($(perfc),y) -CFLAGS += -DPERF_COUNTERS -ifeq ($(perfc_arrays),y) -CFLAGS += -DPERF_ARRAYS -endif -endif +CFLAGS-y += -g -D__XEN__ +CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY +CFLAGS-$(verbose) += -DVERBOSE +CFLAGS-$(crash_debug) += -DCRASH_DEBUG +CFLAGS-$(perfc) += -DPERF_COUNTERS +CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS -CFLAGS := $(strip $(CFLAGS)) +ALL_OBJS := $(ALL_OBJS-y) +CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y)) %.o: %.c $(HDRS) Makefile $(CC) $(CFLAGS) -c $< -o $@ |