#
# Makefile for ALSA Sequencer
# Copyright (c) Jaroslav Kysela <perex@suse.cz>
#

TOPDIR  = ../../..

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

TARGETS = $(SNDVERSIONS)
ifeq (1,$(CONFIG_SND_AINSTR_SIMPLE))
TARGETS += $(TOPDIR)/modules/snd-ainstr-simple.o
EXPORTS += ainstr_simple.o
endif
ifeq (1,$(CONFIG_SND_AINSTR_GF1))
TARGETS += $(TOPDIR)/modules/snd-ainstr-gf1.o
EXPORTS += ainstr_gf1.o
endif
ifeq (1,$(CONFIG_SND_AINSTR_IW))
TARGETS += $(TOPDIR)/modules/snd-ainstr-iw.o
EXPORTS += ainstr_iw.o
endif
AINSTR_SIMPLE = ainstr_simple.o
AINSTR_GF1 = ainstr_gf1.o
AINSTR_IW = ainstr_iw.o 

include $(TOPDIR)/Rules.make

all: $(TARGETS)

include $(TOPDIR)/Rules1.make

$(TOPDIR)/modules/snd-ainstr-simple.o: .depend $(SNDVERSIONS) $(AINSTR_SIMPLE)
	$(LINKER) -o $@ $(AINSTR_SIMPLE)

$(TOPDIR)/modules/snd-ainstr-gf1.o: .depend $(SNDVERSIONS) $(AINSTR_GF1)
	$(LINKER) -o $@ $(AINSTR_GF1)

$(TOPDIR)/modules/snd-ainstr-iw.o: .depend $(SNDVERSIONS) $(AINSTR_IW)
	$(LINKER) -o $@ $(AINSTR_IW)

gcompile: $(TARGETS)

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