fs: Move conditional compilation to Makefile

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/fs/reiserfs/Makefile b/fs/reiserfs/Makefile
index e8711a4..9cef8ee 100644
--- a/fs/reiserfs/Makefile
+++ b/fs/reiserfs/Makefile
@@ -30,10 +30,10 @@
 LIB	= $(obj)libreiserfs.a
 
 AOBJS	=
-COBJS	= reiserfs.o dev.o mode_string.o
+COBJS-$(CONFIG_CMD_REISER) := reiserfs.o dev.o mode_string.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/reiserfs/dev.c b/fs/reiserfs/dev.c
index 46dc414..1facfaf 100644
--- a/fs/reiserfs/dev.c
+++ b/fs/reiserfs/dev.c
@@ -19,8 +19,6 @@
 
 
 #include <common.h>
-#if defined(CONFIG_CMD_REISER)
-
 #include <config.h>
 #include <reiserfs.h>
 
@@ -119,5 +117,3 @@
 
 	return 1;
 }
-
-#endif
diff --git a/fs/reiserfs/mode_string.c b/fs/reiserfs/mode_string.c
index 3e57ee4..801263d 100644
--- a/fs/reiserfs/mode_string.c
+++ b/fs/reiserfs/mode_string.c
@@ -25,7 +25,6 @@
 
 
 #include <common.h>
-#if defined(CONFIG_CMD_REISER)
 #include <linux/stat.h>
 
 #if ( S_ISUID != 04000 ) || ( S_ISGID != 02000 ) || ( S_ISVTX != 01000 ) \
@@ -137,5 +136,3 @@
 }
 
 #endif
-
-#endif
diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c
index aa96361..d84fb20 100644
--- a/fs/reiserfs/reiserfs.c
+++ b/fs/reiserfs/reiserfs.c
@@ -29,8 +29,6 @@
  */
 
 #include <common.h>
-#if defined(CONFIG_CMD_REISER)
-
 #include <malloc.h>
 #include <linux/ctype.h>
 #include <linux/time.h>
@@ -982,5 +980,3 @@
 	}
 	return filemax;
 }
-
-#endif