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

include ../../Makefile.conf

TARGETS = ../../modules/snd-gus.o
GUS = gus_io.o gus_irq.o \
      gus_mem.o gus_dma.o gus_volume.o \
      gus_pcm.o gus_mixer.o \
      gus_reset.o gus.o

.c.o:
	$(CC) $(COPTS) $(INCLUDE) -c -o $*.o $<

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

../../modules/snd-gus.o: .depend $(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 core .depend *.o *.orig snd.map snd.map? *~

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

dep:	.depend

dummy:

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