Add some instructions to download and compile cvs openh323 and chan_h323
[asterisk/asterisk.git] / channels / h323 / Makefile
1 # include the Makefile of OpenH323 
2
3 ifndef OPENH323DIR
4 OPENH323DIR=$(HOME)/openh323
5 endif
6
7 ifndef PWLIBDIR
8 PWLIBDIR=$(HOME)/pwlib
9 endif
10
11 ifndef ASTERISKDIR
12 ASTERISKDIR= /usr/lib/asterisk/modules
13 endif
14
15
16 CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
17 CFLAGS  = -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations 
18 CFLAGS += -DP_LINUX  -D_REENTRANT -D_GNU_SOURCE
19 # This needs to be updated to deal with more than just little endian machines
20 CFLAGS += -march=$(shell uname -m) -DPBYTE_ORDER=PLITTLE_ENDIAN
21 CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
22 CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA 
23 CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include 
24 CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
25
26
27 all: chan_h323.so
28
29 noshared: chan_h323_s.so
30 optnoshared: chan_h323_s.so
31 debug:  chan_h323_d.so
32
33
34 install: all
35         install -m 755 chan_h323.so $(ASTERISKDIR)
36
37 chan_h323.o:    chan_h323.c
38         $(CC) -g -c -o $@ $(CFLAGS) $<
39 ast_h323.o:     ast_h323.cpp
40         g++ -g -c -o $@ $(CFLAGS) $<
41
42 chan_h323.so:   chan_h323.o ast_h323.o
43         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
44
45 chan_h323_d.so: chan_h323.o ast_h323.o
46         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
47
48 chan_h323_s.so: chan_h323.o ast_h323.o
49         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
50 clean:
51         rm -f *.o *.so core.*
52
53