add libxslt package
[openwrt.git] / package / asterisk / patches / asterisk-1.0.7-Makefile.patch
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
4 @@ -63,10 +63,10 @@
5 #K6OPT = -DK6OPT
6
7 #Tell gcc to optimize the asterisk's code
8 -OPTIMIZE+=-O6
9 +#OPTIMIZE+=-O6
10
11 #Include debug symbols in the executables (-g) and profiling info (-pg)
12 -DEBUG=-g #-pg
13 +#DEBUG=-g #-pg
14
15 # If you are running a radio application, define RADIO_RELAX so that the DTMF
16 # will be received more reliably
17 @@ -74,7 +74,7 @@
18
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
23
24 # Optional debugging parameters
25 DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
26 @@ -112,7 +112,7 @@
27 BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
28
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
35 @@ -128,7 +128,7 @@
36
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
39 -CFLAGS+=$(OPTIMIZE)
40 +CFLAGS+=$(OPTIMIZE) $(CFLAGS_EXTRA)
41
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)
44 @@ -187,7 +187,7 @@
45 CFLAGS+=# -fomit-frame-pointer
46 SUBDIRS=res channels pbx apps codecs formats agi cdr astman stdtime
47 ifeq (${OSARCH},Linux)
48 -LIBS=-ldl -lpthread
49 +LIBS=$(LDFLAGS_EXTRA) -ldl -lpthread
50 endif
51 LIBS+=-lncurses -lm
52 ifeq (${OSARCH},Linux)
53 @@ -205,7 +205,7 @@
54 ifeq (${OSARCH},OpenBSD)
55 LIBS=-lcrypto -lpthread -lm -lncurses
56 endif
57 -LIBS+=-lssl
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 \
62 @@ -240,12 +240,12 @@
63 cd editline && unset CFLAGS LIBS && ./configure ; \
64
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
70
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 ; \
75 else \
76 echo "You need to do a cvs update -d not just cvs update"; \
77 exit 1; \
78 @@ -289,7 +289,7 @@
79
80 stdtime/libtime.a: FORCE
81 @if [ -d stdtime ]; then \
82 - $(MAKE) -C stdtime libtime.a ; \
83 + $(MAKE) PROC=$(PROC) -C stdtime libtime.a ; \
84 else \
85 echo "You need to do a cvs update -d not just cvs update"; \
86 exit 1; \
87 @@ -381,7 +381,7 @@
88 if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
89 install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
90 fi
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
96 @@ -519,8 +519,8 @@
97 __rpm: _version
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 @@
108 fi
109
110 dont-optimize:
111 - $(MAKE) OPTIMIZE= K6OPT= install
112 + $(MAKE) PROC=$(PROC) OPTIMIZE= K6OPT= install
113
114 valgrind: dont-optimize
115
116 depend: .depend
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
119
120 .depend:
121 @if ! which mpg123 &>/dev/null ; then \
This page took 0.043983 seconds and 5 git commands to generate.