Makefile 7.83 KB
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3 4 5 6 7 8 9 10
# 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.

# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.

export-objs	:=  ad1848.o audio_syms.o midi_syms.o mpu401.o \
		    msnd.o opl3.o sb_common.o sequencer_syms.o \
11
		    sound_syms.o uart401.o	\
Linus Torvalds's avatar
Linus Torvalds committed
12
		    nm256_audio.o ac97.o ac97_codec.o aci.o
Linus Torvalds's avatar
Linus Torvalds committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

# Each configuration option enables a list of files.

obj-$(CONFIG_SOUND_OSS)		+= sound.o
obj-$(CONFIG_SOUND_CS4232)	+= cs4232.o ad1848.o 

# Please leave it as is, cause the link order is significant !

obj-$(CONFIG_SOUND_AEDSP16)	+= aedsp16.o
obj-$(CONFIG_SOUND_PSS)		+= pss.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_TRIX)	+= trix.o ad1848.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_OPL3SA1)	+= opl3sa.o ad1848.o uart401.o
obj-$(CONFIG_SOUND_SSCAPE)	+= sscape.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_MAD16)	+= mad16.o ad1848.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_CS4232)	+= cs4232.o uart401.o
obj-$(CONFIG_SOUND_OPL3SA2)	+= opl3sa2.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_MSS)		+= ad1848.o
Linus Torvalds's avatar
Linus Torvalds committed
30
obj-$(CONFIG_SOUND_PAS)		+= pas2.o sb.o sb_lib.o uart401.o
Linus Torvalds's avatar
Linus Torvalds committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
obj-$(CONFIG_SOUND_SB)		+= sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_WAVEFRONT)	+= wavefront.o
obj-$(CONFIG_SOUND_MAUI)	+= maui.o mpu401.o
obj-$(CONFIG_SOUND_MPU401)	+= mpu401.o
obj-$(CONFIG_SOUND_UART6850)	+= uart6850.o
obj-$(CONFIG_SOUND_GUS)		+= gus.o ad1848.o
obj-$(CONFIG_SOUND_ADLIB)	+= adlib_card.o opl3.o
obj-$(CONFIG_SOUND_YM3812)	+= opl3.o
obj-$(CONFIG_SOUND_VMIDI)	+= v_midi.o
obj-$(CONFIG_SOUND_VIDC)	+= vidc_mod.o
obj-$(CONFIG_SOUND_WAVEARTIST)	+= waveartist.o
obj-$(CONFIG_SOUND_SGALAXY)	+= sgalaxy.o ad1848.o
obj-$(CONFIG_SOUND_AD1816)	+= ad1816.o
obj-$(CONFIG_SOUND_ACI_MIXER)	+= aci.o
obj-$(CONFIG_SOUND_AWE32_SYNTH)	+= awe_wave.o

obj-$(CONFIG_SOUND_VIA82CXXX)	+= via82cxxx_audio.o ac97_codec.o
Linus Torvalds's avatar
Linus Torvalds committed
48 49 50
ifeq ($(CONFIG_MIDI_VIA82CXXX),y)
  obj-$(CONFIG_SOUND_VIA82CXXX) += sound.o uart401.o
endif
Linus Torvalds's avatar
Linus Torvalds committed
51
obj-$(CONFIG_SOUND_YMFPCI)	+= ymfpci.o ac97_codec.o
Linus Torvalds's avatar
Linus Torvalds committed
52 53 54
ifeq ($(CONFIG_SOUND_YMFPCI_LEGACY),y)
  obj-$(CONFIG_SOUND_YMFPCI)    += opl3.o uart401.o
