patch-2.1.67 linux/drivers/sound/Makefile
Next file: linux/drivers/sound/README.FIRST
Previous file: linux/drivers/sound/Config.in
Back to the patch index
Back to the overall index
- Lines: 333
- Date:
Sat Nov 29 10:33:20 1997
- Orig file:
v2.1.66/linux/drivers/sound/Makefile
- Orig date:
Wed Nov 12 13:34:26 1997
diff -u --recursive --new-file v2.1.66/linux/drivers/sound/Makefile linux/drivers/sound/Makefile
@@ -1,4 +1,4 @@
-BUILDCODE=o
+BUILDCODE=s
# Makefile for the Linux sound card driver
#
# Note 2! The CFLAGS definitions are now inherited from the
@@ -32,108 +32,201 @@
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)
+
+L_TARGET := sound.a
+M_OBJS :=
+L_OBJS :=
+
+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
+
+ifeq ($(CONFIG_MIDI),y)
+ L_OBJS += midibuf.o
+ LX_OBJS += midi_synth.o
+endif
+
+ifeq ($(CONFIG_MIDI),y)
+ L_OBJS += midibuf.o
+ LX_OBJS += midi_synth.o
+endif
-ifndef HOSTCC
-build:
- @echo Compiling modularized sound driver
- @make sound.o
- @echo Sound module compiled.
+#ifeq ($(CONFIG_AUDIO),y)
+#L_OBJS += dmabuf.o
+#endif
-install: sound.o
- cp sound.o $(MODULEDIR)
+ifeq ($(CONFIG_YM3812),y)
+LX_OBJS += opl3.o
else
+ ifeq ($(CONFIG_YM3812),m)
+ MX_OBJS += opl3.o
+ endif
endif
-.c.o:
- $(CC) $(CFLAGS) -c $<
+ifeq ($(CONFIG_PAS),y)
+L_OBJS += pas2_card.c pas2_midi.c pas2_mixer.c pas2_pcm.c
+else
+ ifeq ($(CONFIG_PAS),m)
+ M_OBJS += pas2.o
+ endif
+endif
-ifeq ($(CONFIG_SOUND),y)
+ifeq ($(CONFIG_GUS),y)
+L_OBJS += gus_card.c gus_midi.c gus_vol.c gus_wave.c ics2101.c
+else
+ ifeq ($(CONFIG_GUS),m)
+ M_OBJS += gus.o
+ endif
+endif
-all: local.h sound.a
+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
-OBJS += $(FIXEDOBJS)
+ifeq ($(CONFIG_ADLIB),y)
+LX_OBJS += ad1848.o
+else
+ ifeq ($(CONFIG_ADLIB),m)
+ MX_OBJS += ad1848.o
+ endif
+endif
+ifeq ($(CONFIG_ADLIB),y)
+LX_OBJS += adlib_card.o
else
-all:
+ ifeq ($(CONFIG_ADLIB),m)
+ MX_OBJS += adlib_card.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_MPU401),y)
+LX_OBJS += mpu401.o
else
-include $(TOPDIR)/Rules.make
+ ifeq ($(CONFIG_MPU401),m)
+ MX_OBJS += mpu401.o
+ endif
endif
-sound.a: $(OBJS)
- -rm -f sound.a
- $(AR) rcs sound.a $(OBJS)
- sync
+ifeq ($(CONFIG_UART401),y)
+LX_OBJS += uart401.o
+else
+ ifeq ($(CONFIG_UART401),m)
+ MX_OBJS += uart401.o
+ endif
+endif
-clean:
- rm -f core core.* *.o *.a tmp_make *~ x y z *%
- rm -f configure
- cd lowlevel;make clean
+ifeq ($(CONFIG_UART6850),y)
+LX_OBJS += uart6850.o
+else
+ ifeq ($(CONFIG_UART6850),m)
+ MX_OBJS += uart6850.o
+ endif
+endif
-indent:
- for n in *.c;do echo indent $$n;indent $$n;done
+ifeq ($(CONFIG_PSS),y)
+L_OBJS += pss.o
+else
+ ifeq ($(CONFIG_PSS),m)
+ M_OBJS += pss.o
+ endif
+endif
-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_SSCAPE),y)
+L_OBJS += sscape.o
+else
+ ifeq ($(CONFIG_SSCAPE),m)
+ M_OBJS += sscape.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_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
@@ -146,49 +239,13 @@
# @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
- rm Config.in;cp Config.std Config.in
-
configure: configure.c
$(HOSTCC) -o configure configure.c
@cat .blurb
-dep:
- $(CPP) -M $(CFLAGS) -I. *.c > .depend
- cd lowlevel;make dep
-
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
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov