OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [armnommu/] [drivers/] [sound/] [Makefile] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1622 jcastillo
# Makefile for the Linux sound card driver
2
#
3
# Note 2! The CFLAGS definitions are now inherited from the
4
# parent makes. (hopefully)
5
#
6
#
7
 
8
LK = Readme Readme.aedsp16 Readme.cards Readme.linux Readme.modules \
9
     Readme.v30 audio.c coproc.h dev_table.c hex2hex.h midi_ctrl.h \
10
     midi_synth.h os.h patmgr.c sequencer.c sound_config.h \
11
     sound_switch.c sound_timer.c soundvers.h sys_timer.c \
12
     tuning.h ulaw.h
13
SUBLK= lowlevel/Config.tmpl lowlevel/Makefile \
14
     lowlevel/README lowlevel/aci.c lowlevel/init.c
15
 
16
.PHONY: dummy
17
SUB_DIRS        = lowlevel
18
VERSION         = `head -1 .version`
19
TARGET_OS       = linux
20
USRINCDIR       = /usr/include
21
MODULEDIR       = /lib/modules/misc
22
 
23
FIXEDOBJS       = soundcard.o dev_table.o sound_switch.o
24
 
25
ifndef NO_LOWLEVEL
26
        FIXEDOBJS := $(FIXEDOBJS) lowlevel/lowlevel.o
27
endif
28
 
29
ifeq (.defines,$(wildcard .defines))
30
include .defines
31
include .objects
32
else
33
OBJS   = `cat .object_files`
34
endif
35
 
36
ifndef TOPDIR
37
TOPDIR=/usr/src/linux
38
endif
39
 
40
 
41
ifndef HOSTCC
42
build:
43
        @echo Compiling modularized sound driver
44
        @make sound.o
45
        @echo Sound module compiled.
46
 
47
install:        sound.o
48
        cp sound.o $(MODULEDIR)
49
endif
50
 
51
.c.o:
52
        $(CC) $(CFLAGS) -c $<
53
 
54
ifeq ($(CONFIG_SOUND),y)
55
 
56
all:    local.h sound.a
57
 
58
OBJS += $(FIXEDOBJS)
59
 
60
else
61
all:
62
endif
63
 
64
ifndef HOSTCC
65
#
66
#       Running outside the kernel build.
67
#
68
CC      = gcc
69
HOSTCC  = gcc
70
CFLAGS  = -O2 -D__KERNEL__ -DMODULE -I/usr/src/linux/include -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -m486
71
USE_DEPEND=y
72
else
73
include $(TOPDIR)/Rules.make
74
endif
75
 
76
sound.a: $(OBJS)
77
        -rm -f sound.a
78
        $(AR) rcs sound.a $(OBJS)
79
        sync
80
 
81
clean:
82
        rm -f core core.* *.o *.a tmp_make *~ x y z *%
83
        rm -f configure sound_stub.c objects/*.o
84
        cd lowlevel;make clean
85
 
86
indent:
87
        for n in *.c;do echo indent $$n;indent $$n;done
88
 
89
local.h:
90
        $(MAKE) clean
91
        $(MAKE) setup-$(TARGET_OS)
92
        $(MAKE) oldconfig
93
        $(MAKE) dep
94
        @echo
95
        @echo
96
        @echo
97
        @echo NOTE! Object file dependencies may not be up to date. Run
98
        @echo make again if kernel/driver doesn''t link properly. Restarting
99
        @echo it now may save some time.
100
        @echo
101
        @echo
102
 
103
config: configure
104
        @$(MAKE) setup-$(TARGET_OS)
105
        @./configure > local.h
106
        @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
107
        @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
108
#       @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
109
#       @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
110
        @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
111
 
112
oldconfig: setup-$(TARGET_OS) configure
113
        @./configure -o > local.h
114
        @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
115
        @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
116
#       @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
117
#       @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
118
        @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
119
 
120
kernelconfig: setup-$(TARGET_OS)
121
        rm -f configure
122
        $(HOSTCC) -o configure configure.c
123
        ./configure fixedlocal > local.h
124
        ./configure fixeddefines > .defines
125
        @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
126
        @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
127
#       @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
128
#       @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
129
        @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
130
 
131
mkscript: setup-$(TARGET_OS)
132
        rm -f configure
133
        $(HOSTCC) -o configure configure.c
134
        ./configure script > Config.in
135
        cat lowlevel/Config.tmpl >> Config.in
136
        ./configure fixedlocal > local.h
137
        ./configure fixeddefines > .defines
138
 
139
clrconf:
140
        rm -f local.h .depend synth-ld.h trix_boot.h smw-midi0001.h maui_boot.h .defines
141
 
142
configure: configure.c
143
        $(HOSTCC) -o configure configure.c
144
        @cat .blurb
145
 
146
fastdep:        links
147
        $(CPP) -M *.c > .depend
148
 
149
setup-linux: links
150
        @echo Compiling Sound Driver v $(VERSION) for Linux
151
 
152
sound.o: local.h $(FIXEDOBJS) sound.a
153
        -rm -f sound.o
154
        $(LD) -r -o sound.o $(FIXEDOBJS) sound.a
155
 
156
modules: local.h sound.o
157
        ln -fs `pwd`/sound.o $(TOPDIR)/modules/sound.o
158
 
159
 
160
lowlevel/lowlevel.o: dummy
161
                cd lowlevel;make
162
 
163
.PHONY: links
164
links:
165
        -@[ ! -e lowlevel ] && mkdir lowlevel; \
166
        for f in $(LK); do \
167
                if [ ! -e $$f ]; then \
168
                        echo "ln -s ../../../../drivers/sound/$$f $$f";\
169
                        ln -s ../../../../drivers/sound/$$f $$f; \
170
                fi; \
171
        done; \
172
        for f in $(SUBLK); do \
173
                if [ ! -e $$f ]; then \
174
                        echo "ln -s ../../../../../drivers/sound/$$f $$f";\
175
                        ln -s ../../../../../drivers/sound/$$f $$f; \
176
                fi; \
177
        done
178
 
179
mrproper:
180
        -@for f in $(LK) $(SUBLK); do \
181
                if [ -L $$f ]; then \
182
                        echo $(RM) $$f; \
183
                        $(RM) $$f; \
184
                elif [ -f $$f ]; then \
185
                        echo not removing $$f; \
186
                fi; \
187
        done
188
 
189
ifdef USE_DEPEND
190
#
191
# include a dependency file if one exists
192
#
193
ifeq (.depend,$(wildcard .depend))
194
include .depend
195
endif
196
endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.