#
# 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_isa.a
M_OBJS	     :=
L_OBJS       :=
LX_OBJS      :=
MIX_OBJS     :=

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

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

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

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

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

ifeq ($(CONFIG_SND_WAVEFRONT_SYNTH),y)
  LX_OBJS += wavefront.o wavefront_midi.o wavefront_fx.o
else
  ifeq ($(CONFIG_SND_UART16550),m)
    M_OBJS += snd-wavefront-synth.o snd-wavefront-fx.o
    MIX_OBJS += wavefront.o wavefront_fx.o
  endif
endif

include $(TOPDIR)/Rules.make

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

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

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

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

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

snd-wavefront-synth.o: wavefront.o wavefront_midi.o
	$(LD) $(LD_RFLAG) -r -o $@ wavefront.o wavefront_midi.o

snd-wavefront-fx.o: wavefront_fx.o
	$(LD) $(LD_RFLAG) -r -o $@ wavefront_fx.o
