#
# Makefile for ALSA
# Copyright (c) 1999 by Jaroslav Kysela <perex@suse.cz>
#

EXTRA_CFLAGS := -I../../include

SUB_DIRS     :=
MOD_SUB_DIRS :=
ALL_SUB_DIRS :=

L_TARGET     := snd_generic.a
M_OBJS	     :=
L_OBJS       :=
LX_OBJS      :=
MIX_OBJS     :=

ifeq ($(CONFIG_SND_MPU401_UART),y)
  LX_OBJS += mpu401_uart.o
else
  ifeq ($(CONFIG_SND_MPU401_UART),m)
    M_OBJS += snd-mpu401-uart.o
    MIX_OBJS += mpu401_uart.o
  endif
endif

ifeq ($(CONFIG_SND_OPL3),y)
  LX_OBJS += opl3.o
else
  ifeq ($(CONFIG_SND_OPL3),m)
    M_OBJS += snd-opl3.o
    MIX_OBJS += opl3.o
  endif
endif

ifeq ($(CONFIG_SND_AC97_CODEC),y)
  LX_OBJS += ac97_codec.o
else
  ifeq ($(CONFIG_SND_AC97_CODEC),m)
    M_OBJS += snd-ac97-codec.o
    MIX_OBJS += ac97_codec.o
  endif
endif

ifeq ($(CONFIG_SND_AK4531_CODEC),y)
  LX_OBJS += ak4531_codec.o
else
  ifeq ($(CONFIG_SND_AK4531_CODEC),m)
    M_OBJS += snd-ak4531-codec.o
    MIX_OBJS += ak4531_codec.o
  endif
endif

ifeq ($(CONFIG_SND_UART16550),y)
  LX_OBJS += uart16550.o
  L_OBJS += uart16550_seq.o
else
  ifeq ($(CONFIG_SND_UART16550),m)
    M_OBJS += snd-uart16550.o
    MIX_OBJS += uart16550.o
  endif
endif

include $(TOPDIR)/Rules.make

snd-mpu401-uart.o: mpu401_uart.o
	$(LD) $(LD_RFLAG) -r -o $@ mpu401_uart.o

snd-opl3.o: opl3.o
	$(LD) $(LD_RFLAG) -r -o $@ opl3.o

snd-ac97-codec.o: ac97_codec.o
	$(LD) $(LD_RFLAG) -r -o $@ ac97_codec.o

snd-ak4531-codec.o: ak4531_codec.o
	$(LD) $(LD_RFLAG) -r -o $@ ak4531_codec.o

snd-uart16550.o: uart16550.o uart16550_seq.o
	$(LD) $(LD_RFLAG) -r -o $@ uart16550.o uart16550_seq.o
