Changeset 6156


Ignore:
Timestamp:
Feb 4, 2020 11:14:21 AM (5 years ago)
Author:
riza
Message:

Close #2105: Add option to specify SWIG bindings.

Location:
pjproject/trunk/pjsip-apps/src/swig
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/Makefile

    r5776 r6156  
    33ifneq ($(findstring android,$(TARGET_NAME)),) 
    44    # no python for android 
    5     DIRS = java csharp 
     5    LANG = java csharp 
    66else 
    77    ifneq ($(findstring ios,$(TARGET_NAME)),) 
    8         DIRS = csharp 
     8        LANG = csharp 
    99    else 
    10         DIRS = python java 
     10        LANG = python java 
    1111    endif 
    1212endif 
    1313 
    14 export SWIG_FLAGS=-I../../../../pjlib/include \ 
    15                    -I../../../../pjlib-util/include \ 
    16                    -I../../../../pjmedia/include \ 
    17                    -I../../../../pjsip/include \ 
    18                    -I../../../../pjnath/include -c++  
    19 export SRC_DIR=../../../../pjsip/include 
    20 export SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp 
     14CMD_is_java := $(findstring java, $(MAKECMDGOALS)) 
     15CMD_is_python := $(findstring python, $(MAKECMDGOALS)) 
     16CMD_is_csharp := $(findstring csharp, $(MAKECMDGOALS)) 
     17CMD_is_lang := $(or $(CMD_is_java), $(CMD_is_python), $(CMD_is_csharp)) 
    2118 
    22 .PHONY: all clean dep depend distclean print realclean install uninstall 
     19.PHONY: all clean dep depend distclean print realclean install uninstall csharp java python 
    2320 
    2421all: symbols.i 
     22         
     23all clean dep depend distclean print realclean install uninstall: $(LANG) 
    2524 
    26 all clean dep depend distclean print realclean install uninstall: 
    27         for dir in $(DIRS); do \ 
    28                 if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \ 
    29                     true; \ 
    30                 else \ 
    31                     exit 1; \ 
    32                 fi; \ 
    33         done 
    34  
    35 csharp: 
    36         $(MAKE) $(MAKE_FLAGS) -C csharp $@ 
     25java python csharp: 
     26ifeq ($(CMD_is_lang),) 
     27        $(MAKE) $(MAKE_FLAGS) -C $@ $(MAKECMDGOALS) 
     28else 
     29        $(MAKE) $(MAKE_FLAGS) -C $@ 
     30endif 
    3731 
    3832symbols.i: symbols.lst 
     
    4135symbol symbols: 
    4236        python importsym.py 
    43  
  • pjproject/trunk/pjsip-apps/src/swig/csharp/Makefile

    r5735 r6156  
    99    endif 
    1010endif 
     11SWIG_FLAGS=-I../../../../pjlib/include \ 
     12                   -I../../../../pjlib-util/include \ 
     13                   -I../../../../pjmedia/include \ 
     14                   -I../../../../pjsip/include \ 
     15                   -I../../../../pjnath/include -c++  
     16SRC_DIR=../../../../pjsip/include 
     17SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp 
    1118 
    1219SWIG_FLAGS += -w312 
  • pjproject/trunk/pjsip-apps/src/swig/java/Makefile

    r6120 r6156  
    11include ../../../../build.mak 
    22include ../../../../build/common.mak 
     3 
     4SWIG_FLAGS=-I../../../../pjlib/include \ 
     5                   -I../../../../pjlib-util/include \ 
     6                   -I../../../../pjmedia/include \ 
     7                   -I../../../../pjsip/include \ 
     8                   -I../../../../pjnath/include -c++  
     9SRC_DIR=../../../../pjsip/include 
     10SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp 
    311 
    412ifneq ($(findstring android,$(TARGET_NAME)),) 
  • pjproject/trunk/pjsip-apps/src/swig/python/Makefile

    r6152 r6156  
    1818  GCC_EXE= 
    1919endif 
     20 
     21SWIG_FLAGS=-I../../../../pjlib/include \ 
     22                   -I../../../../pjlib-util/include \ 
     23                   -I../../../../pjmedia/include \ 
     24                   -I../../../../pjsip/include \ 
     25                   -I../../../../pjnath/include -c++  
     26SRC_DIR=../../../../pjsip/include 
     27SRCS=$(SRC_DIR)/pjsua2/endpoint.hpp $(SRC_DIR)/pjsua2/types.hpp 
    2028 
    2129#USE_THREADS = -threads -DSWIG_NO_EXPORT_ITERATOR_METHODS 
Note: See TracChangeset for help on using the changeset viewer.