Changeset 4600 for pjproject


Ignore:
Timestamp:
Sep 23, 2013 11:49:59 AM (11 years ago)
Author:
bennylp
Message:

More re #1519: fixed build errors and added svn ignore for output files in java and python dirs

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  
    22 
    33OUT_DIR=output 
    4 JAVA_SO=$(OUT_DIR)/libpjsua2.so 
     4LIBPJSUA2_SO=$(OUT_DIR)/libpjsua2.so 
    55 
    6 JDK=/usr/lib/jvm/java-6-sun 
     6# Get JDK location 
     7ifeq ("$(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 
    713 
    8 all: $(JAVA_SO) 
     14  JAVAC_PATH := $(realpath $(JAVAC_PATH)) 
     15  JAVA_BIN := $(dir $(JAVAC_PATH)) 
     16  JAVA_HOME := $(patsubst %/bin/,%,$(JAVA_BIN)) 
     17endif 
    918 
    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 
     20ifeq ($(OS),Windows_NT) 
     21MY_JNI_LDFLAGS   = -L$(MY_JDK)/lib -Wl,--kill-at 
     22MY_JNI_LIB       = $(MY_PACKAGE_BIN)/pjsua.dll 
     23else 
     24MY_JNI_LDFLAGS   = -L$(MY_JDK)/lib -Wl,-soname,pjsua.so 
     25MY_JNI_LIB       = $(MY_PACKAGE_BIN)/libpjsua.so 
     26MY_JNI_CFLAGS    := -fPIC 
     27endif 
     28 
     29# Env settings, e.g: path to SWIG, JDK, java(.exe), javac(.exe) 
     30MY_SWIG          = swig 
     31MY_JDK           = $(JAVA_HOME) 
     32MY_JAVA          = $(MY_JDK)/bin/java 
     33MY_JAVAC         = $(MY_JDK)/bin/javac 
     34MY_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 
     38MY_CFLAGS        = $(PJ_CFLAGS) $(MY_JNI_CFLAGS) 
     39MY_LDFLAGS       = $(PJ_LDFLAGS) $(PJ_LDLIBS) $(MY_JNI_LDFLAGS) -static-libstdc++ 
     40 
     41all: $(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) 
    1245 
    1346$(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) 
    1548 
    1649$(OUT_DIR)/pjsua2_wrap.cpp: ../pjsua2.i $(SRCS) 
     
    1851 
    1952clean distclean realclean: 
    20         rm -rf $(OUT_DIR)/pjsua2_wrap.cpp $(OUT_DIR)/pjsua2_wrap.o $(JAVA_SO) $(OUT_DIR)/*.java $(OUT_DIR)/*.class 
     53        rm -rf $(OUT_DIR)/pjsua2_wrap.cpp $(OUT_DIR)/pjsua2_wrap.o $(LIBPJSUA2_SO) $(OUT_DIR)/*.java $(OUT_DIR)/*.class 
    2154        ln -s ../test.java output/test.java 
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/pjsua2.i

    r4597 r4600  
    1212#include "pjsua2/endpoint.hpp" 
    1313using namespace std; 
     14using namespace pj; 
    1415%} 
    1516 
     
    4243#define PJ_DECL(type)           type 
    4344#define PJ_INLINE(type)         type 
     45#define PJ_DECL_DATA(type)      extern type 
    4446 
    4547// 
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/python

    • Property svn:ignore set to
      pjsua2.py
      pjsua2_wrap.cpp
      build
      pjsua2_wrap.h
Note: See TracChangeset for help on using the changeset viewer.