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/ext2/Makefile | 6 +++--- fs/ext2/dev.c | 3 --- fs/ext2/ext2fs.c | 4 ---- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'fs/ext2') diff --git a/fs/ext2/Makefile b/fs/ext2/Makefile index 8313cdc17c..712e348395 100644 --- a/fs/ext2/Makefile +++ b/fs/ext2/Makefile @@ -30,10 +30,10 @@ include $(TOPDIR)/config.mk LIB = $(obj)libext2fs.a AOBJS = -COBJS = ext2fs.o dev.o +COBJS-$(CONFIG_CMD_EXT2) := ext2fs.o dev.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/ext2/dev.c b/fs/ext2/dev.c index 1728b34fc8..3b49650bae 100644 --- a/fs/ext2/dev.c +++ b/fs/ext2/dev.c @@ -25,8 +25,6 @@ #include -#if defined(CONFIG_CMD_EXT2) - #include #include @@ -139,4 +137,3 @@ int ext2fs_devread (int sector, int byte_offset, int byte_len, char *buf) { } return (1); } -#endif diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index 78335510e2..436f4a4aa9 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -24,8 +24,6 @@ */ #include - -#if defined(CONFIG_CMD_EXT2) #include #include #include @@ -874,5 +872,3 @@ fail: ext2fs_root = NULL; return (0); } - -#endif -- cgit