#
# Makefile for the linux ext2-filesystem routines.
#
# 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...


#  Copyright (C) 2001 Alcatel Business Systems - R&D Illkirch
#	(transparent compression code)
#  Pierre Peiffer (pierre.peiffer@sxb.bsf.alcatel.fr) - Denis Richard (denis.richard@sxb.bsf.alcatel.fr)
#  Adapted from patch e2compr-0.4.39-patch-2.2.18 .
#

O_TARGET := ext2.o

ifeq ($(CONFIG_EXT2_COMPRESS),y)

subdir-$(CONFIG_EXT2_HAVE_BZIP2)	+= bzip
subdir-$(CONFIG_EXT2_HAVE_GZIP)		+= gzip
subdir-$(CONFIG_EXT2_HAVE_LZO)		+= lzo
subdir-$(CONFIG_EXT2_HAVE_LZV1)		+= lzv

COMPRESS_STUFF := adler32.o compress.o none.o compress_syms.o \
		$(join $(subdir-y),$(subdir-y:%=/%.o))

export-objs := compress_syms.o
endif

obj-y    := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
		ioctl.o namei.o super.o symlink.o \
            $(COMPRESS_STUFF)

ifeq ($(CONFIG_EXT2_FS),m)
obj-m    := $(O_TARGET)
else
obj-m    :=
endif

include $(TOPDIR)/Rules.make
