LIB    = $(obj)libgeneric.a
 
 COBJS-$(CONFIG_ADDR_MAP) += addr_map.o
-COBJS-y += bzlib.o
-COBJS-y += bzlib_crctable.o
-COBJS-y += bzlib_decompress.o
-COBJS-y += bzlib_randtable.o
-COBJS-y += bzlib_huffman.o
+COBJS-$(CONFIG_BZIP2) += bzlib.o
+COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
+COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
+COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
+COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
 COBJS-y += crc16.o
 COBJS-y += crc32.o
 COBJS-y += ctype.o
 
 #include <config.h>
 #include <common.h>
 #include <watchdog.h>
-#ifdef CONFIG_BZIP2
 
 /*
  * This file is a modified version of bzlib.c from the bzip2-1.0.2
 /*-------------------------------------------------------------*/
 /*--- end                                           bzlib.c ---*/
 /*-------------------------------------------------------------*/
-
-#endif /* CONFIG_BZIP2 */
 
 #include <config.h>
-#ifdef CONFIG_BZIP2
 
 /*-------------------------------------------------------------*/
 /*--- Table for doing CRCs                                  ---*/
 /*-------------------------------------------------------------*/
 /*--- end                                        crctable.c ---*/
 /*-------------------------------------------------------------*/
-
-#endif /* CONFIG_BZIP2 */
 
 #include <config.h>
 #include <common.h>
 #include <watchdog.h>
-#ifdef CONFIG_BZIP2
 
 /*-------------------------------------------------------------*/
 /*--- Decompression machinery                               ---*/
 /*-------------------------------------------------------------*/
 /*--- end                                      decompress.c ---*/
 /*-------------------------------------------------------------*/
-
-#endif /* CONFIG_BZIP2 */
 
 #include <config.h>
-#ifdef CONFIG_BZIP2
 
 /*-------------------------------------------------------------*/
 /*--- Huffman coding low-level stuff                        ---*/
 /*-------------------------------------------------------------*/
 /*--- end                                         huffman.c ---*/
 /*-------------------------------------------------------------*/
-
-#endif /* CONFIG_BZIP2 */
 
 #include <config.h>
-#ifdef CONFIG_BZIP2
 
 /*-------------------------------------------------------------*/
 /*--- Table for randomising repetitive blocks               ---*/
 /*-------------------------------------------------------------*/
 /*--- end                                       randtable.c ---*/
 /*-------------------------------------------------------------*/
-
-#endif /* CONFIG_BZIP2 */