endif
Linus Torvalds's avatar
Linus Torvalds committed
55 56 57 58 59 60 61 62 63
obj-$(CONFIG_SOUND_MSNDCLAS)	+= msnd.o msnd_classic.o
obj-$(CONFIG_SOUND_MSNDPIN)	+= msnd.o msnd_pinnacle.o
obj-$(CONFIG_SOUND_VWSND)	+= vwsnd.o
obj-$(CONFIG_SOUND_NM256)	+= nm256_audio.o ac97.o
obj-$(CONFIG_SOUND_ICH)		+= i810_audio.o ac97_codec.o
obj-$(CONFIG_SOUND_SONICVIBES)	+= sonicvibes.o
obj-$(CONFIG_SOUND_CMPCI)	+= cmpci.o
obj-$(CONFIG_SOUND_ES1370)	+= es1370.o
obj-$(CONFIG_SOUND_ES1371)	+= es1371.o ac97_codec.o
Linus Torvalds's avatar
Linus Torvalds committed
64
obj-$(CONFIG_SOUND_VRC5477)	+= nec_vrc5477.o ac97_codec.o
Linus Torvalds's avatar
Linus Torvalds committed
65 66 67
obj-$(CONFIG_SOUND_ESSSOLO1)	+= esssolo1.o
obj-$(CONFIG_SOUND_FUSION)	+= cs46xx.o ac97_codec.o
obj-$(CONFIG_SOUND_MAESTRO)	+= maestro.o
Linus Torvalds's avatar
Linus Torvalds committed
68
obj-$(CONFIG_SOUND_MAESTRO3)	+= maestro3.o ac97_codec.o
Linus Torvalds's avatar
Linus Torvalds committed
69
obj-$(CONFIG_SOUND_TRIDENT)	+= trident.o ac97_codec.o
Linus Torvalds's avatar
Linus Torvalds committed
70 71
obj-$(CONFIG_SOUND_EMU10K1)	+= ac97_codec.o
obj-$(CONFIG_SOUND_RME96XX)     += rme96xx.o
Linus Torvalds's avatar
Linus Torvalds committed
72 73
obj-$(CONFIG_SOUND_BT878)	+= btaudio.o
obj-$(CONFIG_SOUND_EMU10K1)	+= ac97_codec.o
Linus Torvalds's avatar
Linus Torvalds committed
74

Linus Torvalds's avatar
Linus Torvalds committed
75 76 77
ifeq ($(CONFIG_MIDI_EMU10K1),y)
  obj-$(CONFIG_SOUND_EMU10K1)	+= sound.o
endif
Linus Torvalds's avatar
Linus Torvalds committed
78

79 80 81
obj-$(CONFIG_SOUND_EMU10K1)	+= emu10k1/
obj-$(CONFIG_SOUND_CS4281)	+= cs4281/
obj-$(CONFIG_DMASOUND)		+= dmasound/
Linus Torvalds's avatar
Linus Torvalds committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241

# Declare multi-part drivers.

sound-objs	:= 							\
    dev_table.o soundcard.o sound_syms.o		\
    audio.o audio_syms.o dmabuf.o					\
    midi_syms.o midi_synth.o midibuf.o					\
    sequencer.o sequencer_syms.o sound_timer.o sys_timer.o

gus-objs	:= gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.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
wavefront-objs  := wavfront.o wf_midi.o yss225.o


include $(TOPDIR)/Rules.make

# 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.
#
# First make the utilities.

bin2hex: bin2hex.c
	$(HOSTCC) $(HOSTCFLAGS) -o bin2hex bin2hex.c

hex2hex: hex2hex.c
	$(HOSTCC) $(HOSTCFLAGS) -o hex2hex hex2hex.c




# Turtle Beach Maui / Tropez

maui.o: maui_boot.h

ifeq ($(CONFIG_MAUI_HAVE_BOOT),y)
    maui_boot.h: $(patsubst "%", %, $(CONFIG_MAUI_BOOT_FILE)) bin2hex
	./bin2hex -i maui_os < $(CONFIG_MAUI_BOOT_FILE) > $@
else
    maui_boot.h:
	(							\
	    echo 'static unsigned char * maui_os = NULL;';	\
	    echo 'static int maui_osLen = 0;';			\
	) > $@
endif
	@ ( \
	    echo 'ifeq ($(strip $(CONFIG_MAUI_HAVE_BOOT) $(CONFIG_MAUI_BOOT_FILE)),$$(strip $$(CONFIG_MAUI_HAVE_BOOT) $$(CONFIG_MAUI_BOOT_FILE)))'; \
	    echo 'FILES_BOOT_UP_TO_DATE += $@'; \
	    echo 'endif' \
	) > .$@.boot



# Turtle Beach MultiSound

ifeq ($(CONFIG_MSNDCLAS_HAVE_BOOT),y)
    msnd_classic.o: msndperm.c msndinit.c

    msndperm.c: $(patsubst "%", %, $(CONFIG_MSNDCLAS_PERM_FILE)) bin2hex
	./bin2hex msndperm < $(CONFIG_MSNDCLAS_PERM_FILE) > $@
	@ ( \
	    echo 'ifeq ($(strip $(CONFIG_MSNDCLAS_HAVE_BOOT) $(CONFIG_MSNDCLAS_PERM_FILE)),$$(strip $$(CONFIG_MSNDCLAS_HAVE_BOOT) $$(CONFIG_MSNDCLAS_PERM_FILE)))'; \
	    echo 'FILES_BOOT_UP_TO_DATE += $@'; \
	    echo 'endif' \
	) > .$@.boot

    msndinit.c: $(patsubst "%", %, $(CONFIG_MSNDCLAS_INIT_FILE)) bin2hex
	./bin2hex msndinit < $(CONFIG_MSNDCLAS_INIT_FILE) > $@
	@ ( \
	    echo 'ifeq ($(strip $(CONFIG_MSNDCLAS_HAVE_BOOT) $(CONFIG_MSNDCLAS_INIT_FILE)),$$(strip $$(CONFIG_MSNDCLAS_HAVE_BOOT) $$(CONFIG_MSNDCLAS_INIT_FILE)))'; \
	    echo 'FILES_BOOT_UP_TO_DATE += $@'; \
	    echo 'endif' \
	) > .$@.boot
