summaryrefslogtreecommitdiffstats
path: root/drivers/sound/lowlevel/Makefile
blob: 1a4c6a39621c30623afe964501a8bc14ccedb715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
all:	lowlevel.o

ALLOBJS = init.o aci.o awe_wave.o aedsp16.o
OBJS = init.o

ifeq ($(CONFIG_LOWLEVEL_SOUND),y)
ifeq ($(CONFIG_ACI_MIXER),y)
   OBJS := $(OBJS) aci.o
endif
ifeq ($(CONFIG_AWE32_SYNTH),y)
OBJS := $(OBJS) awe_wave.o
else 
  ifeq ($(CONFIG_AWE32_SYNTH),m)
     MX_OBJS := $(MX_OBJS) awe_wave.o
  endif
endif
ifeq ($(CONFIG_AEDSP16),y)
   OBJS := $(OBJS) aedsp16.o
endif
endif

ifndef TOPDIR
TOPDIR=/usr/src/linux
endif

.c.o:
	$(CC) $(CFLAGS) -c $<

lowlevel.o:	$(OBJS)
	$(LD) -r -o lowlevel.o $(OBJS)

module: manual_config.h
	rm -f lowlevel.o
	make CFLAGS="$(CFLAGS) -DLOWLEVEL_MODULE" $(ALLOBJS)
	$(LD) -r -o lowlevel.o $(ALLOBJS)
	touch module

manual_config.h:
	@echo You should create `pwd`/manual_config.h.
	@echo See `pwd`/README for more info.
	@exit 1

clean:
	rm -f core x y z *~ *.o module .depend

dep:
	$(CPP) -M $(CFLAGS) -I. *.c > .depend

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

ifdef USE_DEPEND
# include a dependency file if one exists
ifeq (.depend,$(wildcard .depend))
include .depend
endif
endif