79 lines
2.7 KiB
Plaintext
79 lines
2.7 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.2 2005/11/29 03:40:38 jolan Exp $
|
|
--- Makefile.orig Thu Oct 27 12:53:35 2005
|
|
+++ Makefile Mon Nov 28 21:38:08 2005
|
|
@@ -17,13 +17,13 @@
|
|
# app_conference defines which can be passed on the command-line
|
|
#
|
|
|
|
-INSTALL_PREFIX := /opt/horizon
|
|
-INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules
|
|
+#INSTALL_PREFIX := /opt/horizon
|
|
+INSTALL_MODULES_DIR := $(PREFIX)/lib/asterisk/modules
|
|
|
|
-ASTERISK_INCLUDE_DIR := $(HOME)/local/asterisk/asterisk/include
|
|
+ASTERISK_INCLUDE_DIR := $(LOCALBASE)/include
|
|
|
|
# turn app_conference debugging on or off ( 0 == OFF, 1 == ON )
|
|
-APP_CONFERENCE_DEBUG := 1
|
|
+APP_CONFERENCE_DEBUG := 0
|
|
|
|
# 0 = OFF 1 = astdsp 2 = speex
|
|
SILDET := 2
|
|
@@ -41,32 +41,32 @@ SHAREDOS = app_conference.so
|
|
|
|
PROC = $(shell uname -m)
|
|
INSTALL = install
|
|
-CC = gcc
|
|
+#CC = gcc
|
|
|
|
INCLUDE = -I$(ASTERISK_INCLUDE_DIR)
|
|
LIBS = -ldl -lpthread -lm
|
|
DEBUG := -g
|
|
|
|
-CFLAGS = -pipe -Wall -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE
|
|
+CFLAGS += -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE
|
|
#CFLAGS += -O2
|
|
#CFLAGS += -O3 -march=pentium3 -msse -mfpmath=sse,387 -ffast-math
|
|
# PERF: below is 10% faster than -O2 or -O3 alone.
|
|
#CFLAGS += -O3 -ffast-math -funroll-loops
|
|
# below is another 5% faster or so.
|
|
-CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays -fsingle-precision-constant
|
|
+#CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays -fsingle-precision-constant
|
|
|
|
# this is fun for PPC
|
|
#CFLAGS += -mcpu=7450 -faltivec -mabi=altivec -mdynamic-no-pic
|
|
|
|
# this is fun for x86
|
|
-CFLAGS += -march=pentium3 -msse -mfpmath=sse,387
|
|
+#CFLAGS += -march=pentium3 -msse -mfpmath=sse,387
|
|
|
|
|
|
# adding -msse -mfpmath=sse has little effect.
|
|
#CFLAGS += -O3 -msse -mfpmath=sse
|
|
#CFLAGS += $(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
|
-CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
|
|
-CFLAGS += -DCRYPTO
|
|
+#CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
|
|
+#CFLAGS += -DCRYPTO
|
|
|
|
ifeq ($(APP_CONFERENCE_DEBUG), 1)
|
|
CFLAGS += -DAPP_CONFERENCE_DEBUG
|
|
@@ -89,7 +89,7 @@ OSARCH=$(shell uname -s)
|
|
ifeq (${OSARCH},Darwin)
|
|
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
|
|
else
|
|
-SOLINK=-shared -Xlinker -x
|
|
+SOLINK=-shared -fPIC -Xlinker -x
|
|
endif
|
|
|
|
#
|
|
@@ -102,7 +102,7 @@ clean:
|
|
rm -f *.so *.o $(OBJS)
|
|
|
|
app_conference.so : $(OBJS)
|
|
- $(CC) -pg -shared -Xlinker -x -o $@ $(OBJS)
|
|
+ $(CC) -shared -Xlinker -x -o $@ $(OBJS)
|
|
|
|
vad_test: vad_test.o libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o
|
|
$(CC) $(PROFILE) -o $@ $^ -lm
|