LIB    := $(obj)libblock.a
 
-COBJS-y += ahci.o
-COBJS-y += ata_piix.o
+COBJS-$(CONFIG_SCSI_AHCI) += ahci.o
+COBJS-$(CONFIG_ATA_PIIX) += ata_piix.o
 COBJS-$(CONFIG_FSL_SATA) += fsl_sata.o
 COBJS-$(CONFIG_LIBATA) += libata.o
 COBJS-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
-COBJS-y += sil680.o
-COBJS-y += sym53c8xx.o
-COBJS-y += systemace.o
+COBJS-$(CONFIG_IDE_SIL680) += sil680.o
+COBJS-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
+COBJS-$(CONFIG_SYSTEMACE) += systemace.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 
  */
 #include <common.h>
 
-#ifdef CONFIG_SCSI_AHCI
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
 {
        /*The ahci error info can be read in the ahci driver*/
 }
-#endif
 
 #include <ide.h>
 #include <ata.h>
 
-#ifdef CFG_ATA_PIIX            /*ata_piix driver */
-
 extern block_dev_desc_t sata_dev_desc[CFG_SATA_MAX_DEVICE];
 extern int curr_device;
 
 {
        return 0;
 }
-
-#endif
 
  * The following parameters must be defined in the configuration file
  * of the target board:
  *
- * #define CFG_IDE_SIL680
+ * #define CONFIG_IDE_SIL680
  *
  * #define CONFIG_PCI_PNP
  * NOTE it may also be necessary to define this if the default of 8 is
  */
 
 #include <common.h>
-#if defined(CFG_IDE_SIL680)
 #include <ata.h>
 #include <ide.h>
 #include <pci.h>
 void ide_set_reset (int flag) {
        return;
 }
-
-#endif /* CFG_IDE_SIL680 */
 
 
 #include <common.h>
 
-#ifdef CONFIG_SCSI_SYM53C8XX
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
 #endif
 }
 #endif
-
-
-#endif /* CONFIG_SCSI_SYM53C8XX */
 
 #include <part.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_SYSTEMACE
-
 /*
  * The ace_readw and writew functions read/write 16bit words, but the
  * offset value is the BYTE offset as most used in the Xilinx
 
        return blkcnt;
 }
-#endif /* CONFIG_SYSTEMACE */
 
 #define CFG_SATA_MAXBUS         2       /*Max Sata buses supported */
 #define CFG_SATA_DEVS_PER_BUS   2      /*Max no. of devices per bus/port */
 #define CFG_SATA_MAX_DEVICE     (CFG_SATA_MAXBUS* CFG_SATA_DEVS_PER_BUS)
-#define CFG_ATA_PIIX            1       /*Supports ata_piix driver */
+#define CONFIG_ATA_PIIX                1       /*Supports ata_piix driver */
 
 /************************************************************
  * DISK Partition support