# Makefile for the Linux sound card driver
#
# 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
# Rewritten to use lists instead of if-statements.
# Each configuration option enables a list of files.
obj-$([31mCONFIG_SOUND_OSS[0m) += sound.o
# Please leave it as is, cause the link order is significant !
obj-$([31mCONFIG_SOUND_AEDSP16[0m) += aedsp16.o
obj-$([31mCONFIG_SOUND_PSS[0m) += pss.o ad1848.o mpu401.o
obj-$([31mCONFIG_SOUND_TRIX[0m) += trix.o ad1848.o sb_lib.o uart401.o
obj-$([31mCONFIG_SOUND_MSS[0m) += ad1848.o
obj-$([31mCONFIG_SOUND_PAS[0m) += pas2.o sb.o sb_lib.o uart401.o
obj-$([31mCONFIG_SOUND_SB[0m) += sb.o sb_lib.o uart401.o
obj-$([31mCONFIG_SOUND_KAHLUA[0m) += kahlua.o
obj-$([31mCONFIG_SOUND_MPU401[0m) += mpu401.o
obj-$([31mCONFIG_SOUND_UART6850[0m) += uart6850.o
obj-$([31mCONFIG_SOUND_YM3812[0m) += opl3.o
obj-$([31mCONFIG_SOUND_VMIDI[0m) += v_midi.o
obj-$([31mCONFIG_SOUND_VIDC[0m) += vidc_mod.o
obj-$([31mCONFIG_SOUND_WAVEARTIST[0m) += waveartist.o
obj-$([31mCONFIG_SOUND_MSNDCLAS[0m) += msnd.o msnd_classic.o
obj-$([31mCONFIG_SOUND_MSNDPIN[0m) += msnd.o msnd_pinnacle.o
obj-$([31mCONFIG_SOUND_BCM_CS4297A[0m) += swarm_cs4297a.o
obj-$([31mCONFIG_DMASOUND[0m) += dmasound/
# Declare multi-part drivers.
sound-objs := \
dev_table.o soundcard.o \
audio.o dmabuf.o \
midi_synth.o midibuf.o \
sequencer.o sound_timer.o sys_timer.o
pas2-objs := pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
sb-objs := sb_card.o
sb_lib-objs := sb_common.o sb_audio.o sb_midi.o sb_mixer.o sb_ess.o
vidc_mod-objs := vidc.o vidc_fill.o
hostprogs-y := bin2hex hex2hex
# Files generated that shall be removed upon make clean
clean-files := msndperm.c msndinit.c pndsperm.c pndspini.c \
pss_boot.h trix_boot.h
# Firmware files that need translation
#
# The translated files are protected by a file that keeps track
# of what name was used to build them. If the name changes, they
# will be forced to be remade.
#
# Turtle Beach MultiSound
ifeq ($([31mCONFIG_MSNDCLAS_HAVE_BOOT[0m),y)
$(obj)/msnd_classic.o: $(obj)/msndperm.c $(obj)/msndinit.c
$(obj)/msndperm.c: $(patsubst "%", %, $([31mCONFIG_MSNDCLAS_PERM_FILE[0m)) $(obj)/bin2hex
$(obj)/bin2hex msndperm < $< > $@
$(obj)/msndinit.c: $(patsubst "%", %, $([31mCONFIG_MSNDCLAS_INIT_FILE[0m)) $(obj)/bin2hex
$(obj)/bin2hex msndinit < $< > $@
endif
ifeq ($([31mCONFIG_MSNDPIN_HAVE_BOOT[0m),y)
$(obj)/msnd_pinnacle.o: $(obj)/pndsperm.c $(obj)/pndspini.c
$(obj)/pndsperm.c: $(patsubst "%", %, $([31mCONFIG_MSNDPIN_PERM_FILE[0m)) $(obj)/bin2hex
$(obj)/bin2hex pndsperm < $< > $@
$(obj)/pndspini.c: $(patsubst "%", %, $([31mCONFIG_MSNDPIN_INIT_FILE[0m)) $(obj)/bin2hex
$(obj)/bin2hex pndspini < $< > $@
endif
# PSS (ECHO-ADI2111)
$(obj)/pss.o: $(obj)/pss_boot.h
ifeq ($([31mCONFIG_PSS_HAVE_BOOT[0m),y)
$(obj)/pss_boot.h: $(patsubst "%", %, $([31mCONFIG_PSS_BOOT_FILE[0m)) $(obj)/bin2hex
$(obj)/bin2hex pss_synth < $< > $@
else
$(obj)/pss_boot.h:
$(Q)( \
echo 'static unsigned char * pss_synth = NULL;'; \
echo 'static int pss_synthLen = 0;'; \
) > $@
endif
# MediaTrix AudioTrix Pro
$(obj)/trix.o: $(obj)/trix_boot.h
ifeq ($([31mCONFIG_TRIX_HAVE_BOOT[0m),y)
$(obj)/trix_boot.h: $(patsubst "%", %, $([31mCONFIG_TRIX_BOOT_FILE[0m)) $(obj)/hex2hex
$(obj)/hex2hex -i trix_boot < $< > $@
else
$(obj)/trix_boot.h:
$(Q)( \
echo 'static unsigned char * trix_boot = NULL;'; \
echo 'static int trix_boot_len = 0;'; \
) > $@
endif