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/fdos/Makefile | 6 +++--- fs/fdos/dev.c | 5 ----- fs/fdos/fat.c | 4 ---- fs/fdos/fdos.c | 5 +---- fs/fdos/fs.c | 4 ---- fs/fdos/subdir.c | 3 --- fs/fdos/vfat.c | 5 ----- 7 files changed, 4 insertions(+), 28 deletions(-) (limited to 'fs/fdos') diff --git a/fs/fdos/Makefile b/fs/fdos/Makefile index 2dba0fb690..fce2032bdd 100644 --- a/fs/fdos/Makefile +++ b/fs/fdos/Makefile @@ -31,10 +31,10 @@ include $(TOPDIR)/config.mk LIB = $(obj)libfdos.a AOBJS = -COBJS = fat.o vfat.o dev.o fdos.o fs.o subdir.o +COBJS-$(CONFIG_CMD_FDOS) := fat.o vfat.o dev.o fdos.o fs.o subdir.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/fdos/dev.c b/fs/fdos/dev.c index 271d0e790b..b55b6ed2d6 100644 --- a/fs/fdos/dev.c +++ b/fs/fdos/dev.c @@ -28,8 +28,6 @@ #include "dos.h" #include "fdos.h" -#if defined(CONFIG_CMD_FDOS) - #define NB_HEADS 2 #define NB_TRACKS 80 #define NB_SECTORS 18 @@ -190,6 +188,3 @@ int check_dev (BootSector_t *boot, Fs_t *fs) return (0); } - - -#endif diff --git a/fs/fdos/fat.c b/fs/fdos/fat.c index 2e2d2b8cef..5707c1952c 100644 --- a/fs/fdos/fat.c +++ b/fs/fdos/fat.c @@ -26,8 +26,6 @@ #include #include -#if defined(CONFIG_CMD_FDOS) - #include "dos.h" #include "fdos.h" @@ -138,5 +136,3 @@ int read_fat (BootSector_t *boot, Fs_t *fs) } return (0); } - -#endif diff --git a/fs/fdos/fdos.c b/fs/fdos/fdos.c index 5be6a960e7..db585623c6 100644 --- a/fs/fdos/fdos.c +++ b/fs/fdos/fdos.c @@ -24,9 +24,8 @@ #include #include - -#if defined(CONFIG_CMD_FDOS) #include + #include "dos.h" #include "fdos.h" @@ -171,5 +170,3 @@ int dos_dir (void) free (name); return (0); } - -#endif diff --git a/fs/fdos/fs.c b/fs/fdos/fs.c index aded6708d1..5acf1232c7 100644 --- a/fs/fdos/fs.c +++ b/fs/fdos/fs.c @@ -26,8 +26,6 @@ #include #include -#if defined(CONFIG_CMD_FDOS) - #include "dos.h" #include "fdos.h" @@ -114,5 +112,3 @@ int fs_init (Fs_t *fs) free (boot); return (0); } - -#endif diff --git a/fs/fdos/subdir.c b/fs/fdos/subdir.c index 497f554f91..5e96b0a65d 100644 --- a/fs/fdos/subdir.c +++ b/fs/fdos/subdir.c @@ -26,8 +26,6 @@ #include #include -#if defined(CONFIG_CMD_FDOS) - #include "dos.h" #include "fdos.h" @@ -345,4 +343,3 @@ int read_file (Fs_t *fs, } return (read); } -#endif diff --git a/fs/fdos/vfat.c b/fs/fdos/vfat.c index 0e7883b0ab..9f357a6212 100644 --- a/fs/fdos/vfat.c +++ b/fs/fdos/vfat.c @@ -24,8 +24,6 @@ #include #include - -#if defined(CONFIG_CMD_FDOS) #include #include "dos.h" @@ -352,6 +350,3 @@ static char *conv_name (char *name, char *ext, char Case, char *ans) } return (ans); } - - -#endif -- cgit v1.2.1