summaryrefslogtreecommitdiffstats
path: root/net/asterisk10/files/patch-cdr::Makefile
blob: 1d0fb2049ba22396ba70a654b42e186736ef0e66 (plain)
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
--- cdr/Makefile.orig	Tue Aug 31 23:33:00 2004
+++ cdr/Makefile	Tue Aug  9 17:28:11 2005
@@ -21,7 +21,7 @@
 OSARCH=$(shell uname -s)
 
 ifeq (${OSARCH},FreeBSD)
-SOLINK+=-L/usr/local/lib
+SOLINK+=-L$(LOCALBASE)/lib
 endif
 
 #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
@@ -37,18 +37,23 @@
 #
 # unixODBC stuff...
 #
+ifdef WITH_ODBC
 MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "cdr_odbc.so"; fi)
 MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "cdr_odbc.so"; fi) 
+endif
 
 #
 # FreeTDS stuff...
 #
+ifdef WITH_FREETDS
 MODS+=$(shell if [ -f "/usr/include/tds.h" ]; then echo "cdr_tds.so"; fi)
 MODS+=$(shell if [ -f "/usr/local/include/tds.h" ]; then echo "cdr_tds.so"; fi)
+endif
 
 #
 # PGSQL stuff...  Autoconf anyone??
 #
+ifdef WITH_PGSQL
 MODS+=$(shell if [ -d /usr/local/pgsql/include ] || [ -d /usr/include/pgsql ] || [ -d /usr/local/include/pgsql ] || [ -d /opt/pgsql/include ] || [ -f /usr/include/libpq-fe.h ] ; then echo "cdr_pgsql.so"; fi)
 CFLAGS+=$(shell if [ -d /usr/local/pgsql/include ]; then echo "-I/usr/local/pgsql/include"; fi)
 CFLAGS+=$(shell if [ -d /usr/include/pgsql ]; then echo "-I/usr/include/pgsql"; fi)
@@ -62,16 +67,19 @@
 MLFLAGS+=$(shell if [ -d /usr/local/lib/pgsql ]; then echo "-L/usr/local/lib/pgsql"; fi)
 MLFLAGS+=$(shell if [ -d /opt/pgsql/lib ]; then echo "-L/opt/pgsql/lib"; fi)
 MLFLAGS+=$(shell if [ -f /usr/lib/libpq.so ]; then echo "-L/usr/lib"; fi)
+endif
 
 #
 # SQLIte stuff...
 #
+ifdef WITH_SQLITE
 MODS+=$(shell if [ -f "/usr/include/sqlite.h" ]; then echo "cdr_sqlite.so"; fi)
+endif
 
 all: depend $(MODS)
 
 install: all
-	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+	for x in $(MODS); do $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(MODULES_DIR) ; done
 
 clean:
 	rm -f *.so *.o .depend
OpenPOWER on IntegriCloud