1# Makefile for the Linux sound card driver
2#
3# 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
4# Rewritten to use lists instead of if-statements.
5
6# Each configuration option enables a list of files.
7
8obj-$(CONFIG_SOUND_OSS)		+= sound.o
9
10# Please leave it as is, cause the link order is significant !
11
12obj-$(CONFIG_SOUND_AEDSP16)	+= aedsp16.o
13obj-$(CONFIG_SOUND_PSS)		+= pss.o ad1848.o mpu401.o
14obj-$(CONFIG_SOUND_TRIX)	+= trix.o ad1848.o sb_lib.o uart401.o
15obj-$(CONFIG_SOUND_MSS)		+= ad1848.o
16obj-$(CONFIG_SOUND_PAS)		+= pas2.o sb.o sb_lib.o uart401.o
17obj-$(CONFIG_SOUND_SB)		+= sb.o sb_lib.o uart401.o
18obj-$(CONFIG_SOUND_KAHLUA)	+= kahlua.o
19obj-$(CONFIG_SOUND_MPU401)	+= mpu401.o
20obj-$(CONFIG_SOUND_UART6850)	+= uart6850.o
21obj-$(CONFIG_SOUND_YM3812)	+= opl3.o
22obj-$(CONFIG_SOUND_VMIDI)	+= v_midi.o
23obj-$(CONFIG_SOUND_VIDC)	+= vidc_mod.o
24obj-$(CONFIG_SOUND_WAVEARTIST)	+= waveartist.o
25obj-$(CONFIG_SOUND_MSNDCLAS)	+= msnd.o msnd_classic.o
26obj-$(CONFIG_SOUND_MSNDPIN)	+= msnd.o msnd_pinnacle.o
27obj-$(CONFIG_SOUND_BCM_CS4297A)	+= swarm_cs4297a.o
28
29obj-$(CONFIG_DMASOUND)		+= dmasound/
30
31# Declare multi-part drivers.
32
33sound-objs	:= 							\
34    dev_table.o soundcard.o 		\
35    audio.o dmabuf.o					\
36    midi_synth.o midibuf.o					\
37    sequencer.o sound_timer.o sys_timer.o
38
39pas2-objs	:= pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
40sb-objs		:= sb_card.o
41sb_lib-objs	:= sb_common.o sb_audio.o sb_midi.o sb_mixer.o sb_ess.o
42vidc_mod-objs	:= vidc.o vidc_fill.o
43
44hostprogs-y	:= bin2hex hex2hex
45
46# Files generated that shall be removed upon make clean
47clean-files := msndperm.c msndinit.c pndsperm.c pndspini.c \
48               pss_boot.h trix_boot.h
49
50# Firmware files that need translation
51#
52# The translated files are protected by a file that keeps track
53# of what name was used to build them.  If the name changes, they
54# will be forced to be remade.
55#
56
57# Turtle Beach MultiSound
58
59ifeq ($(CONFIG_MSNDCLAS_HAVE_BOOT),y)
60    $(obj)/msnd_classic.o: $(obj)/msndperm.c $(obj)/msndinit.c
61
62    $(obj)/msndperm.c: $(patsubst "%", %, $(CONFIG_MSNDCLAS_PERM_FILE)) $(obj)/bin2hex
63	$(obj)/bin2hex msndperm < $< > $@
64
65    $(obj)/msndinit.c: $(patsubst "%", %, $(CONFIG_MSNDCLAS_INIT_FILE)) $(obj)/bin2hex
66	$(obj)/bin2hex msndinit < $< > $@
67endif
68
69ifeq ($(CONFIG_MSNDPIN_HAVE_BOOT),y)
70    $(obj)/msnd_pinnacle.o: $(obj)/pndsperm.c $(obj)/pndspini.c
71
72    $(obj)/pndsperm.c: $(patsubst "%", %, $(CONFIG_MSNDPIN_PERM_FILE)) $(obj)/bin2hex
73	$(obj)/bin2hex pndsperm < $< > $@
74
75    $(obj)/pndspini.c: $(patsubst "%", %, $(CONFIG_MSNDPIN_INIT_FILE)) $(obj)/bin2hex
76	$(obj)/bin2hex pndspini < $< > $@
77endif
78
79# PSS (ECHO-ADI2111)
80
81$(obj)/pss.o: $(obj)/pss_boot.h
82
83ifeq ($(CONFIG_PSS_HAVE_BOOT),y)
84    $(obj)/pss_boot.h: $(patsubst "%", %, $(CONFIG_PSS_BOOT_FILE)) $(obj)/bin2hex
85	$(obj)/bin2hex pss_synth < $< > $@
86else
87    $(obj)/pss_boot.h:
88	$(Q)(							\
89	    echo 'static unsigned char * pss_synth = NULL;';	\
90	    echo 'static int pss_synthLen = 0;';		\
91	) > $@
92endif
93
94# MediaTrix AudioTrix Pro
95
96$(obj)/trix.o: $(obj)/trix_boot.h
97
98ifeq ($(CONFIG_TRIX_HAVE_BOOT),y)
99    $(obj)/trix_boot.h: $(patsubst "%", %, $(CONFIG_TRIX_BOOT_FILE)) $(obj)/hex2hex
100	$(obj)/hex2hex -i trix_boot < $< > $@
101else
102    $(obj)/trix_boot.h:
103	$(Q)(							\
104	    echo 'static unsigned char * trix_boot = NULL;';	\
105	    echo 'static int trix_boot_len = 0;';		\
106	) > $@
107endif
108