From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 9 May 2009 15:35:17 +0200 Subject: [U-Boot] [PATCH 5/6] arm920t/interrupts: Move conditional compilation to Makefile In-Reply-To: <1241876118-27469-4-git-send-email-plagnioj@jcrosoft.com> References: <1241876118-27469-1-git-send-email-plagnioj@jcrosoft.com> <1241876118-27469-2-git-send-email-plagnioj@jcrosoft.com> <1241876118-27469-3-git-send-email-plagnioj@jcrosoft.com> <1241876118-27469-4-git-send-email-plagnioj@jcrosoft.com> Message-ID: <1241876118-27469-5-git-send-email-plagnioj@jcrosoft.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- applied to arm/testing Best Regards, J. cpu/arm920t/Makefile | 8 +++++--- cpu/arm920t/interrupts.c | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpu/arm920t/Makefile b/cpu/arm920t/Makefile index e02bc6a..cbb13b2 100644 --- a/cpu/arm920t/Makefile +++ b/cpu/arm920t/Makefile @@ -26,10 +26,12 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).a START = start.o -COBJS = cpu.o interrupts.o -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) +COBJS-y += cpu.o +COBJS-$(CONFIG_USE_IRQ) += interrupts.o + +SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS)) START := $(addprefix $(obj),$(START)) all: $(obj).depend $(START) $(LIB) diff --git a/cpu/arm920t/interrupts.c b/cpu/arm920t/interrupts.c index 8d5289e..a589b80 100644 --- a/cpu/arm920t/interrupts.c +++ b/cpu/arm920t/interrupts.c @@ -30,9 +30,8 @@ */ #include - -#ifdef CONFIG_USE_IRQ #include + void do_irq (struct pt_regs *pt_regs) { #if defined (ARM920_IRQ_CALLBACK) @@ -46,4 +45,3 @@ void do_irq (struct pt_regs *pt_regs) #error do_irq() not defined for this cpu type #endif } -#endif -- 1.6.2.4