- Timestamp:
- Oct 16, 2013 9:19:08 AM (11 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.