#
# Makefile for misc devices that really don't fit anywhere else.
#
# 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 inherited from the
# parent makes..
#

.S.o:
	$(CC) $(AFLAGS) -c $< -o $*.o

O_TARGET := misc.o

list-multi := aes.o

ifneq ($(CONFIG_BLK_DEV_LOOP_AES),n)
AES_PENTIUM_ASM=n
ifeq ($(CONFIG_X86),y)
ifneq ($(CONFIG_X86_64),y)
ifneq ($(CONFIG_M386),y)
ifneq ($(CONFIG_M486),y)
  AES_PENTIUM_ASM=y
endif
endif
endif
endif

export-objs	+= aes-c.o aes-i586-ksym.o

ifeq ($(AES_PENTIUM_ASM),y)
  aes-objs := aes-i586.o aes-i586-ksym.o
else
  aes-objs := aes-c.o
endif
endif

obj-$(CONFIG_BLK_DEV_LOOP_AES) = aes.o

include $(TOPDIR)/Rules.make

fastdep:

# Link rules for multi-part drivers.

aes.o: $(aes-objs)
	$(LD) -r -o $@ $(aes-objs)
