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

TOPDIR   = ../..

include $(TOPDIR)/Makefile.conf
include $(TOPDIR)/cards.config

TARGETS  = $(SNDVERSIONS)
ifeq (1,$(CONFIG_SND_HAL2))
TARGETS += $(TOPDIR)/modules/snd-hal2.o
EXPORTS += hal2.o
endif

HAL2     = hal2.o

include $(TOPDIR)/Rules.make

all: $(TARGETS)

include $(TOPDIR)/Rules1.make

$(TOPDIR)/modules/snd-hal2.o: .depend $(SNDVERSIONS) $(HAL2)
	$(LINKER) -o $@ $(HAL2)

gcompile: $(TARGETS)

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

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

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
