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

TOPDIR   = ../..

include  $(TOPDIR)/Makefile.conf

TARGETS  = $(SNDVERSIONS) \
           $(TOPDIR)/modules/snd-sb-dsp.o \
           $(TOPDIR)/modules/snd-emu8000.o
SYMFILES = sb_export.c emu8000_export.c
SBDSP    = sb.o sb8.o sb16.o mixer.o midi.o sb_export.o
EMU8000  = emu8000.o emu8000_export.o

include  $(TOPDIR)/Rules.make

all: $(TARGETS)
	@echo
	@echo "ALSA SoundBlaster modules were sucessfully compiled."
	@echo

include  $(TOPDIR)/Rules1.make

$(TOPDIR)/modules/snd-sb-dsp.o: .depend $(SNDVERSIONS) $(SBDSP)
	$(LINKER) -o $@ $(SBDSP)

$(TOPDIR)/modules/snd-emu8000.o: .depend $(SNDVERSIONS) $(EMU8000)
	$(LINKER) -o $@ $(EMU8000)

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
