Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
 LIB    = $(obj)lib$(CPU).a
 
 START  = start.o
-COBJS  = serial.o interrupts.o cpu.o timer.o pci.o
-
-SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+COBJS-y        += cpu.o
+COBJS-y        += interrupts.o
+COBJS-$(CONFIG_PCI) += pci.o
+COBJS-y        += serial.o
+ifndef CONFIG_USE_IRQ
+COBJS-y        += timer.o
+endif
+
+SRCS   := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 START  := $(addprefix $(obj),$(START))
 
 all:   $(obj).depend $(START) $(LIB)
 
 
 
 #include <common.h>
-
-#ifdef CONFIG_PCI
-
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <pci.h>
        }
        return -1;
 }
-#endif /* CONFIG_PCI */
 
 #include <common.h>
 #include <asm/arch/ixp425.h>
 
-#ifndef CONFIG_USE_IRQ
 ulong get_timer (ulong base)
 {
        return get_timer_masked () - base;
        }
        return (reload_constant - current);
 }
-#endif /* #ifndef CONFIG_USE_IRQ */