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

EXTRA_CFLAGS := -I../include

SUB_DIRS     :=
MOD_SUB_DIRS :=
ALL_SUB_DIRS := hal2

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

ifeq ($(CONFIG_SND_SGI),y)
  SUB_DIRS += hal2
  MOD_SUB_DIRS += hal2
endif

ifeq ($(CONFIG_SND_CARD_DUMMY),y)
  L_OBJS += card-dummy.o
else
  ifeq ($(CONFIG_SND_CARD_DUMMY),m)
    M_OBJS += snd-card-dummy.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_INTERWAVE),y)
  L_OBJS += card-interwave.o
else
  ifeq ($(CONFIG_SND_CARD_INTERWAVE),m)
    M_OBJS += snd-card-interwave.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_INTERWAVE_STB),y)
  L_OBJS += card-interwave-stb.o
else
  ifeq ($(CONFIG_SND_CARD_INTERWAVE_STB),m)
    M_OBJS += snd-card-interwave-stb.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_GUSMAX),y)
  L_OBJS += card-gusmax.o
else
  ifeq ($(CONFIG_SND_CARD_GUSMAX),m)
    M_OBJS += snd-card-gusmax.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_GUSEXTREME),y)
  L_OBJS += card-gusextreme.o
else
  ifeq ($(CONFIG_SND_CARD_GUSEXTREME),m)
    M_OBJS += snd-card-gusextreme.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_GUSCLASSIC),y)
  L_OBJS += card-gusclassic.o
else
  ifeq ($(CONFIG_SND_CARD_GUSCLASSIC),m)
    M_OBJS += snd-card-gusclassic.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_ES1688),y)
  L_OBJS += card-es1688.o
else
  ifeq ($(CONFIG_SND_CARD_ES1688),m)
    M_OBJS += snd-card-es1688.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_ES18XX),y)
  L_OBJS += card-es18xx.o
else
  ifeq ($(CONFIG_SND_CARD_ES18XX),m)
    M_OBJS += snd-card-es18xx.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_SB8),y)
  L_OBJS += card-sb8.o
else
  ifeq ($(CONFIG_SND_CARD_SB8),m)
    M_OBJS += snd-card-sb8.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_SB16),y)
  L_OBJS += card-sb16.o
else
  ifeq ($(CONFIG_SND_CARD_SB16),m)
    M_OBJS += snd-card-sb16.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_SBAWE),y)
  L_OBJS += card-sbawe.o
else
  ifeq ($(CONFIG_SND_CARD_SBAWE),m)
    M_OBJS += snd-card-sbawe.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_OPL3SA2),y)
  L_OBJS += card-opl3sa2.o
else
  ifeq ($(CONFIG_SND_CARD_OPL3SA2),m)
    M_OBJS += snd-card-opl3sa2.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_MOZART),y)
  L_OBJS += card-mozart.o
else
  ifeq ($(CONFIG_SND_CARD_MOZART),m)
    M_OBJS += snd-card-mozart.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_OPTI9XX),y)
  L_OBJS += card-opti9xx.o
else
  ifeq ($(CONFIG_SND_CARD_OPTI9XX),m)
    M_OBJS += snd-card-opti9xx.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_AD1848),y)
  L_OBJS += card-ad1848.o
else
  ifeq ($(CONFIG_SND_CARD_AD1848),m)
    M_OBJS += snd-card-ad1848.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_ALS100),y)
  L_OBJS += card-als100.o
else
  ifeq ($(CONFIG_SND_CARD_ALS100),m)
    M_OBJS += snd-card-als100.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_AZT2320),y)
  L_OBJS += card-azt2320.o
else
  ifeq ($(CONFIG_SND_CARD_AZT2320),m)
    M_OBJS += snd-card-azt2320.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_CS4231),y)
  L_OBJS += card-cs4231.o
else
  ifeq ($(CONFIG_SND_CARD_CS4231),m)
    M_OBJS += snd-card-cs4231.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_CS4232),y)
  L_OBJS += card-cs4232.o
else
  ifeq ($(CONFIG_SND_CARD_CS4232),m)
    M_OBJS += snd-card-cs4232.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_CS4236),y)
  L_OBJS += card-cs4236.o
else
  ifeq ($(CONFIG_SND_CARD_CS4236),m)
    M_OBJS += snd-card-cs4236.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_SERIAL),y)
  L_OBJS += card-serial.o
else
  ifeq ($(CONFIG_SND_CARD_SERIAL),m)
    M_OBJS += snd-card-serial.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_SGALAXY),y)
  L_OBJS += card-sgalaxy.o
else
  ifeq ($(CONFIG_SND_CARD_SGALAXY),m)
    M_OBJS += snd-card-sgalaxy.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_WAVEFRONT),y)
  L_OBJS += card-wavefront.o
else
  ifeq ($(CONFIG_SND_CARD_WAVEFRONT),m)
    M_OBJS += snd-card-wavefront.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_CMI8330),y)
  L_OBJS += card-cmi8330.o
else
  ifeq ($(CONFIG_SND_CARD_CMI8330),m)
    M_OBJS += snd-card-cmi8330.o
  endif
endif

ifeq ($(CONFIG_SND_CARD_ES968),y)
  L_OBJS += card-es968.o
else
  ifeq ($(CONFIG_SND_CARD_ES968),m)
    M_OBJS += snd-card-es968.o
  endif
endif

ifeq ($(CONFIG_PCI),y)

  ifeq ($(CONFIG_SND_CARD_SONICVIBES),y)
    L_OBJS += card-sonicvibes.o
  else
    ifeq ($(CONFIG_SND_CARD_SONICVIBES),m)
      M_OBJS += snd-card-sonicvibes.o
    endif
  endif

  ifeq ($(CONFIG_SND_CARD_ENS1370),y)
    L_OBJS += card-ens1370.o
  else
    ifeq ($(CONFIG_SND_CARD_ENS1370),m)
      M_OBJS += snd-card-ens1370.o
    endif
  endif

  ifeq ($(CONFIG_SND_CARD_ENS1371),y)
    L_OBJS += card-ens1371.o
  else
    ifeq ($(CONFIG_SND_CARD_ENS1371),m)
      M_OBJS += snd-card-ens1371.o
    endif
  endif

  ifeq ($(CONFIG_SND_CARD_ES1938),y)
    L_OBJS += card-es1938.o
  else
    ifeq ($(CONFIG_SND_CARD_ES1938),m)
      M_OBJS += snd-card-es1938.o
    endif
  endif

  ifeq ($(CONFIG_SND_CARD_TRIDENT),y)
    L_OBJS += card-trident.o
  else
    ifeq ($(CONFIG_SND_CARD_TRIDENT),m)
      M_OBJS += snd-card-trident.o
    endif
  endif

  ifeq ($(CONFIG_SND_CARD_CS461X),y)
    L_OBJS += card-cs461x.o
  else
    ifeq ($(CONFIG_SND_CARD_CS461X),m)
      M_OBJS += snd-card-cs461x.o
    endif
  endif

  ifeq ($(CONFIG_SND_CARD_FM801),y)
    L_OBJS += card-fm801.o
  else
    ifeq ($(CONFIG_SND_CARD_FM801),m)
      M_OBJS += snd-card-fm801.o
    endif
  endif

endif  

include $(TOPDIR)/Rules.make

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

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

snd-card-interwave-stb.o: card-interwave-stb.o
	$(LD) $(LD_RFLAG) -r -o $@ card-interwave-stb.o

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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