- Timestamp:
- Oct 16, 2013 9:19:08 AM (11 years ago)
- Location:
- pjproject/branches/projects/pjsua2/pjsip-apps/src/swig
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/Makefile
r4600 r4619 2 2 3 3 OUT_DIR=output 4 ifeq ($(OS),Windows_NT) 5 LIBPJSUA2_SO=$(OUT_DIR)/pjsua2.dll 6 else 4 7 LIBPJSUA2_SO=$(OUT_DIR)/libpjsua2.so 8 endif 5 9 6 10 # Get JDK location … … 20 24 ifeq ($(OS),Windows_NT) 21 25 MY_JNI_LDFLAGS = -L$(MY_JDK)/lib -Wl,--kill-at 22 MY_JNI_LIB = $( MY_PACKAGE_BIN)/pjsua.dll26 MY_JNI_LIB = $(OUT_DIR)/pjsua2.dll 23 27 else 24 MY_JNI_LDFLAGS = -L$(MY_JDK)/lib -Wl,-soname,pjsua .so25 MY_JNI_LIB = $( MY_PACKAGE_BIN)/libpjsua.so28 MY_JNI_LDFLAGS = -L$(MY_JDK)/lib -Wl,-soname,pjsua2.so 29 MY_JNI_LIB = $(OUT_DIR)/libpjsua2.so 26 30 MY_JNI_CFLAGS := -fPIC 27 31 endif … … 37 41 # Build settings 38 42 MY_CFLAGS = $(PJ_CFLAGS) $(MY_JNI_CFLAGS) 39 MY_LDFLAGS = $(PJ_LDFLAGS) $(PJ_LDLIBS) $(MY_JNI_LDFLAGS) -static-libstdc++43 MY_LDFLAGS = $(PJ_LDFLAGS) -lpjsua2-$(TARGET_NAME) $(PJ_LDLIBS) $(MY_JNI_LDFLAGS) -static-libstdc++ 40 44 41 all: $(LIBPJSUA2_SO) 45 all: $(LIBPJSUA2_SO) java 42 46 43 47 $(LIBPJSUA2_SO): $(OUT_DIR)/pjsua2_wrap.o 44 g cc -shared -Wl,-soname,libpjsua2.so $(OUT_DIR)/pjsua2_wrap.o -o $(LIBPJSUA2_SO) -lstdc++$(MY_CFLAGS) $(MY_LDFLAGS)48 g++ -shared -o $(LIBPJSUA2_SO) $(OUT_DIR)/pjsua2_wrap.o $(MY_CFLAGS) $(MY_LDFLAGS) 45 49 46 50 $(OUT_DIR)/pjsua2_wrap.o: $(OUT_DIR)/pjsua2_wrap.cpp Makefile 47 g cc -c $(OUT_DIR)/pjsua2_wrap.cpp -fPIC-o $(OUT_DIR)/pjsua2_wrap.o $(MY_CFLAGS) $(MY_LDFLAGS)51 g++ -c $(OUT_DIR)/pjsua2_wrap.cpp -o $(OUT_DIR)/pjsua2_wrap.o $(MY_CFLAGS) $(MY_LDFLAGS) 48 52 49 53 $(OUT_DIR)/pjsua2_wrap.cpp: ../pjsua2.i $(SRCS) … … 52 56 clean distclean realclean: 53 57 rm -rf $(OUT_DIR)/pjsua2_wrap.cpp $(OUT_DIR)/pjsua2_wrap.o $(LIBPJSUA2_SO) $(OUT_DIR)/*.java $(OUT_DIR)/*.class 54 ln -s ../test.java output/test.java 58 59 java: 60 $(MY_JAVAC) -d $(OUT_DIR) $(OUT_DIR)/*.java 61 $(MY_JAVAC) -d $(OUT_DIR) -classpath "$(OUT_DIR)" test.java 62 63 test: 64 @# Need to specify classpath and library path, alternatively, they can be set via 65 @# CLASSPATH and java.library.path env settings 66 $(MY_JAVA) -cp $(OUT_DIR) -Djava.library.path="$(OUT_DIR)" test -
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/test.java
r4597 r4619 7 7 public static void main(String argv[]) { 8 8 9 CredInfo cred = newCredInfo();9 AuthCredInfo cred = new AuthCredInfo(); 10 10 11 11 cred.setRealm("Hello world"); -
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python
- Property svn:ignore
-
old new 3 3 build 4 4 pjsua2_wrap.h 5 _pjsua2.pyd
-
- Property svn:ignore
-
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python/Makefile
r4597 r4619 1 1 PYTHON_SO=_pjsua2.so 2 3 PYTHON_SETUP_FLAGS = --inplace 4 ifeq ($(OS),Windows_NT) 5 PYTHON_SETUP_FLAGS += --compiler=mingw32 6 endif 2 7 3 8 .PHONY: all … … 6 11 7 12 $(PYTHON_SO): pjsua2_wrap.cpp setup.py 8 python setup.py build_ext --inplace13 python setup.py build_ext $(PYTHON_SETUP_FLAGS) 9 14 10 15 pjsua2_wrap.cpp: ../pjsua2.i $(SRCS) -
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python/helper.mak
r4597 r4619 16 16 done 17 17 18 target_name: 19 $(TARGET_NAME) 20 -
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python/setup.py
r4597 r4619 62 62 #print 'PJ_VERSION = "'+ pj_version + '"' 63 63 64 # Get targetname 65 f = os.popen("make --no-print-directory -f helper.mak target_name") 66 pj_target_name = f.read().rstrip("\r\n") 67 f.close() 64 68 65 69 # Fill in pj_inc_dirs … … 78 82 79 83 # Fill in pj_libs 80 pj_libs = ['pjsua2- x86_64-unknown-linux-gnu'] ### <--- xxxx HARDCODED xxxx84 pj_libs = ['pjsua2-' + pj_target_name] 81 85 f = os.popen("make --no-print-directory -f helper.mak libs") 82 86 for line in f: … … 84 88 f.close() 85 89 86 # Mac OS X depedencies 90 # Fill in extra link args 91 extra_link_args = ['-static-libstdc++'] 87 92 if platform.system() == 'Darwin': 88 extra_link_args = ["-framework", "CoreFoundation", 89 "-framework", "AudioToolbox"] 93 # Mac OS X depedencies 94 extra_link_args += ["-framework", "CoreFoundation", 95 "-framework", "AudioToolbox"] 90 96 # OS X Lion support 91 97 if platform.mac_ver()[0].startswith("10.7"): 92 98 extra_link_args += ["-framework", "AudioUnit"] 93 else: 94 extra_link_args = [] 99 95 100 96 101 setup(name="pjsua2", -
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python/test.py
r4597 r4619 8 8 def ua_data_test(): 9 9 # 10 # CredInfo10 # AuthCredInfo 11 11 # 12 12 print "UA data types test.." 13 13 the_realm = "pjsip.org" 14 ci = pj. CredInfo()14 ci = pj.AuthCredInfo() 15 15 ci.realm = the_realm 16 16 ci.dataType = 20 … … 58 58 assert e.status == 70013 59 59 assert e.reason == "Invalid operation (PJ_EINVALIDOP)" 60 assert e.title == "Endpoint::testException()"60 #assert e.title == "Endpoint::testException()" 61 61 assert got_exception 62 62
Note: See TracChangeset
for help on using the changeset viewer.