diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-12-06 23:51:34 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-12-06 23:51:34 +0000 |
commit | 230e5ab6a084ed50470f101934782dbf54b0d06b (patch) | |
tree | 5dd821c8d33f450470588e7a543f74bf74306e9e /drivers/sound/Makefile | |
parent | c9b1c8a64c6444d189856f1e26bdcb8b4cd0113a (diff) |
Merge with Linux 2.1.67.
Diffstat (limited to 'drivers/sound/Makefile')
-rw-r--r-- | drivers/sound/Makefile | 282 |
1 files changed, 171 insertions, 111 deletions
diff --git a/drivers/sound/Makefile b/drivers/sound/Makefile index b0a3483d5..e90ba9a03 100644 --- a/drivers/sound/Makefile +++ b/drivers/sound/Makefile @@ -1,3 +1,4 @@ +BUILDCODE=s # Makefile for the Linux sound card driver # # Note 2! The CFLAGS definitions are now inherited from the @@ -31,108 +32,201 @@ mkscript: kernelconfig: else -.PHONY: dummy -SUB_DIRS = lowlevel -VERSION = `head -1 .version` -TARGET_OS = linux -USRINCDIR = /usr/include -MODULEDIR = /lib/modules/misc - -FIXEDOBJS = soundcard.o dev_table.o sound_switch.o - -ifndef NO_LOWLEVEL - FIXEDOBJS := $(FIXEDOBJS) lowlevel/lowlevel.o -endif ifeq (.defines,$(wildcard .defines)) -include .defines +#include .defines include .objects endif +TARGET_OS=linux + ifndef TOPDIR TOPDIR=/usr/src/linux endif +SUB_DIRS := lowlevel +MOD_SUB_DIRS := $(SUB_DIRS) +ALL_SUB_DIRS := $(SUB_DIRS) -ifndef HOSTCC -build: - @echo Compiling modularized sound driver - @make sound.o - @echo Sound module compiled. +L_TARGET := sound.a +M_OBJS := +L_OBJS := -install: sound.o - cp sound.o $(MODULEDIR) +ifeq ($(CONFIG_SOUND),y) + L_OBJS += soundcard.o dev_table.o sound_switch.o sequencer.o sys_timer.o sound_timer.o lowlevel/lowlevel.o midi_synth.o midibuf.o sound_firmware.o audio.o dmabuf.o else + ifeq ($(CONFIG_SOUND),m) + M_OBJS += sound.o + MX_OBJS += sound_syms.o + endif endif -.c.o: - $(CC) $(CFLAGS) -c $< +ifeq ($(CONFIG_MIDI),y) + L_OBJS += midibuf.o + LX_OBJS += midi_synth.o +endif -ifeq ($(CONFIG_SOUND),y) +ifeq ($(CONFIG_MIDI),y) + L_OBJS += midibuf.o + LX_OBJS += midi_synth.o +endif -all: local.h sound.a +#ifeq ($(CONFIG_AUDIO),y) +#L_OBJS += dmabuf.o +#endif -OBJS += $(FIXEDOBJS) +ifeq ($(CONFIG_YM3812),y) +LX_OBJS += opl3.o +else + ifeq ($(CONFIG_YM3812),m) + MX_OBJS += opl3.o + endif +endif +ifeq ($(CONFIG_PAS),y) +L_OBJS += pas2_card.c pas2_midi.c pas2_mixer.c pas2_pcm.c else -all: + ifeq ($(CONFIG_PAS),m) + M_OBJS += pas2.o + endif endif -ifndef HOSTCC -# -# Running outside the kernel build. -# -CC = gcc -HOSTCC = gcc -CFLAGS = -O2 -D__KERNEL__ -DMODULE -I/usr/src/linux/include -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -m486 -USE_DEPEND=y +ifeq ($(CONFIG_GUS),y) +L_OBJS += gus_card.c gus_midi.c gus_vol.c gus_wave.c ics2101.c else -include $(TOPDIR)/Rules.make + ifeq ($(CONFIG_GUS),m) + M_OBJS += gus.o + endif endif -sound.a: $(OBJS) - -rm -f sound.a - $(AR) rcs sound.a $(OBJS) - sync +ifeq ($(CONFIG_SB),y) +L_OBJS += sb_audio.o sb_common.o sb_midi.o sb_mixer.o +LX_OBJS += sb_card.o uart401.o +else + ifeq ($(CONFIG_SB),m) + M_OBJS += sb.o + MX_OBJS += sb_card.o uart401.o + endif +endif -clean: - rm -f core core.* *.o *.a tmp_make *~ x y z *% - rm -f configure - cd lowlevel;make clean - -indent: - for n in *.c;do echo indent $$n;indent $$n;done - -local.h: - $(MAKE) clean - $(MAKE) setup - $(MAKE) oldconfig - $(MAKE) dep - @echo - @echo - @echo - @echo NOTE! Object file dependencies may not be up to date. Run - @echo make again if kernel/driver doesn''t link properly. Restarting - @echo it now may save some time. - @echo - @echo - -config: configure - @$(MAKE) setup - @./configure > local.h - @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h - @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h -# @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null -# @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null - @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h +ifeq ($(CONFIG_ADLIB),y) +LX_OBJS += ad1848.o +else + ifeq ($(CONFIG_ADLIB),m) + MX_OBJS += ad1848.o + endif +endif -oldconfig: setup configure - @./configure -o > local.h - @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h - @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h -# @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null -# @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null - @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h +ifeq ($(CONFIG_ADLIB),y) +LX_OBJS += adlib_card.o +else + ifeq ($(CONFIG_ADLIB),m) + MX_OBJS += adlib_card.o + endif +endif + +ifeq ($(CONFIG_MPU401),y) +LX_OBJS += mpu401.o +else + ifeq ($(CONFIG_MPU401),m) + MX_OBJS += mpu401.o + endif +endif + +ifeq ($(CONFIG_UART401),y) +LX_OBJS += uart401.o +else + ifeq ($(CONFIG_UART401),m) + MX_OBJS += uart401.o + endif +endif + +ifeq ($(CONFIG_UART6850),y) +LX_OBJS += uart6850.o +else + ifeq ($(CONFIG_UART6850),m) + MX_OBJS += uart6850.o + endif +endif + +ifeq ($(CONFIG_PSS),y) +L_OBJS += pss.o +else + ifeq ($(CONFIG_PSS),m) + M_OBJS += pss.o + endif +endif + +ifeq ($(CONFIG_SSCAPE),y) +L_OBJS += sscape.o +else + ifeq ($(CONFIG_SSCAPE),m) + M_OBJS += sscape.o + endif +endif + +ifeq ($(CONFIG_TRIX),y) +L_OBJS += trix.o +else + ifeq ($(CONFIG_TRIX),m) + M_OBJS += trix.o + endif +endif + +ifeq ($(CONFIG_MAD16),y) +L_OBJS += mad16.o +else + ifeq ($(CONFIG_MAD16),m) + M_OBJS += mad16.o + endif +endif + +ifeq ($(CONFIG_CS4232),y) +LX_OBJS += cs4232.o +else + ifeq ($(CONFIG_CS4232),m) + MX_OBJS += cs4232.o + endif +endif + +ifeq ($(CONFIG_MAUI),y) +L_OBJS += maui.o +else + ifeq ($(CONFIG_MAUI),m) + M_OBJS += maui.o + endif +endif + +ifeq ($(CONFIG_SOFTOSS),y) +L_OBJS += softoss.o softoss_rs.o +else + ifeq ($(CONFIG_SOFTOSS),m) + M_OBJS += softoss2.o + endif +endif + +include $(TOPDIR)/Rules.make + +softoss2.o: softoss.o softoss_rs.o + ld -r -o softoss2.o softoss.o softoss_rs.o + +pas2.o: pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o + ld -r -o pas2.o pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o + +sb.o: sb_audio.o sb_card.o sb_common.o sb_midi.o sb_mixer.o + ld -r -o sb.o sb_audio.o sb_card.o sb_common.o sb_midi.o sb_mixer.o + +lowlevel/lowlevel.o: + cd lowlevel; make + +sound.o: soundcard.o dev_table.o sound_switch.o audio.o dmabuf.o sequencer.o sys_timer.o sound_timer.o lowlevel/lowlevel.o midi_synth.o midibuf.o sound_firmware.o + ld -r -o sound.o soundcard.o dev_table.o sound_switch.o audio.o dmabuf.o \ + sequencer.o sys_timer.o sound_timer.o lowlevel/lowlevel.o \ + midi_synth.o midibuf.o sound_firmware.o + rm sound_syms.o + +gus.o: gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o + ld -r -o gus.o gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o kernelconfig: setup rm -f configure @@ -145,47 +239,13 @@ kernelconfig: setup # @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h -mkscript: setup - rm -f configure - $(HOSTCC) -o configure configure.c - ./configure script > Config.in - cat lowlevel/Config.tmpl >> Config.in - ./configure fixedlocal > local.h - ./configure fixeddefines > .defines - -clrconf: - rm -f local.h .depend synth-ld.h trix_boot.h smw-midi0001.h maui_boot.h .defines - configure: configure.c $(HOSTCC) -o configure configure.c @cat .blurb -dep: - $(CPP) -M $(CFLAGS) -I. *.c > .depend - setup: @echo Compiling Sound Driver v $(VERSION) for Linux -sound.o: local.h $(FIXEDOBJS) sound.a - -rm -f sound.o - $(LD) -r -o sound.o $(FIXEDOBJS) sound.a - -modules: local.h sound.o - ln -fs `pwd`/sound.o $(TOPDIR)/modules/sound.o - - -lowlevel/lowlevel.o: dummy - cd lowlevel;make CC="$(CC)" CFLAGS="$(CFLAGS)" - -contrib: - cd lowlevel;make clean;make module "CC=$(CC)" CFLAGS="$(CFLAGS)" +mkscript: -ifdef USE_DEPEND -# -# include a dependency file if one exists -# -ifeq (.depend,$(wildcard .depend)) -include .depend -endif -endif endif |