2003-03-31 07:13:36 +00:00
|
|
|
# include the Makefile of OpenH323
|
|
|
|
|
|
|
|
ifndef OPENH323DIR
|
|
|
|
OPENH323DIR=$(HOME)/openh323
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef PWLIBDIR
|
|
|
|
PWLIBDIR=$(HOME)/pwlib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef ASTERISKDIR
|
|
|
|
ASTERISKDIR= /usr/lib/asterisk/modules
|
|
|
|
endif
|
|
|
|
|
2003-04-02 18:58:47 +00:00
|
|
|
ifndef ASTETCDIR
|
|
|
|
ASTETCDIR=/etc/asterisk
|
|
|
|
endif
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2003-06-25 06:48:08 +00:00
|
|
|
#
|
2003-03-31 07:13:36 +00:00
|
|
|
# This needs to be updated to deal with more than just little endian machines
|
2003-06-25 06:48:08 +00:00
|
|
|
#
|
2003-03-31 07:13:36 +00:00
|
|
|
CFLAGS += -march=$(shell uname -m) -DPBYTE_ORDER=PLITTLE_ENDIAN
|
2003-06-25 06:48:08 +00:00
|
|
|
|
2003-08-10 18:12:48 +00:00
|
|
|
|
|
|
|
#############################################
|
|
|
|
#
|
2003-06-25 06:48:08 +00:00
|
|
|
# Only change below if you know WTF your doing
|
|
|
|
#
|
|
|
|
CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
|
|
|
|
CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations
|
|
|
|
CFLAGS += -DP_LINUX -D_REENTRANT -D_GNU_SOURCE
|
2003-03-31 07:13:36 +00:00
|
|
|
CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
|
2003-08-16 16:55:19 +00:00
|
|
|
CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA
|
|
|
|
CFLAGS += -I../../include
|
2003-03-31 07:13:36 +00:00
|
|
|
CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include
|
|
|
|
CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
|
|
|
|
|
|
|
|
|
2003-08-16 16:55:19 +00:00
|
|
|
all: libchanh323.a
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2003-04-02 18:58:47 +00:00
|
|
|
samples:
|
|
|
|
if [ -f $(ASTETCDIR)/h323.conf ]; then \
|
|
|
|
mv -f $(ASTETCDIR)/h323.conf $(ASTETCDIR)/h323.conf.old ; \
|
|
|
|
fi ;
|
|
|
|
install h323.conf.sample $(ASTETCDIR)/h323.conf
|
|
|
|
|
2003-03-31 07:13:36 +00:00
|
|
|
|
|
|
|
ast_h323.o: ast_h323.cpp
|
2003-08-02 04:45:37 +00:00
|
|
|
g++ -g -c -o $@ $(CFLAGS) $<
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2003-08-16 16:55:19 +00:00
|
|
|
libchanh323.a: ast_h323.o
|
|
|
|
ar cr libchanh323.a ast_h323.o
|
|
|
|
|
|
|
|
chan_h323.so:
|
2003-08-02 04:45:37 +00:00
|
|
|
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
|
2003-03-31 07:13:36 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
clean:
|
2003-08-27 16:05:14 +00:00
|
|
|
rm -f *.o *.so core.* libchanh323.a
|
2003-03-31 07:13:36 +00:00
|
|
|
|
|
|
|
|