#
#       Copyright (C) 1997-1998 Claus-Justus Heine.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Source: /usr/src/oldsrc/cvs/ftape-stacked/ftape/Makefile,v $
# $Revision: 1.16 $
# $Date: 1998/08/18 08:15:57 $
#
#      Makefile for the QIC-40/80/3010/3020 floppy-tape driver for
#      Linux.
#

#
#  This isn't used inside the kernel, only for my private development
#  version
#
ifndef TOPDIR
TOPDIR= ..
include $(TOPDIR)/MCONFIG
endif

SUB_DIRS     := 
MOD_SUB_DIRS := setup $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS)	lowlevel internal parport \
				zftape compressor setup

ifeq ($(CONFIG_FTAPE),y)
  O_TARGET := ftape.o
  SUB_DIRS += lowlevel setup
  O_OBJS   += lowlevel/ftape.o
  O_OBJS   += setup/setup.o
else
  ifeq ($(CONFIG_FTAPE),m)
    MOD_SUB_DIRS += lowlevel
  endif
endif

ifeq ($(CONFIG_FT_INTERNAL),y)
  SUB_DIRS += internal
  O_OBJS   += internal/ftape-internal.o
else
  ifeq ($(CONFIG_FT_INTERNAL),m)
    MOD_SUB_DIRS += internal
  endif
endif  

PAR_SUB_DIRS :=
PAR_MOD_SUB_DIRS :=
PAR_O_OBJS :=

ifeq ($(CONFIG_FT_TRAKKER),y)
  PAR_SUB_DIRS := parport
else
  ifeq ($(CONFIG_FT_TRAKKER),m)
    PAR_MOD_SUB_DIRS := parport
  endif
endif

ifeq ($(CONFIG_FT_BPCK),y)
  PAR_SUB_DIRS := parport
else
  ifeq ($(CONFIG_FT_BPCK),m)
    PAR_MOD_SUB_DIRS := parport
  endif
endif

ifeq ($(CONFIG_FT_TRAKKER),y)
  PAR_O_OBJS := parport/ftape-parport.o
endif  

ifeq ($(CONFIG_FT_BPCK),y)
  PAR_O_OBJS := parport/ftape-parport.o
endif  

ifdef PAR_SUB_DIRS
  SUB_DIRS     += $(PAR_SUB_DIRS)
endif
ifdef PAR_MOD_SUB_DIRS
  MOD_SUB_DIRS += $(PAR_MOD_SUB_DIRS)
endif
O_OBJS       += $(PAR_O_OBJS)

ifeq ($(CONFIG_ZFTAPE),y)
  SUB_DIRS += zftape
  O_OBJS   += zftape/zftape.o
else
  ifeq ($(CONFIG_ZFTAPE),m)
    MOD_SUB_DIRS += zftape
  endif
endif

ifeq ($(CONFIG_ZFT_COMPRESSOR),y)
  SUB_DIRS += compressor
  O_OBJS   += compressor/zft-compressor.o
else
  ifeq ($(CONFIG_ZFT_COMPRESSOR),m)
  MOD_SUB_DIRS += compressor
  endif
endif

include $(TOPDIR)/Rules.make
