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

TOPDIR   = ../..

include $(TOPDIR)/Makefile.conf

TARGETS  = $(SNDVERSIONS) \
           $(TOPDIR)/modules/snd-gus.o
GUS      = gus_io.o gus_irq.o gus_timer.o \
           gus_mem.o gus_mem_proc.o gus_dram.o gus_dma.o gus_volume.o \
           gus_pcm.o gus_mixer.o \
	   gus_uart.o \
           gus_reset.o gus.o
EXPORTS  = gus.o
SYNTH	 = gus_synth.o gus_sample.o gus_simple.o gus_instr.o
ifeq (1,$(CONFIG_SND_SEQUENCER))
TARGETS	 += $(TOPDIR)/modules/snd-synth-gus.o
endif

include $(TOPDIR)/Rules.make

all: $(TARGETS)

include $(TOPDIR)/Rules1.make

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

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

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
