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

ifeq ($(CONFIG_SND_S3_86C617),y)
  LX_OBJS += s3_86c617.o
else
  ifeq ($(CONFIG_SND_S3_86C617),m)
    M_OBJS += snd-s3-86c617.o
    MIX_OBJS += s3_86c617.o
  endif
endif

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

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

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

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

ifeq ($(CONFIG_SND_SEQUENCER),y)
  ifeq ($(CONFIG_SND_TRIDENT),y)
    L_OBJS += trident_synth.o
  else
    ifeq ($(CONFIG_SND_TRIDENT),m)
      M_OBJS += snd-synth-trident.o
    endif
  endif
endif

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

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

include $(TOPDIR)/Rules.make

snd-s3-86c617.o: s3_86c617.o
	$(LD) $(LD_RFLAG) -r -o $@ s3_86c617.o

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

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

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

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

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

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

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