#
# 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-gus.o
SYMFILES = gus_export.c 
GUS      = gus_io.o gus_irq.o \
           gus_mem.o gus_dma.o gus_volume.o \
           gus_pcm.o gus_mixer.o \
	   gus_uart.o \
           gus_reset.o gus.o \
           gus_export.o

include $(TOPDIR)/Rules.make

all: $(TARGETS)
	@echo
	@echo "ALSA GUS & InterWave modules were sucessfully compiled."
	@echo

include $(TOPDIR)/Rules1.make

$(TOPDIR)/modules/snd-gus.o: .depend $(SNDVERSIONS) $(GUS)
	$(LINKER) -o $@ $(GUS)

gcompile: $(TARGETS)

insert: $(TARGETS) remove
	sync		# for sure - debug versions may hang
	/sbin/insmod snd-gus.o

remove:
	sync		# for sure - debug versions may hang
	- /sbin/rmmod snd-gus

clean:
	rm -f .depend *.o *.orig snd.map snd.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
