remote memory profiling
[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 ifndef ASTETCDIR
16 ASTETCDIR=/etc/asterisk
17 endif
18
19 #Uncomment if u want to attempt to include the G.729 stuff
20 # This is a quick fix to work around the missing H323Capability
21 # in Open H.323
22 #
23 #CFLAGS += -DWANT_G729
24 #
25 # This needs to be updated to deal with more than just little endian machines
26 #
27 CFLAGS += -march=$(shell uname -m) -DPBYTE_ORDER=PLITTLE_ENDIAN
28
29 # Only change below if you know WTF your doing
30 #
31 CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
32 CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations 
33 CFLAGS += -DP_LINUX  -D_REENTRANT -D_GNU_SOURCE
34 CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
35 CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA 
36 CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include 
37 CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
38
39
40 all: chan_h323.so
41
42 noshared: chan_h323_s.so
43 optnoshared: chan_h323_s.so
44 debug:  chan_h323_d.so
45
46
47 install: all
48         install -m 755 chan_h323.so $(ASTERISKDIR)
49         @echo " +----- chan_h323 Installation Complete ----- +"
50         @echo " +                                            +"
51         @echo " + chan_h323 has successfully been installed. +"
52         @echo " + If you would like to install the sample    +"
53         @echo " + configuration file (overwriting existing   +"
54         @echo " + config file), run:                         +"
55         @echo " +                                            +"
56         @echo " +               $(MAKE) samples                 +"
57         @echo " +                                            +"
58         @echo " +                                            +"
59  
60
61 samples: 
62         if [ -f $(ASTETCDIR)/h323.conf ]; then \
63                 mv -f $(ASTETCDIR)/h323.conf $(ASTETCDIR)/h323.conf.old ; \
64         fi ; 
65         install h323.conf.sample $(ASTETCDIR)/h323.conf
66  
67
68 chan_h323.o:    chan_h323.c
69         $(CC) -g -c -o $@ $(CFLAGS) $<
70 ast_h323.o:     ast_h323.cpp
71         g++ -g -c -o $@ $(CFLAGS) $<
72
73 chan_h323.so:   chan_h323.o ast_h323.o
74         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
75
76 chan_h323_d.so: chan_h323.o ast_h323.o
77         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
78
79 chan_h323_s.so: chan_h323.o ast_h323.o
80         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
81 clean:
82         rm -f *.o *.so core.*
83
84