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/cramfs/Makefile | 7 ++++--- fs/cramfs/cramfs.c | 5 ----- fs/cramfs/uncompress.c | 4 ---- 3 files changed, 4 insertions(+), 12 deletions(-) (limited to 'fs/cramfs') diff --git a/fs/cramfs/Makefile b/fs/cramfs/Makefile index 13c043fcde..7b6cc0ad3e 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 e53c783e5a..2956d390da 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -26,9 +26,6 @@ #include #include - -#if defined(CONFIG_CMD_CRAMFS) - #include #include #include @@ -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 cf67967904..39dd2751be 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -25,8 +25,6 @@ #include #include -#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 */ -- cgit v1.2.1