Lines 1-33
Link Here
|
1 |
--- ./Makefile.orig 2012-01-25 20:40:01.000000000 +0100 |
1 |
--- Makefile.orig 2016-01-05 16:43:05 UTC |
2 |
+++ ./Makefile 2014-08-22 10:44:57.000000000 +0200 |
2 |
+++ Makefile |
3 |
@@ -16,11 +16,11 @@ |
3 |
@@ -13,7 +13,7 @@ |
4 |
ASTERISK_SRC_DIR = |
4 |
# |
5 |
|
5 |
|
6 |
# asterisk release or subversion working copy |
6 |
# asterisk source directory |
7 |
-ASTERISK_SRC_VERSION = $(shell if [ -e $(ASTERISK_SRC_DIR)/.version ] ; then echo release; elif [ -e $(ASTERISK_SRC_DIR)/.svn ] ; then echo subversion; else echo unknown; fi) |
7 |
-ASTERISK_SRC_DIR = |
8 |
+ASTERISK_SRC_VERSION = release |
8 |
+ASTERISK_SRC_DIR = ${LOCALBASE} |
9 |
|
9 |
|
10 |
# asterisk release version or subversion branch |
10 |
ifndef ASTERISK_SRC_DIR |
11 |
ifeq ($(ASTERISK_SRC_VERSION),release) |
11 |
$(warning Asterisk source directory is not set) |
12 |
- ASTERISK = $(shell cat $(ASTERISK_SRC_DIR)/.version | cut -d "." -f1,2 | sed -e 's/\.//') |
12 |
@@ -21,7 +21,7 @@ ifndef ASTERISK_SRC_DIR |
13 |
+ ASTERISK = 18 |
|
|
14 |
else |
15 |
ifeq ($(ASTERISK_SRC_VERSION),subversion) |
16 |
ASTERISK = $(shell svn info $(ASTERISK_SRC_DIR) | grep URL | sed -e 's:^.*/::' | cut -d "." -f 1,2 | sed -e 's/\.//') |
17 |
@@ -31,10 +31,10 @@ |
18 |
endif |
13 |
endif |
19 |
|
14 |
|
20 |
# asterisk include directory |
15 |
# asterisk version |
21 |
-ASTERISK_INCLUDE_DIR = $(ASTERISK_SRC_DIR)/include |
16 |
-ASTERISK_SRC_VERSION = $(shell if [ -e $(ASTERISK_SRC_DIR)/.version ] ; then cat $(ASTERISK_SRC_DIR)/.version | awk -F. '{printf "%01d%02d",$$1,$$2}' ; fi) |
22 |
+ASTERISK_INCLUDE_DIR = ${LOCALBASE}/include |
17 |
+ASTERISK_SRC_VERSION = 18 |
|
|
18 |
|
19 |
ifeq ($(ASTERISK_SRC_VERSION),) |
20 |
$(warning Asterisk version is not set) |
21 |
@@ -32,7 +32,7 @@ endif |
22 |
ASTERISK_INCLUDE_DIR = $(ASTERISK_SRC_DIR)/include |
23 |
|
23 |
|
24 |
# asterisk module directory |
24 |
# asterisk module directory |
25 |
-INSTALL_MODULES_DIR = /usr/lib/asterisk/modules |
25 |
-INSTALL_MODULES_DIR = /usr/lib/asterisk/modules |
26 |
+INSTALL_MODULES_DIR = ${LOCALBASE}/lib/asterisk/modules |
26 |
+INSTALL_MODULES_DIR = ${PREFIX}/lib/asterisk/modules |
27 |
|
27 |
|
28 |
# module release |
28 |
# module release |
29 |
RELEASE = 2.1 |
29 |
RELEASE = 2.7 |
30 |
@@ -86,7 +86,7 @@ |
30 |
@@ -84,12 +84,12 @@ INCLUDE = -I$(ASTERISK_INCLUDE_DIR) |
31 |
# compiler flags |
31 |
# compiler flags |
32 |
# |
32 |
# |
33 |
|
33 |
|
Lines 36-51
Link Here
|
36 |
#CFLAGS += -O3 -march=pentium3 -msse -mfpmath=sse,387 -ffast-math |
36 |
#CFLAGS += -O3 -march=pentium3 -msse -mfpmath=sse,387 -ffast-math |
37 |
# PERF: below is 10% faster than -O2 or -O3 alone. |
37 |
# PERF: below is 10% faster than -O2 or -O3 alone. |
38 |
#CFLAGS += -O3 -ffast-math -funroll-loops |
38 |
#CFLAGS += -O3 -ffast-math -funroll-loops |
39 |
@@ -103,7 +103,7 @@ |
39 |
# below is another 5% faster or so. |
|
|
40 |
-CFLAGS += -O3 -ffast-math -funroll-all-loops -fsingle-precision-constant |
41 |
+#CFLAGS += -O3 -ffast-math -funroll-all-loops -fsingle-precision-constant |
42 |
#CFLAGS += -mcpu=7450 -faltivec -mabi=altivec -mdynamic-no-pic |
43 |
# adding -msse -mfpmath=sse has little effect. |
44 |
#CFLAGS += -O3 -msse -mfpmath=sse |
45 |
@@ -102,7 +102,7 @@ CFLAGS += -fPIC |
40 |
# preprocessor flags |
46 |
# preprocessor flags |
41 |
# |
47 |
# |
42 |
|
48 |
|
43 |
-CPPFLAGS = $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE |
49 |
-CPPFLAGS = $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE |
44 |
+CPPFLAGS += $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE |
50 |
+CPPFLAGS += $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE |
45 |
CPPFLAGS += -DRELEASE=\"$(RELEASE)\" |
51 |
CPPFLAGS += -DRELEASE=\"$(RELEASE)\" |
46 |
CPPFLAGS += -DASTERISK=$(ASTERISK) |
52 |
CPPFLAGS += -DASTERISK_SRC_VERSION=$(ASTERISK_SRC_VERSION) |
47 |
CPPFLAGS += -DCHANNEL_TABLE_SIZE=$(CHANNEL_TABLE_SIZE) |
53 |
CPPFLAGS += -DCHANNEL_TABLE_SIZE=$(CHANNEL_TABLE_SIZE) |
48 |
@@ -182,7 +182,8 @@ |
54 |
@@ -127,7 +127,7 @@ CPPFLAGS += -DAC_USE_ULAW |
|
|
55 |
# |
56 |
# Uncomment this if you want to use *bsd kqueue for timing |
57 |
# |
58 |
-# CPPFLAGS += -DKQUEUE |
59 |
+CPPFLAGS += -DKQUEUE |
60 |
# |
61 |
|
62 |
# |
63 |
@@ -207,7 +207,8 @@ clean: |
49 |
$(OBJS): $(INCS) |
64 |
$(OBJS): $(INCS) |
50 |
|
65 |
|
51 |
$(TARGET): $(OBJS) |
66 |
$(TARGET): $(OBJS) |
Lines 53-58
Link Here
|
53 |
+ $(CC) $(LDFLAGS) $(SOLINK) -o $@ $(OBJS) |
68 |
+ $(CC) $(LDFLAGS) $(SOLINK) -o $@ $(OBJS) |
54 |
|
69 |
|
55 |
install: |
70 |
install: |
56 |
- $(INSTALL) -m 755 $(TARGET) $(INSTALL_MODULES_DIR) |
71 |
- if [ -f $(TARGET) ]; then $(INSTALL) -m 755 $(TARGET) $(INSTALL_MODULES_DIR); fi |
57 |
+ mkdir -p $(DESTDIR)$(INSTALL_MODULES_DIR) |
72 |
+ mkdir -p $(DESTDIR)$(INSTALL_MODULES_DIR) |
58 |
+ $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(INSTALL_MODULES_DIR) |
73 |
+ ${BSD_INSTALL_LIB} $(TARGET) $(DESTDIR)$(INSTALL_MODULES_DIR) |