patch-1.3.34 linux/drivers/sound/Makefile
Next file: linux/drivers/sound/Readme
Previous file: linux/drivers/sound/CHANGELOG
Back to the patch index
Back to the overall index
- Lines: 93
- Date:
Wed Oct 11 12:54:57 1995
- Orig file:
v1.3.33/linux/drivers/sound/Makefile
- Orig date:
Mon Sep 18 14:54:04 1995
diff -u --recursive --new-file v1.3.33/linux/drivers/sound/Makefile linux/drivers/sound/Makefile
@@ -8,6 +8,7 @@
VERSION = `cat .version`
TARGET_OS = linux
USRINCDIR = /usr/include
+MODULEDIR = /lib/modules/misc
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 \
@@ -15,30 +16,45 @@
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 sscape.o trix.o aedsp16.o \
- mad16.o
+ mad16.o mad16_sb_midi.o cs4232.o maui.o sound_pnp.o
-# Don't compile the sound driver during a normal kernel build if we have
-# configured for a module build instead.
-ifeq ($(CONFIG_SOUND),y)
-all: local.h sound.a
-else
-all:
+ifndef HOSTCC
+#
+# Running outside the kernel build.
+#
+CC = gcc
+HOSTCC = gcc
+CFLAGS = -D__KERNEL__ -DMODULE -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486
+
+build:
+ @echo Compiling modularized sound driver
+ @make sound.o
+ @echo Sound module compiled.
+
+install: sound.o
+ cp sound.o $(MODULEDIR)
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
endif
+all: local.h sound.a
+
+include $(TOPDIR)/Rules.make
+
sound.a: $(OBJS)
-rm -f sound.a
$(AR) rcs sound.a $(OBJS)
sync
clean:
- rm -f core core.* *.o *.a tmp_make *~ x z *%
- rm -f configure
- 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 sound_stub.c
indent:
for n in *.c;do echo indent $$n;indent $$n;done
-local.h:
+local.h:
$(MAKE) clean
$(MAKE) setup-$(TARGET_OS)
$(MAKE) config
@@ -49,8 +65,9 @@
@./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
- @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> 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
clrconf:
rm -f local.h .depend synth-ld.h trix_boot.h smw-midi0001.h
@@ -65,11 +82,9 @@
setup-linux:
@echo Compiling Sound Driver v $(VERSION) for Linux
-sound.o: sound.a
+sound.o: $(OBJS)
-rm -f sound.o
- $(LD) -r -o sound.o soundcard.o sound.a
+ $(LD) -r -o sound.o $(OBJS)
-modules: sound.o
- (cd ../../modules; ln -fs ../drivers/sound/sound.o .)
-
-include $(TOPDIR)/Rules.make
+modules: local.h sound.o
+ ln -fs `pwd`/sound.o /usr/src/linux/modules/sound.o
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this