endif

ifeq ($(CONFIG_MSNDPIN_HAVE_BOOT),y)
    msnd_pinnacle.o: pndsperm.c pndspini.c

    pndsperm.c: $(patsubst "%", %, $(CONFIG_MSNDPIN_PERM_FILE)) bin2hex
	./bin2hex pndsperm < $(CONFIG_MSNDPIN_PERM_FILE) > $@
	@ ( \
	    echo 'ifeq ($(strip $(CONFIG_MSNDPIN_HAVE_BOOT) $(CONFIG_MSNDPIN_PERM_FILE)),$$(strip $$(CONFIG_MSNDPIN_HAVE_BOOT) $$(CONFIG_MSNDPIN_PERM_FILE)))'; \
	    echo 'FILES_BOOT_UP_TO_DATE += $@'; \
	    echo 'endif' \
	) > .$@.boot

    pndspini.c: $(patsubst "%", %, $(CONFIG_MSNDPIN_INIT_FILE)) bin2hex
	./bin2hex pndspini < $(CONFIG_MSNDPIN_INIT_FILE) > $@
	@ ( \
	    echo 'ifeq ($(strip $(CONFIG_MSNDPIN_HAVE_BOOT) $(CONFIG_MSNDPIN_INIT_FILE)),$$(strip $$(CONFIG_MSNDPIN_HAVE_BOOT) $$(CONFIG_MSNDPIN_INIT_FILE)))'; \
	    echo 'FILES_BOOT_UP_TO_DATE += $@'; \
	    echo 'endif' \
	) > .$@.boot
endif



# PSS (ECHO-ADI2111)

pss.o: pss_boot.h

ifeq ($(CONFIG_PSS_HAVE_BOOT),y)
    pss_boot.h: $(patsubst "%", %, $(CONFIG_PSS_BOOT_FILE)) bin2hex
	./bin2hex pss_synth < $(CONFIG_PSS_BOOT_FILE) > $@
else
    pss_boot.h:
	(							\
	    echo 'static unsigned char * pss_synth = NULL;';	\
	    echo 'static int pss_synthLen = 0;';		\
	) > $@
endif
	@ ( \
	    echo 'ifeq ($(strip $(CONFIG_PSS_HAVE_BOOT) $(CONFIG_PSS_BOOT_FILE)),$$(strip $$(CONFIG_PSS_HAVE_BOOT) $$(CONFIG_PSS_BOOT_FILE)))'; \
	    echo 'FILES_BOOT_UP_TO_DATE += $@'; \
	    echo 'endif' \
	) > .$@.boot



# MediaTrix AudioTrix Pro

trix.o: trix_boot.h

ifeq ($(CONFIG_TRIX_HAVE_BOOT),y)
    trix_boot.h: $(patsubst "%", %, $(CONFIG_TRIX_BOOT_FILE)) hex2hex
	./hex2hex -i trix_boot < $(CONFIG_TRIX_BOOT_FILE) > $@
else
    trix_boot.h:
	(							\
	    echo 'static unsigned char * trix_boot = NULL;';	\
	    echo 'static int trix_boot_len = 0;';		\
	) > $@
endif
	@ ( \
	    echo 'ifeq ($(strip $(CONFIG_TRIX_HAVE_BOOT) $(CONFIG_TRIX_BOOT_FILE)),$$(strip $$(CONFIG_TRIX_HAVE_BOOT) $$(CONFIG_TRIX_BOOT_FILE)))'; \
	    echo 'FILES_BOOT_UP_TO_DATE += $@'; \
	    echo 'endif' \
	) > .$@.boot



# Find boot files whose source file names have changed and force rebuild.

FILES_BOOT_UP_TO_DATE :=

FILES_BOOT_EXIST := $(wildcard .*.boot)
ifneq ($(FILES_BOOT_EXIST),)
include $(FILES_BOOT_EXIST)
endif

FILES_BOOT_CHANGED := $(strip \
    $(filter-out $(FILES_BOOT_UP_TO_DATE), \
	maui_boot.h pss_boot.h trix_boot.h))

ifneq ($(FILES_BOOT_CHANGED),)
242
$(FILES_BOOT_CHANGED): FORCE
Linus Torvalds's avatar
Linus Torvalds committed
243
endif