From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 22 Jun 2009 22:12:01 +0000 (+0200) Subject: arm920t/interrupts: Move conditional compilation to Makefile X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=798bf9a9ade1cfbe85a16d180cad720927d8e10a;p=u-boot.git arm920t/interrupts: Move conditional compilation to Makefile Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- diff --git a/cpu/arm920t/Makefile b/cpu/arm920t/Makefile index e02bc6ac8f..cbb13b2a4c 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 ea24cdf68b..539eb5c451 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