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

Close #2105: Add option to specify SWIG bindings.

File:
1 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  
Note: See TracChangeset for help on using the changeset viewer.