finish implementing type=peer, implement setting of FastStart and H.245 Tunneling...
[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 #
20 # This needs to be updated to deal with more than just little endian machines
21 #
22 OSARCH=$(shell uname -s)
23 ifneq (${OSARCH},FreeBSD)
24 ifneq (${OSARCH},NetBSD)
25 CFLAGS += -march=$(shell uname -m)
26 endif
27 endif
28 CFLAGS += -DPBYTE_ORDER=PLITTLE_ENDIAN
29
30 ifeq (${OSARCH},Linux)
31 LDLIBS+=-ldl
32 endif
33
34 #############################################
35 #
36 # Only change below if you know WTF your doing
37 #
38 OSARCH=$(shell uname -s)
39 CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
40 CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations 
41 CFLAGS += -D_REENTRANT -D_GNU_SOURCE
42 CFLAGS += -I../../include
43 CFLAGS += -I$(PWLIBDIR)/include 
44 CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
45
46 all:    libchanh323.a
47
48 samples: 
49         if [ -f $(ASTETCDIR)/h323.conf ]; then \
50                 mv -f $(ASTETCDIR)/h323.conf $(ASTETCDIR)/h323.conf.old ; \
51         fi ; 
52         install h323.conf.sample $(ASTETCDIR)/h323.conf
53  
54
55 ast_h323.o:     ast_h323.cpp
56         $(CXX) -g -c -o $@ $(CFLAGS) $<
57
58 libchanh323.a:  ast_h323.o
59         ar cr libchanh323.a ast_h323.o
60
61 chan_h323.so:   
62         $(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)
63
64 chan_h323_d.so: chan_h323.o ast_h323.o
65         $(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)
66
67 chan_h323_s.so: chan_h323.o ast_h323.o
68         $(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)
69 clean:
70         rm -f *.o *.so core.* libchanh323.a
71
72