1 diff -ruN asterisk-1.0.7-old/Makefile asterisk-1.0.7-new/Makefile
2 --- asterisk-1.0.7-old/Makefile 2005-03-10 09:15:05.000000000 +0100
3 +++ asterisk-1.0.7-new/Makefile 2005-03-19 17:38:06.000000000 +0100
7 #Tell gcc to optimize the asterisk's code
11 #Include debug symbols in the executables (-g) and profiling info (-pg)
15 # If you are running a radio application, define RADIO_RELAX so that the DTMF
16 # will be received more reliably
19 # If you don't have a lot of memory (e.g. embedded Asterisk), uncomment the
20 # following to reduce the size of certain static buffers
21 -#OPTIONS += -DLOW_MEMORY
22 +OPTIONS += -DLOW_MEMORY
24 # Optional debugging parameters
25 DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
27 BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
29 ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
30 -ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
31 +ASTVARLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
32 ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
33 ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
34 ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
37 INCLUDE=-Iinclude -I../include
38 CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
40 +CFLAGS+=$(OPTIMIZE) $(CFLAGS_EXTRA)
42 ifneq ($(PROC),ultrasparc)
43 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
45 CFLAGS+=# -fomit-frame-pointer
46 SUBDIRS=res channels pbx apps codecs formats agi cdr astman stdtime
47 ifeq (${OSARCH},Linux)
49 +LIBS=$(LDFLAGS_EXTRA) -ldl -lpthread
52 ifeq (${OSARCH},Linux)
54 ifeq (${OSARCH},OpenBSD)
55 LIBS=-lcrypto -lpthread -lm -lncurses
58 +LIBS+=-Wl,-Bstatic -lssl -Wl,-Bdynamic
59 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
60 translate.o file.o say.o pbx.o cli.o md5.o term.o \
61 ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
63 cd editline && unset CFLAGS LIBS && ./configure ; \
65 editline/libedit.a: FORCE
66 - cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
67 - $(MAKE) -C editline libedit.a
68 + cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE) $(CFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" ./configure
69 + $(MAKE) PROC=$(PROC) CFLAGS="$(OPTIMIZE)" -C editline libedit.a
71 db1-ast/libdb1.a: FORCE
72 @if [ -d db1-ast ]; then \
73 - $(MAKE) -C db1-ast libdb1.a ; \
74 + $(MAKE) PROC=$(PROC) OORG="$(OPTIMIZE)" -C db1-ast libdb1.a ; \
76 echo "You need to do a cvs update -d not just cvs update"; \
80 stdtime/libtime.a: FORCE
81 @if [ -d stdtime ]; then \
82 - $(MAKE) -C stdtime libtime.a ; \
83 + $(MAKE) PROC=$(PROC) -C stdtime libtime.a ; \
85 echo "You need to do a cvs update -d not just cvs update"; \
88 if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
89 install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
91 - for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
92 + for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x install || exit 1 ; done
93 install -d $(DESTDIR)$(ASTHEADERDIR)
94 install -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
95 rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
98 rm -rf /tmp/asterisk ; \
99 mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
100 - $(MAKE) DESTDIR=/tmp/asterisk install ; \
101 - $(MAKE) DESTDIR=/tmp/asterisk samples ; \
102 + $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk install ; \
103 + $(MAKE) PROC=$(PROC) DESTDIR=/tmp/asterisk samples ; \
104 mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
105 cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
106 sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
107 @@ -544,12 +544,12 @@
111 - $(MAKE) OPTIMIZE= K6OPT= install
112 + $(MAKE) PROC=$(PROC) OPTIMIZE= K6OPT= install
114 valgrind: dont-optimize
117 - for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
118 + for x in $(SUBDIRS); do $(MAKE) PROC=$(PROC) -C $$x depend || exit 1 ; done
121 @if ! which mpg123 &>/dev/null ; then \