# Makefile for 680x0 Linux blk_drv source directory
#
# Copyright 1993 by Hamish Macdonald
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "README.legal" in the main directory of this archive
# for more details.

include ../../MakeVars
include ../../.config

OBJS := ll_rw_blk.o  ramdisk.o genhd.o
SRCS := ll_rw_blk.c  ramdisk.c genhd.c

ifdef CONFIG_CDU31A
OBJS := $(OBJS) cdu31a.o
SRCS := $(SRCS) cdu31a.c
endif

ifdef CONFIG_MCD
OBJS := $(OBJS) mcd.o
SRCS := $(SRCS) mcd.c
endif

ifdef CONFIG_SBPCD
OBJS := $(OBJS) sbpcd.o
SRCS := $(SRCS) sbpcd.c
endif #CONFIG_SBPCD

ifdef CONFIG_BLK_DEV_HD
OBJS := $(OBJS) hd.o
SRCS := $(SRCS) hd.c
endif

ifdef CONFIG_AMIGA_IDE
OBJS := $(OBJS) amihd.o
SRCS := $(SRCS) amihd.c
endif

ifdef CONFIG_ATARI_FALCON_IDE
OBJS := $(OBJS) falhd.o
SRCS := $(SRCS) falhd.c
endif

ifdef CONFIG_AMIGA
OBJS := $(OBJS) amiflop.o
SRCS := $(SRCS) amiflop.c
endif

ifdef CONFIG_ATARI
OBJS := $(OBJS) ataflop.o
SRCS := $(SRCS) ataflop.c
endif

ifdef CONFIG_BLK_DEV_XD
OBJS := $(OBJS) xd.o
SRCS := $(SRCS) xd.c
endif

all: block.a

block.a: $(OBJS)
	rm -f block.a
	$(AR) rcs block.a $(OBJS)
	sync

dep:
	$(CPP) -M $(SRCS) > .depend

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
