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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
|
diff -ruN asterisk-1.0.7-orig/Makefile asterisk-1.0.7-2/Makefile
--- asterisk-1.0.7-orig/Makefile 2005-03-10 09:15:05.000000000 +0100
+++ asterisk-1.0.7-2/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -63,10 +63,10 @@
#K6OPT = -DK6OPT
#Tell gcc to optimize the asterisk's code
-OPTIMIZE+=-O6
+#OPTIMIZE+=-O6
#Include debug symbols in the executables (-g) and profiling info (-pg)
-DEBUG=-g #-pg
+#DEBUG=-g #-pg
# If you are running a radio application, define RADIO_RELAX so that the DTMF
# will be received more reliably
@@ -74,7 +74,7 @@
# If you don't have a lot of memory (e.g. embedded Asterisk), uncomment the
# following to reduce the size of certain static buffers
-#OPTIONS += -DLOW_MEMORY
+OPTIONS += -DLOW_MEMORY
# Optional debugging parameters
DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
@@ -112,7 +112,7 @@
BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
-ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
+ASTVARLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
@@ -128,7 +128,7 @@
INCLUDE=-Iinclude -I../include
CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
-CFLAGS+=$(OPTIMIZE)
+CFLAGS+=$(OPTIMIZE) $(CFLAGS_EXTRA)
ifneq ($(PROC),ultrasparc)
CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
@@ -187,7 +187,7 @@
CFLAGS+=# -fomit-frame-pointer
SUBDIRS=res channels pbx apps codecs formats agi cdr astman stdtime
ifeq (${OSARCH},Linux)
-LIBS=-ldl -lpthread
+LIBS=$(LDFLAGS_EXTRA) -ldl -lpthread
endif
LIBS+=-lncurses -lm
ifeq (${OSARCH},Linux)
@@ -205,7 +205,7 @@
ifeq (${OSARCH},OpenBSD)
LIBS=-lcrypto -lpthread -lm -lncurses
endif
-LIBS+=-lssl
+LIBS+=-Wl,-Bstatic -lssl -Wl,-Bdynamic
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
translate.o file.o say.o pbx.o cli.o md5.o term.o \
ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
@@ -240,12 +240,12 @@
cd editline && unset CFLAGS LIBS && ./configure ; \
editline/libedit.a: FORCE
- cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
- $(MAKE) -C editline libedit.a
+ cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE) $(CFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" ./configure
+ $(MAKE) PROC=$(PROC) CFLAGS="$(OPTIMIZE)" -C editline libedit.a
db1-ast/libdb1.a: FORCE
@if [ -d db1-ast ]; then \
- $(MAKE) -C db1-ast libdb1.a ; \
+ $(MAKE) PROC=$(PROC) OORG="$(OPTIMIZE)" -C db1-ast libdb1.a ; \
else \
echo "You need to do a cvs update -d not just cvs update"; \
exit 1; \
@@ -289,7 +289,7 @@
stdtime/libtime.a: FORCE
@if [ -d stdtime ]; then \
- $(MAKE) -C stdtime libtime.a ; \
+ $(MAKE) PROC=$(PROC) -C stdtime libtime.a ; \
else \
echo "You need to do a cvs update -d not just cvs update"; \
exit 1; \
@@ -381,7 +381,7 @@
if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
fi
- for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
+ for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x install || exit 1 ; done
install -d $(DESTDIR)$(ASTHEADERDIR)
install -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
@@ -519,8 +519,8 @@
__rpm: _version
rm -rf /tmp/asterisk ; \
mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
- $(MAKE) DESTDIR=/tmp/asterisk install ; \
- $(MAKE) DESTDIR=/tmp/asterisk samples ; \
+ $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk install ; \
+ $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk samples ; \
mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
@@ -544,12 +544,12 @@
fi
dont-optimize:
- $(MAKE) OPTIMIZE= K6OPT= install
+ $(MAKE) PROC=$(PROC) OPTIMIZE= K6OPT= install
valgrind: dont-optimize
depend: .depend
- for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
+ for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x depend || exit 1 ; done
.depend:
@if ! which mpg123 &>/dev/null ; then \
diff -ruN asterisk-1.0.7-orig/apps/Makefile asterisk-1.0.7-2/apps/Makefile
--- asterisk-1.0.7-orig/apps/Makefile 2004-09-24 23:32:56.000000000 +0200
+++ asterisk-1.0.7-2/apps/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -35,13 +35,14 @@
APPS+=app_intercom.so
endif
-#APPS+=app_sql_postgres.so
+# add extra apps
+APPS+=$(EXTRA_APPS)
#APPS+=app_sql_odbc.so
#APPS+=app_rpt.so
-APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
-APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
-APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
+#APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
+#APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
+#APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
CFLAGS+=-fPIC
diff -ruN asterisk-1.0.7-orig/cdr/Makefile asterisk-1.0.7-2/cdr/Makefile
--- asterisk-1.0.7-orig/cdr/Makefile 2004-08-31 18:33:00.000000000 +0200
+++ asterisk-1.0.7-2/cdr/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -12,7 +12,7 @@
#
#ADD cdr_pgsql.so to MODS= to include PostgreSQL support: REQUIRES PostgreSQL libs
-MODS=cdr_csv.so cdr_manager.so
+MODS=cdr_csv.so cdr_manager.so $(EXTRA_MODS)
CFLAGS+=-fPIC
diff -ruN asterisk-1.0.7-orig/channels/Makefile asterisk-1.0.7-2/channels/Makefile
--- asterisk-1.0.7-orig/channels/Makefile 2004-08-31 18:33:00.000000000 +0200
+++ asterisk-1.0.7-2/channels/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -71,25 +71,25 @@
CHANNEL_LIBS+=chan_oss.so
endif
-CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
-CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
-
-CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
-CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
-CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
-CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
-CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
-CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
-ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
-ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
-CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
-CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
-CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
-CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
+#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
+#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
+#CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
+
+#CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
+#CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
+#CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
+#CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
+#CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
+#CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
+#ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
+#ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
+#CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
+#CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
+#CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
+#CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
-ALSA_SRC=chan_alsa.c
-ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
+#ALSA_SRC=chan_alsa.c
+#ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
CFLAGS+=-DCRYPTO
CFLAGS+=-fPIC
@@ -106,10 +106,10 @@
ZAPDIR=/usr/lib
-CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
+#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
+#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
-CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
+#CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
ifndef OPENH323DIR
OPENH323DIR=$(HOME)/openh323
diff -ruN asterisk-1.0.7-orig/channels/h323/Makefile asterisk-1.0.7-2/channels/h323/Makefile
--- asterisk-1.0.7-orig/channels/h323/Makefile 2004-11-15 03:35:35.000000000 +0100
+++ asterisk-1.0.7-2/channels/h323/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -22,9 +22,11 @@
OSARCH=$(shell uname -s)
ifneq (${OSARCH},FreeBSD)
ifneq (${OSARCH},NetBSD)
+ifneq ($(PROC),mipsel)
CFLAGS += -march=$(shell uname -m)
endif
endif
+endif
CFLAGS += -DPBYTE_ORDER=PLITTLE_ENDIAN
ifeq (${OSARCH},Linux)
@@ -47,7 +49,7 @@
# Pre Janus release directives
CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
-CFLAGS += -pipe -Wall -fPIC
+CFLAGS += -pipe -Wall -fPIC $(OPTIMIZE)
ifeq (${OSARCH},Linux)
CFLAGS += -DP_LINUX
LIBS+=-lpthread
@@ -74,7 +76,7 @@
libchanh323.a: ast_h323.o
- ar cr libchanh323.a ast_h323.o
+ $(AR) cr libchanh323.a ast_h323.o
ast_h323.o: ast_h323.cpp
$(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $<
diff -ruN asterisk-1.0.7-orig/codecs/Makefile asterisk-1.0.7-2/codecs/Makefile
--- asterisk-1.0.7-orig/codecs/Makefile 2005-03-17 15:43:51.000000000 +0100
+++ asterisk-1.0.7-2/codecs/Makefile 2005-03-22 23:26:20.000000000 +0100
@@ -17,21 +17,21 @@
# g723.1b)
#
#MODG723=codec_g723_1.so codec_g723_1b.so
-MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
-MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
-MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/include/speex/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so")
+#MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
+#MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
+MODSPEEX=codec_speex.so
MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
CFLAGS+=-fPIC
-CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
-CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
-CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex")
+#CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
+#CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
+#CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex")
LIBG723=g723.1/libg723.a
LIBG723B=g723.1b/libg723b.a
LIBGSM=gsm/lib/libgsm.a
LIBGSMT=gsm/lib/libgsm.a
LIBLPC10=lpc10/liblpc10.a
-LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib")
+LIBSPEEX=$(LDFLAGS_EXTRA)
LIBSPEEX+=-lspeex -lm
LIBILBC=ilbc/libilbc.a
@@ -43,26 +43,26 @@
clean:
rm -f *.so *.o .depend
- ! [ -d g723.1 ] || $(MAKE) -C g723.1 clean
- ! [ -d g723.1b ] || $(MAKE) -C g723.1b clean
- $(MAKE) -C gsm clean
- $(MAKE) -C lpc10 clean
- $(MAKE) -C ilbc clean
+ ! [ -d g723.1 ] || $(MAKE) PROC=$(PROC) -C g723.1 clean
+ ! [ -d g723.1b ] || $(MAKE) PROC=$(PROC) -C g723.1b clean
+ $(MAKE) PROC=$(PROC) -C gsm clean
+ $(MAKE) PROC=$(PROC) -C lpc10 clean
+ $(MAKE) PROC=$(PROC) -C ilbc clean
$(LIBG723):
- $(MAKE) -C g723.1 all
+ $(MAKE) PROC=$(PROC) -C g723.1 all
gsm/lib/libgsm.a:
- $(MAKE) -C gsm lib/libgsm.a
+ $(MAKE) PROC=$(PROC) -C gsm lib/libgsm.a
$(LIBG723B):
- $(MAKE) -C g723.1b all
+ $(MAKE) PROC=$(PROC) -C g723.1b all
$(LIBLPC10):
- $(MAKE) -C lpc10 all
+ $(MAKE) PROC=$(PROC) -C lpc10 all
$(LIBILBC):
- $(MAKE) -C ilbc all
+ $(MAKE) PROC=$(PROC) -C ilbc all
codec_ilbc.so: codec_ilbc.o $(LIBILBC)
$(CC) $(SOLINK) -o $@ $< $(LIBILBC)
diff -ruN asterisk-1.0.7-orig/codecs/gsm/Makefile asterisk-1.0.7-2/codecs/gsm/Makefile
--- asterisk-1.0.7-orig/codecs/gsm/Makefile 2004-12-21 21:49:24.000000000 +0100
+++ asterisk-1.0.7-2/codecs/gsm/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -40,9 +40,10 @@
ifneq (${OSARCH},Darwin)
ifneq (${PROC},x86_64)
ifneq (${PROC},ultrasparc)
-ifneq ($(shell uname -m),ppc)
-ifneq ($(shell uname -m),alpha)
+ifneq ($(PROC),ppc)
+ifneq ($(PROC),alpha)
ifneq (${PROC},sparc64)
+ifneq ($(PROC),mipsel)
OPTIMIZE+=-march=$(PROC)
endif
endif
@@ -50,6 +51,7 @@
endif
endif
endif
+endif
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
#This works for even old (2.96) versions of gcc and provides a small boost either way.
@@ -78,7 +80,7 @@
# CCFLAGS = -c -O
CC ?= gcc
-CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC $(OPTIMIZE) -fomit-frame-pointer
+CCFLAGS += -c -DNeedFunctionPrototypes=1 -fPIC $(OPTIMIZE)
LD = $(CC)
@@ -213,16 +215,18 @@
$(SRC)/short_term.c \
$(SRC)/table.c
ifeq (${OSARCH},Linux)
-ifneq ($(shell uname -m),x86_64)
-ifneq ($(shell uname -m),ppc)
-ifneq ($(shell uname -m),alpha)
-ifneq ($(shell uname -m),sparc64)
+ifneq ($(PROC),x86_64)
+ifneq ($(PROC),ppc)
+ifneq ($(PROC),alpha)
+ifneq ($(PROC),sparc64)
+ifneq ($(PROC),mipsel)
GSM_SOURCES+= $(SRC)/k6opt.s
endif
endif
endif
endif
endif
+endif
TOAST_SOURCES = $(SRC)/toast.c \
$(SRC)/toast_lin.c \
@@ -269,16 +273,18 @@
$(SRC)/table.o
ifeq (${OSARCH},Linux)
-ifneq ($(shell uname -m), x86_64)
-ifneq ($(shell uname -m), ppc)
-ifneq ($(shell uname -m), alpha)
-ifneq ($(shell uname -m), sparc64)
+ifneq ($(PROC), x86_64)
+ifneq ($(PROC), ppc)
+ifneq ($(PROC), alpha)
+ifneq ($(PROC), sparc64)
+ifneq ($(PROC), mipsel)
GSM_OBJECTS+= $(SRC)/k6opt.o
endif
endif
endif
endif
endif
+endif
TOAST_OBJECTS = $(SRC)/toast.o \
$(SRC)/toast_lin.o \
diff -ruN asterisk-1.0.7-orig/codecs/ilbc/Makefile asterisk-1.0.7-2/codecs/ilbc/Makefile
--- asterisk-1.0.7-orig/codecs/ilbc/Makefile 2004-08-29 19:40:58.000000000 +0200
+++ asterisk-1.0.7-2/codecs/ilbc/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -1,5 +1,5 @@
ARCH=$(PROC)
-CFLAGS+=-Wall -fPIC -O3 -funroll-loops -fomit-frame-pointer
+CFLAGS+=-Wall -fPIC $(OPTIMIZE)
LIB=libilbc.a
OBJS= anaFilter.o iCBSearch.o packing.o \
@@ -12,8 +12,8 @@
$(LIB): $(OBJS)
- ar cr $(LIB) $(OBJS)
- ranlib $(LIB)
+ $(AR) cr $(LIB) $(OBJS)
+ $(RANLIB) $(LIB)
clean:
rm -f $(LIB) *.o
diff -ruN asterisk-1.0.7-orig/codecs/lpc10/Makefile asterisk-1.0.7-2/codecs/lpc10/Makefile
--- asterisk-1.0.7-orig/codecs/lpc10/Makefile 2004-08-31 18:33:00.000000000 +0200
+++ asterisk-1.0.7-2/codecs/lpc10/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -31,6 +31,7 @@
ifneq ($(PROC),ppc)
ifneq ($(PROC),x86_64)
ifneq ($(PROC),alpha)
+ifneq ($(PROC),mipsel)
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
#This works for even old (2.96) versions of gcc and provides a small boost either way.
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
@@ -46,6 +47,7 @@
endif
endif
endif
+endif
LIB = $(LIB_TARGET_DIR)/liblpc10.a
@@ -62,7 +64,7 @@
$(LIB): $(OBJ)
$(AR) cr $@ $(OBJ)
- ranlib $@
+ $(RANLIB) $@
clean:
-rm -f *.o $(LIB)
diff -ruN asterisk-1.0.7-orig/configs/modules.conf.sample asterisk-1.0.7-2/configs/modules.conf.sample
--- asterisk-1.0.7-orig/configs/modules.conf.sample 2003-06-26 20:57:54.000000000 +0200
+++ asterisk-1.0.7-2/configs/modules.conf.sample 2005-03-19 17:38:06.000000000 +0100
@@ -23,8 +23,8 @@
; Explicitly load the chan_modem.so early on to be sure
; it loads before any of the chan_modem_* 's afte rit
;
-load => chan_modem.so
-load => res_musiconhold.so
+noload => chan_modem.so
+noload => res_musiconhold.so
;
; Load either OSS or ALSA, not both
; By default, load OSS only (automatically) and do not load ALSA
@@ -36,4 +36,12 @@
; exported to modules loaded after them.
;
[global]
-chan_modem.so=yes
+; chan_modem.so=yes
+noload => app_adsiprog.so
+noload => app_db.so
+noload => app_hasnewvoicemail.so
+noload => app_voicemail.so
+noload => chan_skinny.so
+noload => cdr_csv.so
+noload => res_adsi.so
+noload => res_agi.so
diff -ruN asterisk-1.0.7-orig/db1-ast/Makefile asterisk-1.0.7-2/db1-ast/Makefile
--- asterisk-1.0.7-orig/db1-ast/Makefile 2004-08-31 18:33:00.000000000 +0200
+++ asterisk-1.0.7-2/db1-ast/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -32,8 +32,8 @@
$(LIBDB): $(OBJS)
rm -f $@
- ar cq $@ $(OBJS)
- ranlib $@
+ $(AR) cq $@ $(OBJS)
+ $(RANLIB) $@
$(LIBDBSO): $(SHOBJS)
$(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^
diff -ruN asterisk-1.0.7-orig/dns.c asterisk-1.0.7-2/dns.c
--- asterisk-1.0.7-orig/dns.c 2004-06-22 22:11:15.000000000 +0200
+++ asterisk-1.0.7-2/dns.c 2005-03-19 17:38:06.000000000 +0100
@@ -153,7 +153,13 @@
#if defined(res_ninit)
#define HAS_RES_NINIT
-#else
+#endif
+
+#ifdef __UCLIBC__
+#undef HAS_RES_NINIT
+#endif
+
+#ifndef HAS_RES_NINIT
AST_MUTEX_DEFINE_STATIC(res_lock);
#if 0
#warning "Warning, res_ninit is missing... Could have reentrancy issues"
diff -ruN asterisk-1.0.7-orig/res/Makefile asterisk-1.0.7-2/res/Makefile
--- asterisk-1.0.7-orig/res/Makefile 2004-07-17 22:58:01.000000000 +0200
+++ asterisk-1.0.7-2/res/Makefile 2005-03-19 17:58:17.000000000 +0100
@@ -13,9 +13,9 @@
MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
res_agi.so
-MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
-MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
-MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
+#MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+#MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+#MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
CRYPTO_LIBS=-lssl -lcrypto
diff -ruN asterisk-1.0.7-orig/stdtime/Makefile asterisk-1.0.7-2/stdtime/Makefile
--- asterisk-1.0.7-orig/stdtime/Makefile 2003-11-05 07:19:41.000000000 +0100
+++ asterisk-1.0.7-2/stdtime/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -3,8 +3,8 @@
all: libtime.a
libtime.a: $(OBJS)
- ar rv $@ $(OBJS)
- ranlib $@
+ $(AR) rv $@ $(OBJS)
+ $(RANLIB) $@
install:
diff -urN asterisk-1.0.7.old/codecs/Makefile asterisk-1.0.7/codecs/Makefile
--- asterisk-1.0.7.old/codecs/Makefile 2005-04-10 19:40:28.000000000 +0200
+++ asterisk-1.0.7/codecs/Makefile 2005-04-10 19:51:15.000000000 +0200
@@ -19,7 +19,6 @@
#MODG723=codec_g723_1.so codec_g723_1b.so
#MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
#MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
-MODSPEEX=codec_speex.so
MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
CFLAGS+=-fPIC
#CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
|