Close #2105: Add option to specify SWIG bindings.

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@6156 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Riza Sulistyo 2020-02-04 11:14:21 +00:00
parent aa6fc15b1a
commit 4f035f338e
4 changed files with 39 additions and 23 deletions

View File

@ -2,42 +2,35 @@ include ../../../build.mak
ifneq ($(findstring android,$(TARGET_NAME)),)
# no python for android
DIRS = java csharp
LANG = java csharp
else
ifneq ($(findstring ios,$(TARGET_NAME)),)
DIRS = csharp
LANG = csharp
else
DIRS = python java
LANG = python java
endif
endif
export SWIG_FLAGS=-I../../../../pjlib/include \
-I../../../../pjlib-util/include \
-I../../../../pjmedia/include \
-I../../../../pjsip/include \
-I../../../../pjnath/include -c++
export SRC_DIR=../../../../pjsip/include
export SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp
CMD_is_java := $(findstring java, $(MAKECMDGOALS))
CMD_is_python := $(findstring python, $(MAKECMDGOALS))
CMD_is_csharp := $(findstring csharp, $(MAKECMDGOALS))
CMD_is_lang := $(or $(CMD_is_java), $(CMD_is_python), $(CMD_is_csharp))
.PHONY: all clean dep depend distclean print realclean install uninstall
.PHONY: all clean dep depend distclean print realclean install uninstall csharp java python
all: symbols.i
all clean dep depend distclean print realclean install uninstall: $(LANG)
all clean dep depend distclean print realclean install uninstall:
for dir in $(DIRS); do \
if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
true; \
else \
exit 1; \
fi; \
done
csharp:
$(MAKE) $(MAKE_FLAGS) -C csharp $@
java python csharp:
ifeq ($(CMD_is_lang),)
$(MAKE) $(MAKE_FLAGS) -C $@ $(MAKECMDGOALS)
else
$(MAKE) $(MAKE_FLAGS) -C $@
endif
symbols.i: symbols.lst
@echo warning: file symbols.i is out of date. Run 'make symbol'.
symbol symbols:
python importsym.py

View File

@ -8,6 +8,13 @@ else
OS=ios
endif
endif
SWIG_FLAGS=-I../../../../pjlib/include \
-I../../../../pjlib-util/include \
-I../../../../pjmedia/include \
-I../../../../pjsip/include \
-I../../../../pjnath/include -c++
SRC_DIR=../../../../pjsip/include
SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp
SWIG_FLAGS += -w312

View File

@ -1,6 +1,14 @@
include ../../../../build.mak
include ../../../../build/common.mak
SWIG_FLAGS=-I../../../../pjlib/include \
-I../../../../pjlib-util/include \
-I../../../../pjmedia/include \
-I../../../../pjsip/include \
-I../../../../pjnath/include -c++
SRC_DIR=../../../../pjsip/include
SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp
ifneq ($(findstring android,$(TARGET_NAME)),)
OS=android
ifeq ("$(JAVA_HOME)","")

View File

@ -18,6 +18,14 @@ else
GCC_EXE=
endif
SWIG_FLAGS=-I../../../../pjlib/include \
-I../../../../pjlib-util/include \
-I../../../../pjmedia/include \
-I../../../../pjsip/include \
-I../../../../pjnath/include -c++
SRC_DIR=../../../../pjsip/include
SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp
#USE_THREADS = -threads -DSWIG_NO_EXPORT_ITERATOR_METHODS
SWIG_FLAGS += -w312 $(USE_THREADS)