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

include ../Makefile.conf

TARGETS = ../modules/snd-interwave.o \
	  ../modules/snd-gusmax.o \
	  ../modules/snd-gusextreme.o \
	  ../modules/snd-gusclassic.o \
          ../modules/snd-audiodrive1688.o \
	  ../modules/snd-sb8.o \
          ../modules/snd-sb16.o

INTERWAVE = interwave.o
GUSMAX = gusmax.o
GUSEXTREME = gusextreme.o
GUSCLASSIC = gusclassic.o
AUDIODRIVE1688 = audiodrive1688.o
SB8 = sb8.o
SB16 = sb16.o
OPL3SA = opl3-sa.o

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

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

../modules/snd-interwave.o: .depend $(INTERWAVE)
	$(LINKER) -o $@ $(INTERWAVE)

../modules/snd-gusmax.o: .depend $(GUSMAX)
	$(LINKER) -o $@ $(GUSMAX)

../modules/snd-gusextreme.o: .depend $(GUSEXTREME)
	$(LINKER) -o $@ $(GUSEXTREME)

../modules/snd-gusclassic.o: .depend $(GUSCLASSIC)
	$(LINKER) -o $@ $(GUSCLASSIC)

../modules/snd-audiodrive1688.o: .depend $(AUDIODRIVE1688)
	$(LINKER) -o $@ $(AUDIODRIVE1688)

../modules/snd-sb8.o: .depend $(SB8)
	$(LINKER) -o $@ $(SB8)

../modules/snd-sb16.o: .depend $(SB16)
	$(LINKER) -o $@ $(SB16)

../modules/snd-opl3sa.o: .depend $(OPL3SA)
	$(LINKER) -o $@ $(OPL3SA)

gcompile: $(TARGETS)

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

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

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
