diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
commit | beb116954b9b7f3bb56412b2494b562f02b864b1 (patch) | |
tree | 120e997879884e1b9d93b265221b939d2ef1ade1 /drivers/sound/Makefile | |
parent | 908d4681a1dc3792ecafbe64265783a86c4cccb6 (diff) |
Import of Linux/MIPS 2.1.14
Diffstat (limited to 'drivers/sound/Makefile')
-rw-r--r-- | drivers/sound/Makefile | 150 |
1 files changed, 116 insertions, 34 deletions
diff --git a/drivers/sound/Makefile b/drivers/sound/Makefile index 2575118c1..499521c9f 100644 --- a/drivers/sound/Makefile +++ b/drivers/sound/Makefile @@ -5,29 +5,63 @@ # # -VERSION = 2.90-2 +.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 .objects +endif + +ifndef TOPDIR +TOPDIR=/usr/src/linux +endif + + +ifndef HOSTCC +build: + @echo Compiling modularized sound driver + @make sound.o + @echo Sound module compiled. + +install: sound.o + cp sound.o $(MODULEDIR) +endif -.c.s: - $(CC) $(CFLAGS) -S $< -.s.o: - $(AS) -c -o $*.o $< .c.o: $(CC) $(CFLAGS) -c $< -OBJS = soundcard.o audio.o dmabuf.o sb_dsp.o dev_table.o \ - opl3.o sequencer.o midibuf.o sb_card.o pas2_card.o adlib_card.o \ - pas2_pcm.o pas2_mixer.o pas2_midi.o gus_card.o gus_wave.o mpu401.o \ - gus_midi.o gus_vol.o patmgr.o sb_mixer.o sb16_dsp.o sb_midi.o \ - sb16_midi.o sound_switch.o midi_synth.o uart6850.o sound_timer.o \ - sys_timer.o ics2101.o ad1848.o pss.o +ifeq ($(CONFIG_SOUND),y) all: local.h sound.a -/usr/include/sys/soundcard.h: - @echo "WARNING! Your /usr/include/sys/soundcard.h not found." - @echo "Please make a new /usr/include/sys/soundcard.h containing" - @echo "just a line #include <linux/soundcard.h>" +OBJS += $(FIXEDOBJS) + +else +all: +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 +else +include $(TOPDIR)/Rules.make +endif sound.a: $(OBJS) -rm -f sound.a @@ -35,47 +69,95 @@ sound.a: $(OBJS) sync clean: - rm -f core core.* *.o *.a tmp_make *~ x z *% - rm -f configure sound_stub.c - for i in *.c;do rm -f `basename $$i .c`.s;done + 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: +local.h: $(MAKE) clean - $(MAKE) config + $(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 /usr/include/sys/soundcard.h - @echo Compiling Sound Driver v $(VERSION) for Linux +config: configure + @$(MAKE) setup @./configure > local.h - @echo \#define SOUND_VERSION_STRING \"$(VERSION)\" >> 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 - @if [ -x /bin/dnsdomainname ]; then \ - echo \#define SOUND_CONFIG_DOMAIN \"`dnsdomainname`\"; \ - else \ - echo \#define SOUND_CONFIG_DOMAIN \"`domainname`\"; \ - fi >> 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 + +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 + +kernelconfig: setup + rm -f configure + $(HOSTCC) -o configure configure.c + ./configure fixedlocal > local.h + ./configure fixeddefines > .defines + @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 + +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 + rm -f local.h .depend synth-ld.h trix_boot.h smw-midi0001.h maui_boot.h .defines -configure: configure.c /usr/include/sys/soundcard.h +configure: configure.c $(HOSTCC) -o configure configure.c @cat .blurb dep: - $(MAKE) /usr/include/sys/soundcard.h - $(CPP) -M *.c > .depend + $(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: +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)" + +ifdef USE_DEPEND # # include a dependency file if one exists # ifeq (.depend,$(wildcard .depend)) include .depend endif +endif |