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
|
$FreeBSD$
--- Makefile.orig
+++ Makefile
@@ -39,7 +39,7 @@
# Install everything under this directory. If this is empty, then everything
# will be installed under /
#
-DESTDIR=
+DESTDIR=$(PREFIX)
#
# Set PWLIBDIR variable to the directory containing the sources of
@@ -49,7 +49,7 @@
# compile asterisk-oh323. Do not use the installed library of your
# distribution. It won't work.
#
-PWLIBDIR=/root/src/oh323/pwlib
+PWLIBDIR?=/root/src/oh323/pwlib
#
# Set OPENH323LIBDIR variable to the directory containing the sources of
@@ -59,13 +59,13 @@
# compile asterisk-oh323. Do not use the installed library of your
# distribution. It won't work.
#
-OPENH323DIR=/root/src/oh323/openh323
+OPENH323DIR?=/root/src/oh323/openh323
#
# Set ASTERISKINCDIR variable to the directory containing the include files of
# Asterisk PBX.
#
-ASTERISKINCDIR=/root/src/asterisk/include
+ASTERISKINCDIR=$(LOCALBASE)/include
#
# Set ASTERISKMODDIR variable to the directory where ASTERISK's modules reside.
@@ -73,7 +73,7 @@
#
# Note: This directory is created under $DESTDIR.
#
-ASTERISKMODDIR=/usr/lib/asterisk/modules
+ASTERISKMODDIR=/lib/asterisk/modules
#
# Set ASTERISKETCDIR variable to the directory where ASTERISK's configuration
@@ -91,7 +91,7 @@
#
# Note: This directory is created under $DESTDIR.
#
-OH323WRAPLIBDIR=/usr/local/lib
+OH323WRAPLIBDIR=/lib
#
# Set SSLINCDIR variable to the directory where ssl/crypto
@@ -157,9 +157,8 @@
SUBDIRS=wrapper asterisk-driver
.PHONY: all build install clean subdirs_build subdir_install subdir_clean \
rpm rpm_clean help $(SUBDIRS)
-CC=gcc
-CPP=g++
-MAKE=make
+CC?=gcc
+CPP?=g++
INSTALL=install
TOUCH=touch
AR=ar
@@ -191,12 +190,12 @@
ifdef P_PTHREADS
OPENH323USERFLAGS += P_PTHREADS=1
endif
-OPENH323FLAGS=$(shell make $(OPENH323USERFLAGS) --no-print-directory -s \
+OPENH323FLAGS=$(shell $(MAKE) $(OPENH323USERFLAGS) --no-print-directory -s \
-C $(OPENH323DIR) \
PWLIBDIR=$(PWLIBDIR) OPENH323DIR=$(OPENH323DIR) ccflags)
-CPPFLAGS=$(OPENH323FLAGS) -Wall -x c++ -Os
+CPPFLAGS=$(CXXFLAGS) $(OPENH323FLAGS) -Wall -x c++ -Os
ASTERISKINCLUDE=-I$(ASTERISKINCDIR) -I../wrapper
-CFLAGS=-Wall
+CFLAGS+=-Wall
ifdef HAS_OH323MODS
CPPFLAGS += -DHAS_OH323MODS
CFLAGS += -DHAS_OH323MODS
@@ -223,7 +222,7 @@
clean: subdirs_clean rpm_clean
-all: subdirs_build subdirs_strip subdirs_install
+all: subdirs_build
subdirs_build:
for x in $(SUBDIRS); do $(MAKE) -C $$x build || exit 1 ; done
|