aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk/files/patch-channels::Makefile
blob: fd855e7a27101fda993c44909615db3b2be6946b (plain) (blame)
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

$FreeBSD$

--- channels/Makefile.orig	Thu Mar 25 11:43:36 2004
+++ channels/Makefile	Thu Apr 29 14:36:36 2004
@@ -33,12 +33,10 @@
 #
 #CHANNEL_LIBS+=chan_vofr
 
-ifneq (${OSARCH},Darwin)
 CHANNEL_LIBS+=chan_oss.so
-endif
 
 CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
-CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
+CHANNEL_LIBS+=chan_h323.so
 
 CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
 CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
@@ -48,7 +46,7 @@
 CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
 ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
 ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
-CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
+CFLAGS+=$(shell [ -f $(LOCALBASE)/include/zaptel.h ] && echo "-DIAX_TRUNKING -I$(LOCALBASE)/include")
 CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
 CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
 
@@ -69,7 +67,7 @@
 
 ZAPDIR=/usr/lib
 
-CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
+CHANNEL_LIBS+=$(shell [ -f $(LOCALBASE)/include/zaptel.h ] && echo "chan_zap.so")
 
 CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
 
@@ -110,10 +108,8 @@
 
 chan_oss.o: chan_oss.c  busy.h ringtone.h
 
-ifeq (${OSARCH},OpenBSD)
 chan_oss.so: chan_oss.o
-	$(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
-endif
+	$(CC) $(SOLINK) -o $@ chan_oss.o
 
 chan_iax2.so: chan_iax2.o iax2-parser.o
 ifeq ($(USE_MYSQL_FRIENDS),1)
@@ -133,7 +129,7 @@
 	$(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
 
 chan_zap.so: chan_zap.o
-	$(CC) $(SOLINK) -o $@ $<  $(ZAPPRI) $(ZAPR2) -ltonezone
+	$(CC) $(SOLINK) -o $@ $<  $(ZAPPRI) $(ZAPR2) -L$(LOCALBASE)/lib -ltonezone
 
 chan_sip.so: chan_sip.o
 ifeq ($(USE_MYSQL_FRIENDS),1)
@@ -157,16 +153,17 @@
 chan_vpb.so: chan_vpb.o
 	 $(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
 
-chan_h323.so: chan_h323.o h323/libchanh323.a
-	$(CC) $(SOLINK) -o $@ $< h323/libchanh323.a -L$(PWLIBDIR)/lib  -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+chan_h323.so: chan_h323.o h323/ast_h323.o
+	$(CXX) $(SOLINK) -o $@ $< h323/ast_h323.o -L$(OPENH323DIR)/lib -lh323_FreeBSD_x86_r_s -L$(PWLIBDIR)/lib  -lpt_FreeBSD_x86_r_s -lcrypto -lssl -L$(LOCALBASE)/lib -lexpat -llber -lldap -lldap_r
 
+h323/ast_h323.o:
+	$(MAKE) -C h323 ast_h323.o
 
 #chan_modem.so : chan_modem.o
 #	$(CC) -rdynamic -shared -Xlinker -x -o $@ $<
 
 install: all
-	for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-	if ! [ -f chan_iax.so ]; then rm -f $(DESTDIR)$(MODULES_DIR)/chan_iax.so ; fi
+	for x in $(CHANNEL_LIBS); do $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(MODULES_DIR) ; done
 
 depend: .depend