Changeset 4600
- Timestamp:
- Sep 23, 2013 11:49:59 AM (11 years ago)
- Location:
- pjproject/branches/projects/pjsua2/pjsip-apps/src/swig
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/Makefile
r4597 r4600 2 2 3 3 OUT_DIR=output 4 JAVA_SO=$(OUT_DIR)/libpjsua2.so4 LIBPJSUA2_SO=$(OUT_DIR)/libpjsua2.so 5 5 6 JDK=/usr/lib/jvm/java-6-sun 6 # Get JDK location 7 ifeq ("$(JAVA_HOME)","") 8 # Get javac location to determine JDK location 9 JAVAC_PATH = $(shell which javac) 10 ifeq ("$(JAVAC_PATH)","") 11 $(error Cannot determine JDK location using 'which' command. Please define JAVA_HOME envvar) 12 endif 7 13 8 all: $(JAVA_SO) 14 JAVAC_PATH := $(realpath $(JAVAC_PATH)) 15 JAVA_BIN := $(dir $(JAVAC_PATH)) 16 JAVA_HOME := $(patsubst %/bin/,%,$(JAVA_BIN)) 17 endif 9 18 10 $(JAVA_SO): $(OUT_DIR)/pjsua2_wrap.o 11 gcc -shared -Wl,-soname,libpjsua2.so $(OUT_DIR)/pjsua2_wrap.o -o $(JAVA_SO) -lstdc++ $(APP_LDFLAGS) 19 # OS specific 20 ifeq ($(OS),Windows_NT) 21 MY_JNI_LDFLAGS = -L$(MY_JDK)/lib -Wl,--kill-at 22 MY_JNI_LIB = $(MY_PACKAGE_BIN)/pjsua.dll 23 else 24 MY_JNI_LDFLAGS = -L$(MY_JDK)/lib -Wl,-soname,pjsua.so 25 MY_JNI_LIB = $(MY_PACKAGE_BIN)/libpjsua.so 26 MY_JNI_CFLAGS := -fPIC 27 endif 28 29 # Env settings, e.g: path to SWIG, JDK, java(.exe), javac(.exe) 30 MY_SWIG = swig 31 MY_JDK = $(JAVA_HOME) 32 MY_JAVA = $(MY_JDK)/bin/java 33 MY_JAVAC = $(MY_JDK)/bin/javac 34 MY_JNI_CFLAGS := $(MY_JNI_CFLAGS) -I$(MY_JDK)/include -I$(MY_JDK)/include/win32 \ 35 -I$(MY_JDK)/include/linux -I. 36 37 # Build settings 38 MY_CFLAGS = $(PJ_CFLAGS) $(MY_JNI_CFLAGS) 39 MY_LDFLAGS = $(PJ_LDFLAGS) $(PJ_LDLIBS) $(MY_JNI_LDFLAGS) -static-libstdc++ 40 41 all: $(LIBPJSUA2_SO) 42 43 $(LIBPJSUA2_SO): $(OUT_DIR)/pjsua2_wrap.o 44 gcc -shared -Wl,-soname,libpjsua2.so $(OUT_DIR)/pjsua2_wrap.o -o $(LIBPJSUA2_SO) -lstdc++ $(MY_CFLAGS) $(MY_LDFLAGS) 12 45 13 46 $(OUT_DIR)/pjsua2_wrap.o: $(OUT_DIR)/pjsua2_wrap.cpp Makefile 14 gcc -c $(OUT_DIR)/pjsua2_wrap.cpp -fPIC -o $(OUT_DIR)/pjsua2_wrap.o -I$(JDK)/include -I$(JDK)/include/linux $(APP_CFLAGS)47 gcc -c $(OUT_DIR)/pjsua2_wrap.cpp -fPIC -o $(OUT_DIR)/pjsua2_wrap.o $(MY_CFLAGS) $(MY_LDFLAGS) 15 48 16 49 $(OUT_DIR)/pjsua2_wrap.cpp: ../pjsua2.i $(SRCS) … … 18 51 19 52 clean distclean realclean: 20 rm -rf $(OUT_DIR)/pjsua2_wrap.cpp $(OUT_DIR)/pjsua2_wrap.o $( JAVA_SO) $(OUT_DIR)/*.java $(OUT_DIR)/*.class53 rm -rf $(OUT_DIR)/pjsua2_wrap.cpp $(OUT_DIR)/pjsua2_wrap.o $(LIBPJSUA2_SO) $(OUT_DIR)/*.java $(OUT_DIR)/*.class 21 54 ln -s ../test.java output/test.java -
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/pjsua2.i
r4597 r4600 12 12 #include "pjsua2/endpoint.hpp" 13 13 using namespace std; 14 using namespace pj; 14 15 %} 15 16 … … 42 43 #define PJ_DECL(type) type 43 44 #define PJ_INLINE(type) type 45 #define PJ_DECL_DATA(type) extern type 44 46 45 47 // -
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python
-
Property
svn:ignore
set to
pjsua2.py
pjsua2_wrap.cpp
build
pjsua2_wrap.h
-
Property
svn:ignore
set to
Note: See TracChangeset
for help on using the changeset viewer.