#
# Makefile for ALSA low level driver (Linux version)
# Copyright (c) 1994-98 by Jaroslav Kysela <perex@suse.cz>
#

TOPDIR   = ../..

include  $(TOPDIR)/Makefile.conf
include  $(TOPDIR)/cards.config

TARGETS  = $(SNDVERSIONS)
ifeq (1,$(CONFIG_SND_EMU10K1))
TARGETS += $(TOPDIR)/modules/snd-emu10k1.o
EXPORTS += emu10k1.o
ifeq (1,$(CONFIG_SND_SYNTH_EMU10K1))
ifeq (1,$(CONFIG_SND_SEQUENCER))
TARGETS += $(TOPDIR)/modules/snd-synth-emu10k1.o
endif
endif
endif

EMU10K1	 = emu10k1.o io.o irq.o memory.o voice.o emumpu401.o emupcm.o\
	   emuproc.o emumixer.o
EMU10K1_SYNTH = emu10k1_synth.o emu10k1_callback.o emu10k1_patch.o

include  $(TOPDIR)/Rules.make

all: $(TARGETS)

include  $(TOPDIR)/Rules1.make

$(TOPDIR)/modules/snd-emu10k1.o: .depend $(SNDVERSIONS) $(EMU10K1)
	$(LINKER) -o $@ $(EMU10K1)

$(TOPDIR)/modules/snd-synth-emu10k1.o: .depend $(SNDVERSIONS) $(EMU10K1_SYNTH)
	$(LINKER) -o $@ $(EMU10K1_SYNTH)

gcompile: $(TARGETS)

clean:
	rm -f .depend *.o *.orig ultra.map ultra.map? *~
	rm -f core $(SNDVERSIONS) $(SYMFILES)

.depend: $(SYMFILES)
	$(CPP) $(COPTS) $(INCLUDE) *.c > .depend

dep:	.depend

dummy:

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
