From 08ab4e1780fa63c88dd5a5ab52f4ff4ed1ee1878 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 31 Aug 2008 04:24:56 +0200 Subject: fs: Move conditional compilation to Makefile Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- fs/jffs2/Makefile | 8 +++++--- fs/jffs2/compr_lzari.c | 3 --- fs/jffs2/compr_lzo.c | 4 ---- fs/jffs2/compr_rtime.c | 4 ---- fs/jffs2/compr_rubin.c | 4 ---- fs/jffs2/compr_zlib.c | 4 ---- fs/jffs2/jffs2_1pass.c | 5 ----- fs/jffs2/jffs2_nand_1pass.c | 2 +- fs/jffs2/mini_inflate.c | 5 ----- 9 files changed, 6 insertions(+), 33 deletions(-) (limited to 'fs/jffs2') diff --git a/fs/jffs2/Makefile b/fs/jffs2/Makefile index a071af1f6e..fd6a1050c6 100644 --- a/fs/jffs2/Makefile +++ b/fs/jffs2/Makefile @@ -26,13 +26,15 @@ include $(TOPDIR)/config.mk LIB = $(obj)libjffs2.a AOBJS = -COBJS-y += jffs2_1pass.o +ifdef CONFIG_CMD_JFFS2 +COBJS-$(CONFIG_JFFS2_LZO_LZARI) += compr_lzari.o +COBJS-$(CONFIG_JFFS2_LZO_LZARI) += compr_lzo.o COBJS-y += compr_rtime.o COBJS-y += compr_rubin.o COBJS-y += compr_zlib.o +COBJS-y += jffs2_1pass.o COBJS-y += mini_inflate.o -COBJS-y += compr_lzo.o -COBJS-y += compr_lzari.o +endif COBJS := $(COBJS-y) SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/fs/jffs2/compr_lzari.c b/fs/jffs2/compr_lzari.c index f64bc74a9e..6a29608562 100644 --- a/fs/jffs2/compr_lzari.c +++ b/fs/jffs2/compr_lzari.c @@ -50,8 +50,6 @@ All rights reserved. Permission granted for non-commercial use. #include -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI) - #include #include @@ -259,4 +257,3 @@ int lzari_decompress(unsigned char *data_in, unsigned char *cpage_out, { return Decode(data_in, cpage_out, srclen, destlen); } -#endif diff --git a/fs/jffs2/compr_lzo.c b/fs/jffs2/compr_lzo.c index a32b9934e4..e648ec4fb2 100644 --- a/fs/jffs2/compr_lzo.c +++ b/fs/jffs2/compr_lzo.c @@ -67,8 +67,6 @@ #include -#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI) - #include #include #include @@ -401,5 +399,3 @@ int lzo_decompress(unsigned char *data_in, unsigned char *cpage_out, lzo_uint outlen = destlen; return lzo1x_decompress (data_in, srclen, cpage_out, &outlen, NULL); } - -#endif diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c index 144263c422..89b9f2f13e 100644 --- a/fs/jffs2/compr_rtime.c +++ b/fs/jffs2/compr_rtime.c @@ -46,8 +46,6 @@ */ #include -#if defined(CONFIG_CMD_JFFS2) - #include void rtime_decompress(unsigned char *data_in, unsigned char *cpage_out, @@ -87,5 +85,3 @@ void rtime_decompress(unsigned char *data_in, unsigned char *cpage_out, } } } - -#endif diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index f6f3fa1b58..9ff2217738 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -39,8 +39,6 @@ */ #include -#if defined(CONFIG_CMD_JFFS2) - #include #include @@ -122,5 +120,3 @@ void dynrubin_decompress(unsigned char *data_in, unsigned char *cpage_out, rubin_do_decompress(bits, data_in+8, cpage_out, dstlen); } - -#endif diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 29dfe1b664..d306b6dc4c 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c @@ -37,8 +37,6 @@ #include #include -#if defined(CONFIG_CMD_JFFS2) - #include #include @@ -48,5 +46,3 @@ long zlib_decompress(unsigned char *data_in, unsigned char *cpage_out, return (decompress_block(cpage_out, data_in + 2, (void *) ldr_memcpy)); } - -#endif diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index b5e7ab8b19..5d22dd78e9 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -117,9 +117,6 @@ #include #include #include - -#if defined(CONFIG_CMD_JFFS2) - #include #include @@ -1394,5 +1391,3 @@ jffs2_1pass_info(struct part_info * part) } return 1; } - -#endif diff --git a/fs/jffs2/jffs2_nand_1pass.c b/fs/jffs2/jffs2_nand_1pass.c index 9f6de7d32a..e288d5a84a 100644 --- a/fs/jffs2/jffs2_nand_1pass.c +++ b/fs/jffs2/jffs2_nand_1pass.c @@ -1,6 +1,6 @@ #include -#if !defined(CONFIG_NAND_LEGACY) && defined(CONFIG_CMD_JFFS2) +#if !defined(CONFIG_NAND_LEGACY) #include #include diff --git a/fs/jffs2/mini_inflate.c b/fs/jffs2/mini_inflate.c index 4c50fc32dc..bd40a575ed 100644 --- a/fs/jffs2/mini_inflate.c +++ b/fs/jffs2/mini_inflate.c @@ -24,9 +24,6 @@ */ #include - -#if defined(CONFIG_CMD_JFFS2) - #include /* The order that the code lengths in section 3.2.7 are in */ @@ -392,5 +389,3 @@ long decompress_block(unsigned char *dest, unsigned char *source, #endif return stream.error ? -stream.error : stream.decoded; } - -#endif -- cgit v1.2.1