Changeset 4744


Ignore:
Timestamp:
Feb 14, 2014 9:09:11 AM (11 years ago)
Author:
nanang
Message:

More pjsua2 API (re #1519): added simple tool to check and remove-if-necessary deprecated gcc option '-mno-cygwin' in building pjsua2 python binding on MinGW.

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

Legend:

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

    • Property svn:ignore
      •  

        old new  
        44pjsua2_wrap.h 
        55_pjsua2.pyd 
         6*.exe 
  • pjproject/trunk/pjsip-apps/src/swig/python/Makefile

    r4704 r4744  
    44ifeq ($(OS),Windows_NT) 
    55  PYTHON_SETUP_FLAGS += --compiler=mingw32 
     6  GCC_EXE=gcc.exe 
     7else 
     8  GCC_EXE= 
    69endif 
    710 
     
    1215all: $(PYTHON_SO) 
    1316 
    14 $(PYTHON_SO): pjsua2_wrap.cpp setup.py 
     17$(PYTHON_SO): pjsua2_wrap.cpp setup.py $(GCC_EXE) 
    1518        python setup.py build $(PYTHON_SETUP_FLAGS) 
     19 
     20gcc.exe: cc_mingw.c 
     21        gcc -o gcc.exe cc_mingw.c 
     22        cp gcc.exe g++.exe 
    1623 
    1724pjsua2_wrap.cpp: ../pjsua2.i ../symbols.i Makefile $(SRCS) 
     
    2027clean distclean realclean: 
    2128        rm -rf $(PYTHON_SO) pjsua2_wrap.cpp pjsua2_wrap.h pjsua2.py build *.pyc 
     29        rm -f gcc.exe g++.exe 
    2230 
    2331install: 
  • pjproject/trunk/pjsip-apps/src/swig/python/helper.mak

    r4704 r4744  
    33lib_dir: 
    44        @for token in `echo $(APP_LDFLAGS)`; do \ 
    5                 echo $$token | grep L | sed 's/-L//'; \ 
     5                echo $$token | grep \\-L | sed 's/-L//'; \ 
    66        done 
    77 
    88inc_dir: 
    99        @for token in `echo $(APP_CFLAGS)`; do \ 
    10                 echo $$token | grep I | sed 's/-I//'; \ 
     10                echo $$token | grep \\-I | sed 's/-I//'; \ 
    1111        done 
    1212 
  • pjproject/trunk/pjsip-apps/src/swig/python/setup.py

    r4741 r4744  
    9999        extra_link_args += ["-framework", "AudioUnit"] 
    100100 
     101# MinGW specific action: put current working dir to PATH, so Python distutils 
     102# will invoke our dummy gcc/g++ instead, which is in the current working dir. 
     103if platform.system()=='Windows' and os.environ["MSYSTEM"].find('MINGW')!=-1: 
     104    os.environ["PATH"] = "." + os.pathsep + os.environ["PATH"] 
    101105 
    102106setup(name="pjsua2",  
Note: See TracChangeset for help on using the changeset viewer.