#
|
#
|
# Makefile for the kernel block device drivers.
|
# Makefile for the kernel block device drivers.
|
#
|
#
|
# Note! Dependencies are done automagically by 'make dep', which also
|
# Note! Dependencies are done automagically by 'make dep', which also
|
# removes any old dependencies. DON'T put your own dependencies here
|
# removes any old dependencies. DON'T put your own dependencies here
|
# unless it's something special (ie not a .c file).
|
# unless it's something special (ie not a .c file).
|
#
|
#
|
# Note 2! The CFLAGS definition is now inherited from the
|
# Note 2! The CFLAGS definition is now inherited from the
|
# parent makefile.
|
# parent makefile.
|
#
|
#
|
|
|
all: links first_rule
|
all: links first_rule
|
|
|
L_TARGET := block.a
|
L_TARGET := block.a
|
L_OBJS := ll_rw_blk.o genhd.o
|
L_OBJS := ll_rw_blk.o genhd.o
|
M_OBJS :=
|
M_OBJS :=
|
MOD_LIST_NAME := BLOCK_MODULES
|
MOD_LIST_NAME := BLOCK_MODULES
|
|
|
LK = README.fd README.hd README.ide README.md \
|
LK = README.fd README.hd README.ide README.md \
|
ide_modes.h ide-cd.c ide-tape.c ide-tape.h \
|
ide_modes.h ide-cd.c ide-tape.c ide-tape.h \
|
linear.c loop.c md.c raid0.c raid1.c raid5.c rd.c
|
linear.c loop.c md.c raid0.c raid1.c raid5.c rd.c
|
|
|
# Architecture dependencies
|
# Architecture dependencies
|
|
|
ifeq ($(MACHINE),arc)
|
ifeq ($(MACHINE),arc)
|
FLOPPY = fd1772.o fd1772dma.o
|
FLOPPY = fd1772.o fd1772dma.o
|
FLOPPYMOD = fd1772_mod.o
|
FLOPPYMOD = fd1772_mod.o
|
endif
|
endif
|
|
|
ifeq ($(MACHINE),a5k)
|
ifeq ($(MACHINE),a5k)
|
FLOPPY = floppy.o
|
FLOPPY = floppy.o
|
FLOPPYMOD = floppy.o
|
FLOPPYMOD = floppy.o
|
endif
|
endif
|
|
|
ifeq ($(MACHINE),rpc)
|
ifeq ($(MACHINE),rpc)
|
FLOPPY = floppy.o
|
FLOPPY = floppy.o
|
FLOPPYMOD = floppy.o
|
FLOPPYMOD = floppy.o
|
endif
|
endif
|
|
|
# Common dependencies
|
# Common dependencies
|
|
|
ifdef FLOPPY
|
ifdef FLOPPY
|
ifeq ($(CONFIG_BLK_DEV_FD),y)
|
ifeq ($(CONFIG_BLK_DEV_FD),y)
|
L_OBJS += $(FLOPPY)
|
L_OBJS += $(FLOPPY)
|
else
|
else
|
ifeq ($(CONFIG_BLK_DEV_FD),m)
|
ifeq ($(CONFIG_BLK_DEV_FD),m)
|
M_OBJS += $(FLOPPYMOD)
|
M_OBJS += $(FLOPPYMOD)
|
endif
|
endif
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_PART),y)
|
ifeq ($(CONFIG_BLK_DEV_PART),y)
|
L_OBJS += adfspart.o
|
L_OBJS += adfspart.o
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_RAM),y)
|
ifeq ($(CONFIG_BLK_DEV_RAM),y)
|
L_OBJS += rd.o
|
L_OBJS += rd.o
|
else
|
else
|
ifeq ($(CONFIG_BLK_DEV_RAM),m)
|
ifeq ($(CONFIG_BLK_DEV_RAM),m)
|
M_OBJS += rd.o
|
M_OBJS += rd.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_LOOP),y)
|
ifeq ($(CONFIG_BLK_DEV_LOOP),y)
|
L_OBJS += loop.o
|
L_OBJS += loop.o
|
else
|
else
|
ifeq ($(CONFIG_BLK_DEV_LOOP),m)
|
ifeq ($(CONFIG_BLK_DEV_LOOP),m)
|
M_OBJS += loop.o
|
M_OBJS += loop.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_HD),y)
|
ifeq ($(CONFIG_BLK_DEV_HD),y)
|
L_OBJS += hd.o
|
L_OBJS += hd.o
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_IDE),y)
|
ifeq ($(CONFIG_BLK_DEV_IDE),y)
|
L_OBJS += ide.o
|
L_OBJS += ide.o
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),y)
|
ifeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),y)
|
L_OBJS += ide-ics.o
|
L_OBJS += ide-ics.o
|
else
|
else
|
ifeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),m)
|
ifeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),m)
|
M_OBJS += ide-ics.o
|
M_OBJS += ide-ics.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_IDE_RAPIDE),y)
|
ifeq ($(CONFIG_BLK_DEV_IDE_RAPIDE),y)
|
L_OBJS += ide-rapide.o
|
L_OBJS += ide-rapide.o
|
else
|
else
|
ifeq ($(CONFIG_BLK_DEV_IDE_RAPIDE),m)
|
ifeq ($(CONFIG_BLK_DEV_IDE_RAPIDE),m)
|
M_OBJS += ide-rapide.o
|
M_OBJS += ide-rapide.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_IDECD),y)
|
ifeq ($(CONFIG_BLK_DEV_IDECD),y)
|
L_OBJS += ide-cd.o
|
L_OBJS += ide-cd.o
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_IDETAPE),y)
|
ifeq ($(CONFIG_BLK_DEV_IDETAPE),y)
|
L_OBJS += ide-tape.o
|
L_OBJS += ide-tape.o
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_IDEFLOPPY),y)
|
ifeq ($(CONFIG_BLK_DEV_IDEFLOPPY),y)
|
L_OBJS += ide-floppy.o
|
L_OBJS += ide-floppy.o
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_XD),y)
|
ifeq ($(CONFIG_BLK_DEV_XD),y)
|
L_OBJS += mfmhd.o mfm.o
|
L_OBJS += mfmhd.o mfm.o
|
else
|
else
|
ifeq ($(CONFIG_BLK_DEV_XD),m)
|
ifeq ($(CONFIG_BLK_DEV_XD),m)
|
M_OBJS += mfmhd_mod.o
|
M_OBJS += mfmhd_mod.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_BLK_DEV_MD),y)
|
ifeq ($(CONFIG_BLK_DEV_MD),y)
|
LX_OBJS += md.o
|
LX_OBJS += md.o
|
|
|
ifeq ($(CONFIG_MD_LINEAR),y)
|
ifeq ($(CONFIG_MD_LINEAR),y)
|
L_OBJS += linear.o
|
L_OBJS += linear.o
|
else
|
else
|
ifeq ($(CONFIG_MD_LINEAR),m)
|
ifeq ($(CONFIG_MD_LINEAR),m)
|
M_OBJS += linear.o
|
M_OBJS += linear.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_MD_STRIPED),y)
|
ifeq ($(CONFIG_MD_STRIPED),y)
|
L_OBJS += raid0.o
|
L_OBJS += raid0.o
|
else
|
else
|
ifeq ($(CONFIG_MD_STRIPED),m)
|
ifeq ($(CONFIG_MD_STRIPED),m)
|
M_OBJS += raid0.o
|
M_OBJS += raid0.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_MD_MIRRORING),y)
|
ifeq ($(CONFIG_MD_MIRRORING),y)
|
L_OBJS += raid1.o
|
L_OBJS += raid1.o
|
else
|
else
|
ifeq ($(CONFIG_MD_MIRRORING),m)
|
ifeq ($(CONFIG_MD_MIRRORING),m)
|
M_OBJS += raid1.o
|
M_OBJS += raid1.o
|
endif
|
endif
|
endif
|
endif
|
|
|
ifeq ($(CONFIG_MD_RAID5),y)
|
ifeq ($(CONFIG_MD_RAID5),y)
|
L_OBJS += raid5.o
|
L_OBJS += raid5.o
|
else
|
else
|
ifeq ($(CONFIG_MD_RAID5),m)
|
ifeq ($(CONFIG_MD_RAID5),m)
|
M_OBJS += raid5.o
|
M_OBJS += raid5.o
|
endif
|
endif
|
endif
|
endif
|
|
|
endif
|
endif
|
|
|
include $(TOPDIR)/Rules.make
|
include $(TOPDIR)/Rules.make
|
|
|
fastdep: links
|
fastdep: links
|
|
|
fd1772_mod.o: $(FLOPPY)
|
fd1772_mod.o: $(FLOPPY)
|
ld -r -o $@ $(FLOPPY)
|
ld -r -o $@ $(FLOPPY)
|
|
|
mfmhd_mod.o: mfmhd.o mfm.o
|
mfmhd_mod.o: mfmhd.o mfm.o
|
ld -r -o $@ mfmhd.o mfm.o
|
ld -r -o $@ mfmhd.o mfm.o
|
|
|
.PHONY: links
|
.PHONY: links
|
links:
|
links:
|
-@for f in $(LK); do \
|
-@for f in $(LK); do \
|
if [ ! -e $$f ]; then \
|
if [ ! -e $$f ]; then \
|
echo "ln -s ../../../../drivers/block/$$f ."; \
|
echo "ln -s ../../../../drivers/block/$$f ."; \
|
ln -s ../../../../drivers/block/$$f .; \
|
ln -s ../../../../drivers/block/$$f .; \
|
fi; \
|
fi; \
|
done
|
done
|
|
|
mrproper:
|
mrproper:
|
-@for f in $(LK); do \
|
-@for f in $(LK); do \
|
if [ -L $$f ]; then \
|
if [ -L $$f ]; then \
|
echo $(RM) $$f; \
|
echo $(RM) $$f; \
|
$(RM) $$f; \
|
$(RM) $$f; \
|
elif [ -f $$f ]; then \
|
elif [ -f $$f ]; then \
|
echo not removing $$f; \
|
echo not removing $$f; \
|
fi; \
|
fi; \
|
done
|
done
|
|
|
%.o: %.S
|
%.o: %.S
|
$(CC) $(CFLAGS) -E $< | tr ';$$' '\n#' > ..tmp.s
|
$(CC) $(CFLAGS) -E $< | tr ';$$' '\n#' > ..tmp.s
|
$(CC) $(CFLAGS) -c -o $@ ..tmp.s
|
$(CC) $(CFLAGS) -c -o $@ ..tmp.s
|
$(RM) ..tmp.s
|
$(RM) ..tmp.s
|
|
|