[Asterisk-cvs] asterisk/channels/h323 INSTALL.openh323,1.4,1.5 Makefile,1.15,1.16

markster at lists.digium.com markster at lists.digium.com
Tue Jun 22 13:56:19 CDT 2004


Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv21170/channels/h323

Modified Files:
	INSTALL.openh323 Makefile 
Log Message:
Merge major BSD mutex and symbol conflict patches (bug #1816) (link patch still pending)


Index: INSTALL.openh323
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/INSTALL.openh323,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- INSTALL.openh323	3 Apr 2003 09:05:53 -0000	1.4
+++ INSTALL.openh323	22 Jun 2004 17:42:13 -0000	1.5
@@ -6,3 +6,13 @@
 Also, you will notice they never tell you to 'make install' so don't do it.
 
 
+On FreeBSD, the Makefiles are configured to
+locate the compiled openh323 port, if it has
+been built.  Here is one way to build
+openh323 and ptlib on such that the Makefiles
+find it:
+	# cd /usr/ports/net/openh323
+	# make
+It is not necessary to install the port.  The
+asterisk makefiles do not use any files
+installed by the port.

Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/Makefile,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Makefile	28 Apr 2004 21:06:29 -0000	1.15
+++ Makefile	22 Jun 2004 17:42:13 -0000	1.16
@@ -19,8 +19,15 @@
 #
 # This needs to be updated to deal with more than just little endian machines
 #
-CFLAGS += -march=$(shell uname -m) -DPBYTE_ORDER=PLITTLE_ENDIAN
+OSARCH=$(shell uname -s)
+ifneq (${OSARCH},FreeBSD)
+CFLAGS += -march=$(shell uname -m)
+endif
+CFLAGS += -DPBYTE_ORDER=PLITTLE_ENDIAN
 
+ifeq (${OSARCH},Linux)
+LDLIBS+=-ldl
+endif
 
 #############################################
 #
@@ -38,16 +45,22 @@
 
 # Pre Janus release directives
 CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
-CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations
+CFLAGS += -pipe -Wall -fPIC
 ifeq (${OSARCH},Linux)
 CFLAGS += -DP_LINUX
+LIBS+=-lpthread
+endif
+ifeq ($(findstring BSD,${OSARCH}),BSD)
+CFLAGS += -pthread
 endif
 CFLAGS += -D_REENTRANT -D_GNU_SOURCE
 CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
 CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA
 CFLAGS += -I../../include
 CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include
-CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
+CFLAGS += -I$(OPENH323DIR)/include
+CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations
+LIBS+= -lcrypto -lssl -lexpat
 
 all:   	libchanh323.a
 
@@ -59,19 +72,19 @@
  
 
 ast_h323.o:	ast_h323.cpp
-	g++ -g -c -fno-rtti -o $@ $(CFLAGS) $<
+	$(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $<
 
 libchanh323.a:	ast_h323.o
 	ar cr libchanh323.a ast_h323.o
 
 chan_h323.so:	
-	g++  -g -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+	$(CXX)  -g -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib $(CHANH323LIB)
 
 chan_h323_d.so:	chan_h323.o ast_h323.o
-	g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_d -L$(OPENH323DIR)/lib -lh323_linux_x86_d -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+	$(CXX)     -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_d -L$(OPENH323DIR)/lib -lh323_linux_x86_d -L/usr/lib $(CHANH323LIB)
 
 chan_h323_s.so:	chan_h323.o ast_h323.o
-	g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
+	$(CXX)  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s -L/usr/lib $(CHANH323LIB)
 clean:
 	rm -f *.o *.so core.* libchanh323.a
 




More information about the svn-commits mailing list