fs: Move conditional compilation to Makefile

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/fs/cramfs/Makefile b/fs/cramfs/Makefile
index 13c043f..7b6cc0a 100644
--- a/fs/cramfs/Makefile
+++ b/fs/cramfs/Makefile
@@ -26,10 +26,11 @@
 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 +=