#
# Makefile for the linux filesystem.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...

L_TARGET := filesystems.a
L_OBJS    = $(join $(SUB_DIRS),$(SUB_DIRS:%=/%.o))
O_TARGET := fs.o
O_OBJS    = open.o read_write.o inode.o devices.o file_table.o buffer.o \
		super.o  block_dev.o stat.o exec.o pipe.o namei.o fcntl.o \
		ioctl.o readdir.o select.o fifo.o locks.o filesystems.o \
		dcache.o $(BINFMTS) 

MOD_LIST_NAME := FS_MODULES
ALL_SUB_DIRS = nfs nfsd lockd

ifeq ($(CONFIG_NFS_FS),y)
SUB_DIRS += nfs
NEED_LOCKD_KERN = y
else
  ifeq ($(CONFIG_NFS_FS),m)
  MOD_SUB_DIRS += nfs
  NEED_LOCKD_MOD = y
  endif
endif

ifeq ($(CONFIG_NFSD),y)
SUB_DIRS += nfsd
NEED_LOCKD_KERN = y
else
  ifeq ($(CONFIG_NFSD),m)
  MOD_SUB_DIRS += nfsd
  NEED_LOCKD_MOD = y
  endif
endif

ifeq ($(NEED_LOCKD_KERN),y)
SUB_DIRS += lockd
else
  ifeq ($(NEED_LOCKD_MOD),y)
  MOD_SUB_DIRS += lockd
  endif
endif


include $(TOPDIR)/Rules.make
