summaryrefslogtreecommitdiff
path: root/fs/cramfs
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-31 04:24:56 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-31 04:24:56 +0200
commit08ab4e1780fa63c88dd5a5ab52f4ff4ed1ee1878 (patch)
tree0b8d061f6fd4b7ad68b94e509e644e5456a44613 /fs/cramfs
parentc1de7a6daf9c657484e1c6d433f01fccd49a7f48 (diff)
fs: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'fs/cramfs')
-rw-r--r--fs/cramfs/Makefile7
-rw-r--r--fs/cramfs/cramfs.c5
-rw-r--r--fs/cramfs/uncompress.c4
3 files changed, 4 insertions, 12 deletions
diff --git a/fs/cramfs/Makefile b/fs/cramfs/Makefile
index 13c043fcde9..7b6cc0ad3e5 100644
--- a/fs/cramfs/Makefile
+++ b/fs/cramfs/Makefile
@@ -26,10 +26,11 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libcramfs.a
AOBJS =
-COBJS = cramfs.o uncompress.o
+COBJS-$(CONFIG_CMD_CRAMFS) := cramfs.o
+COBJS-$(CONFIG_CMD_CRAMFS) += uncompress.o
-SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
+SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y))
#CPPFLAGS +=
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index e53c783e5a4..2956d390da0 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -26,9 +26,6 @@
#include <common.h>
#include <malloc.h>
-
-#if defined(CONFIG_CMD_CRAMFS)
-
#include <asm/byteorder.h>
#include <linux/stat.h>
#include <jffs2/jffs2.h>
@@ -343,5 +340,3 @@ int cramfs_check (struct part_info *info)
}
return 1;
}
-
-#endif /* CFG_FS_CRAMFS */
diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c
index cf67967904b..39dd2751be7 100644
--- a/fs/cramfs/uncompress.c
+++ b/fs/cramfs/uncompress.c
@@ -25,8 +25,6 @@
#include <watchdog.h>
#include <zlib.h>
-#if defined(CONFIG_CMD_CRAMFS)
-
static z_stream stream;
void *zalloc(void *, unsigned, unsigned);
@@ -86,5 +84,3 @@ int cramfs_uncompress_exit (void)
inflateEnd (&stream);
return 0;
}
-
-#endif /* CFG_FS_CRAMFS */