]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
arm920t/interrupts: Move conditional compilation to Makefile
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 22 Jun 2009 22:12:01 +0000 (00:12 +0200)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 6 Jul 2009 19:52:30 +0000 (21:52 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
cpu/arm920t/Makefile
cpu/arm920t/interrupts.c

index e02bc6ac8f869b672c56f3880d3b71c316bff819..cbb13b2a4c8f697040323b5d0c1845f3ef0790ce 100644 (file)
@@ -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)
index ea24cdf68bd1c647b3db15300ea91669f5e9e225..539eb5c4517d7deae871f54734a7062e0050d200 100644 (file)
@@ -30,9 +30,8 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_USE_IRQ
 #include <asm/proc-armv/ptrace.h>
+
 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