Merge branch 'master' of github.com:vscosta/yap-6.3
This commit is contained in:
commit
e1fc397cc1
@ -379,7 +379,7 @@ YAPPredicate::YAPPredicate(const char *s, Term **outp, term_t &vnames) throw (in
|
|||||||
vnames = Yap_NewSlots(1 PASS_REGS);
|
vnames = Yap_NewSlots(1 PASS_REGS);
|
||||||
Term t = Yap_StringToTerm(s, strlen(s)+1, vnames);
|
Term t = Yap_StringToTerm(s, strlen(s)+1, vnames);
|
||||||
if (t == 0L)
|
if (t == 0L)
|
||||||
throw SYNTAX_ERROR;
|
throw YAPError::YAP_SYNTAX_ERROR;
|
||||||
ap = getPred( t, outp );
|
ap = getPred( t, outp );
|
||||||
//{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "OUT vnames=%d ap=%p LCL0=%p", vnames, ap, LCL0) ; }
|
//{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "OUT vnames=%d ap=%p LCL0=%p", vnames, ap, LCL0) ; }
|
||||||
}
|
}
|
||||||
@ -575,7 +575,6 @@ displayWithJava(int c)
|
|||||||
Yap_AndroidBufp[Yap_AndroidSz] = '\0';
|
Yap_AndroidBufp[Yap_AndroidSz] = '\0';
|
||||||
if (c == '\n' ) {
|
if (c == '\n' ) {
|
||||||
Yap_AndroidBufp[Yap_AndroidSz] = '\0';
|
Yap_AndroidBufp[Yap_AndroidSz] = '\0';
|
||||||
__android_log_print(ANDROID_LOG_INFO, __FUNCTION__, "after char %c:%s %p",c, Yap_AndroidBufp, curren);
|
|
||||||
curren->run(Yap_AndroidBufp);
|
curren->run(Yap_AndroidBufp);
|
||||||
Yap_AndroidSz = 0;
|
Yap_AndroidSz = 0;
|
||||||
}
|
}
|
||||||
@ -636,8 +635,8 @@ YAPQuery *YAPEngine::safeQuery( char *s ) {
|
|||||||
n->resetFlag( PL_Q_PASS_EXCEPTION );
|
n->resetFlag( PL_Q_PASS_EXCEPTION );
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
catch (yap_error_number errno) {
|
catch (YAPError yerr) {
|
||||||
error = errno;
|
yerror = yerr;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
CXX/yapi.hh
12
CXX/yapi.hh
@ -59,6 +59,8 @@ extern "C" {
|
|||||||
|
|
||||||
#include "YapText.h"
|
#include "YapText.h"
|
||||||
|
|
||||||
|
#include "yapie.hh"
|
||||||
|
|
||||||
#if HAVE_STDARG_H
|
#if HAVE_STDARG_H
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#endif
|
#endif
|
||||||
@ -421,7 +423,7 @@ public:
|
|||||||
Term t, tp;
|
Term t, tp;
|
||||||
t = YAP_ReadBuffer(s,&tp);
|
t = YAP_ReadBuffer(s,&tp);
|
||||||
if (t == 0L)
|
if (t == 0L)
|
||||||
throw SYNTAX_ERROR;
|
throw YAPError::YAP_SYNTAX_ERROR;
|
||||||
ap = getPred( t, (Term **)NULL );
|
ap = getPred( t, (Term **)NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,7 +435,7 @@ public:
|
|||||||
Term t, tp;
|
Term t, tp;
|
||||||
t = YAP_ReadBuffer(s,&tp);
|
t = YAP_ReadBuffer(s,&tp);
|
||||||
if (t == 0L)
|
if (t == 0L)
|
||||||
throw SYNTAX_ERROR;
|
throw YAPError::YAP_SYNTAX_ERROR;
|
||||||
ap = getPred( t, (Term **)NULL );
|
ap = getPred( t, (Term **)NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,7 +553,7 @@ class YAPEngine {
|
|||||||
private:
|
private:
|
||||||
YAPCallback *_callback;
|
YAPCallback *_callback;
|
||||||
YAP_init_args init_args;
|
YAP_init_args init_args;
|
||||||
yap_error_number error;
|
YAPError yerror;
|
||||||
public:
|
public:
|
||||||
YAPEngine(char *savedState = (char *)NULL,
|
YAPEngine(char *savedState = (char *)NULL,
|
||||||
size_t stackSize = 0,
|
size_t stackSize = 0,
|
||||||
@ -575,12 +577,12 @@ public:
|
|||||||
void run() { if (_callback) _callback->run(); }
|
void run() { if (_callback) _callback->run(); }
|
||||||
/// execute the callback with a text argument.
|
/// execute the callback with a text argument.
|
||||||
void run( char *s) { if (_callback) _callback->run(s); }
|
void run( char *s) { if (_callback) _callback->run(s); }
|
||||||
|
/// execute the callback with a text argument.
|
||||||
|
YAPError hasError( ) { return yerror; }
|
||||||
/// build a query on the engine
|
/// build a query on the engine
|
||||||
YAPQuery *query( char *s );
|
YAPQuery *query( char *s );
|
||||||
/// build a query on the engine handling exceptions
|
/// build a query on the engine handling exceptions
|
||||||
YAPQuery *safeQuery( char *s );
|
YAPQuery *safeQuery( char *s );
|
||||||
|
|
||||||
yap_error_number hasError( ); //> report whether the engine has found an error
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
32
CXX/yapie.hh
32
CXX/yapie.hh
@ -10,27 +10,15 @@ class YAPPredicate;
|
|||||||
|
|
||||||
class YAPError {
|
class YAPError {
|
||||||
public:
|
public:
|
||||||
static const int SYNTAX_ERROR = 0x10000; //> syntax error
|
static const int YAP_SYNTAX_ERROR = 0x10000; //> syntax error
|
||||||
static const int DOMAIN_ERROR = 0x20000; //> usually illegal parameter, like asin( 2 )
|
static const int YAP_DOMAIN_ERROR = 0x20000; //> usually illegal parameter, like asin( 2 )
|
||||||
static const int TYPE_ERROR = 0x40000; //> usually illegal parameter in the language, like ( 2 mod 3.0 )
|
static const int YAP_TYPE_ERROR = 0x40000; //> usually illegal parameter in the language, like ( 2 mod 3.0 )
|
||||||
static const int PERMISSION_ERROR = 0x80000; //> wrong para,eter
|
static const int YAP_PERMISSION_ERROR = 0x80000; //> wrong para,eter
|
||||||
static const int EVALUATION_ERROR = 0x100000; //> bad arithmetic expressions
|
static const int YAP_EVALUATION_ERROR = 0x100000; //> bad arithmetic expressions
|
||||||
static const int RESOURCE_ERROR = 0x200000; //> no resource available, like MEM
|
static const int YAP_RESOURCE_ERROR = 0x200000; //> no resource available, like MEM
|
||||||
static const int REPRESENTATION_ERROR = 0x400000; //> bad UTF-8 strings, etc
|
static const int YAP_REPRESENTATION_ERROR = 0x400000; //> bad UTF-8 strings, etc
|
||||||
static const int EXISTËNCE_ERROR = 0x400000; //> object not found
|
static const int YAP_EXISTENCE_ERROR = 0x800000; //> object not found
|
||||||
static const int PROFILER = 0x400000; //> improve profiling support.
|
static const int YAP_PROFILER = 0x100000; //> improve profiling support.
|
||||||
static const int OTHER_ERROR = 0x800000; //> anything rldr.,,,,,,,,,,,,,,,,,,,,
|
static const int YAP_OTHER_ERROR = 0x2000000; //> anything
|
||||||
};
|
|
||||||
|
|
||||||
class YAPErrorClass {
|
|
||||||
public:
|
|
||||||
static const int SYNTAX_ERROR = 0x10000;
|
|
||||||
static const int DOMAIN_ERROR = 0x20000;
|
|
||||||
static const int TYPE_ERROR = 0x40000;
|
|
||||||
static const int PERMISSION_ERROR = 0x80000;
|
|
||||||
static const int EVALUATION_ERROR = 0x100000;
|
|
||||||
static const int RESOURCE_ERROR = 0x200000;
|
|
||||||
static const int REPRESENTATION_ERROR = 0x400000;
|
|
||||||
static const int OTHER_ERROR = 0x800000;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
12
Makefile.in
12
Makefile.in
@ -563,13 +563,11 @@ INSTALLED_PACKAGES= \
|
|||||||
@PKG_PRISM@ \
|
@PKG_PRISM@ \
|
||||||
@PKG_PYTHON@ \
|
@PKG_PYTHON@ \
|
||||||
@PKG_RAPTOR@ \
|
@PKG_RAPTOR@ \
|
||||||
@PKG_CHR@ \
|
|
||||||
@PKG_CLIB@ \
|
@PKG_CLIB@ \
|
||||||
|
@PKG_CHR@ \
|
||||||
@PKG_JPL@ \
|
@PKG_JPL@ \
|
||||||
@PKG_LIBARCHIVE@ \
|
@PKG_LIBARCHIVE@ \
|
||||||
@PKG_LTX2HTM@ \
|
|
||||||
@PKG_ODBC@ \
|
@PKG_ODBC@ \
|
||||||
\
|
|
||||||
@PKG_PLUNIT@ \
|
@PKG_PLUNIT@ \
|
||||||
@PKG_REAL@ \
|
@PKG_REAL@ \
|
||||||
@PKG_RDF@ \
|
@PKG_RDF@ \
|
||||||
@ -577,7 +575,7 @@ INSTALLED_PACKAGES= \
|
|||||||
@PKG_SGML@ \
|
@PKG_SGML@ \
|
||||||
@PKG_SWIG@ \
|
@PKG_SWIG@ \
|
||||||
@PKG_WINCONSOLE@ \
|
@PKG_WINCONSOLE@ \
|
||||||
@PKG_ZLIB@ # @PKG_PLDOC@
|
@PKG_ZLIB@
|
||||||
|
|
||||||
PACKAGES= \
|
PACKAGES= \
|
||||||
library \
|
library \
|
||||||
@ -603,7 +601,7 @@ yap-win: yap-win@EXEC_SUFFIX@
|
|||||||
yapwin: yap-win@EXEC_SUFFIX@
|
yapwin: yap-win@EXEC_SUFFIX@
|
||||||
|
|
||||||
yap-win@EXEC_SUFFIX@: $(PLCONS_OBJECTS) $(HEADERS) @YAPLIB@
|
yap-win@EXEC_SUFFIX@: $(PLCONS_OBJECTS) $(HEADERS) @YAPLIB@
|
||||||
(cd swi/console; $(MAKE))
|
$(MAKE) -C swi/console
|
||||||
$(MPI_CC) -municode -DUNICODE -D_UNICODE $(EXECUTABLE_CFLAGS) $(LDFLAGS) -Wl,-subsystem,windows -o yap-win@EXEC_SUFFIX@ $(PLCONS_OBJECTS) plterm.dll @YAPLIB@ $(LIBS) -lgdi32 @MPILDF@
|
$(MPI_CC) -municode -DUNICODE -D_UNICODE $(EXECUTABLE_CFLAGS) $(LDFLAGS) -Wl,-subsystem,windows -o yap-win@EXEC_SUFFIX@ $(PLCONS_OBJECTS) plterm.dll @YAPLIB@ $(LIBS) -lgdi32 @MPILDF@
|
||||||
|
|
||||||
libYap.a: $(LIB_OBJECTS) yapi.o
|
libYap.a: $(LIB_OBJECTS) yapi.o
|
||||||
@ -710,7 +708,7 @@ depend: $(HEADERS) $(C_SOURCES)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
clean: clean_docs clean_local
|
clean: clean_docs clean_local
|
||||||
for f in $(PACKAGES); do ( cd $$f ; $(MAKE) clean ); done
|
for f in $(PACKAGES); do ( $(MAKE) -C $$f clean ); done
|
||||||
|
|
||||||
clean_local:
|
clean_local:
|
||||||
rm -f *.o *~ *.BAK *.a
|
rm -f *.o *~ *.BAK *.a
|
||||||
@ -810,7 +808,7 @@ distclean_docs: clean_docs
|
|||||||
rm -f yap.ps yap.html yap_toc.html yap.pdf yap.info*
|
rm -f yap.ps yap.html yap_toc.html yap.pdf yap.info*
|
||||||
|
|
||||||
installcheck:
|
installcheck:
|
||||||
(cd packages/cplint; $(MAKE) installcheck)
|
$(MAKE) -C packages/cplint installcheck
|
||||||
|
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
115
misc/mkandroid
115
misc/mkandroid
@ -1,42 +1,105 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# script to compile yap for Android.
|
# script to compile yap for Android.
|
||||||
|
#
|
||||||
|
# variables are
|
||||||
|
#
|
||||||
|
# SDK_ROOT: where is the SDK
|
||||||
|
# NDK_ROOT: and the NDK
|
||||||
|
# GMPDIR: get your copy of GMP from
|
||||||
|
# BUILDDROID: where we want to compile yap
|
||||||
|
|
||||||
if test -d $HOME/Yap/android-sdk-linux
|
|
||||||
|
# ANDROID_RELEASE= 17 is 4.2.2, 19 is 4.4.2
|
||||||
|
ANDROID_RELEASE=19
|
||||||
|
# ANDROID_ARCH= arm, x86, mips
|
||||||
|
ANDROID_ARCH=arm
|
||||||
|
# ANDROID_BUILD=linux
|
||||||
|
ANDROID_BUILD=linux
|
||||||
|
|
||||||
|
# what android to compile for
|
||||||
|
ANDROID_IMAGE=first
|
||||||
|
|
||||||
|
# YAP_SRC="$HOME/Yap/yap-6.3"
|
||||||
|
if test -d "$HOME/git/yap-6.3"
|
||||||
then
|
then
|
||||||
export SDK_ROOT=$HOME/Yap/android-sdk-linux
|
export YAP_SRC="$HOME/git/yap-6.3"
|
||||||
elif test -d $HOME/Yap/android-sdk-macosx
|
elif test -d "$HOME/Yap/yap-6.3"
|
||||||
then
|
then
|
||||||
export SDK_ROOT=$HOME/Yap/android-sdk-macosx
|
export YAP_SRC="$HOME/Yap/yap-6.3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export NDK_ROOT=$HOME/Yap/android-ndk-r9d
|
# check if the SDK is at the usual locations
|
||||||
|
|
||||||
export GMPDIR=$HOME/Yap/gmp-android
|
if test -d $HOME/Yap/android-sdk-"$ANDROID_BUILD"
|
||||||
|
then
|
||||||
|
export SDK_ROOT=$HOME/Yap/android-sdk-"$ANDROID_BUILD"
|
||||||
|
else
|
||||||
|
export SDK_ROOT=/scratch/vitor/android-sdk-"$ANDROID_BUILD"
|
||||||
|
fi
|
||||||
|
|
||||||
export ANDROID_NDK_ROOT="$NDK_ROOT"/
|
# check if the NDK is at the usual locations
|
||||||
export ANDROID_SYSROOT="$NDK_ROOT"/platforms/android-17/arch-arm
|
if test -d $HOME/Yap/android-ndk-r9d
|
||||||
|
then
|
||||||
|
export NDK_ROOT=$HOME/Yap/android-ndk-r9d
|
||||||
|
elif test -d /scratch/vitor/android-ndk-r9d
|
||||||
|
then
|
||||||
|
export NDK_ROOT=/scratch/vitor/android-ndk-r9d
|
||||||
|
fi
|
||||||
|
|
||||||
|
# fetch GMP from https://github.com/Rupan/gmp,
|
||||||
|
# or compile it.
|
||||||
|
if test -d /scratch
|
||||||
|
then
|
||||||
|
export GMPDIR=/scratch/vitor/gmp-android
|
||||||
|
else
|
||||||
|
export GMPDIR="$HOME"/Yap/gmp-android
|
||||||
|
fi
|
||||||
|
|
||||||
|
#where I want to compile
|
||||||
|
#export BUILDTOOLCHAIN="$HOME/Yap/my-android-toolchain"
|
||||||
|
if test -d /scratch
|
||||||
|
then
|
||||||
|
export BUILDTOOLCHAIN="/scratch/vitor/my-android-toolchain"
|
||||||
|
export BUILDDROID="/scratch/vitor/yap-android"
|
||||||
|
else
|
||||||
|
export BUILDTOOLCHAIN="$HOME/Yap/my-android-toolchain"
|
||||||
|
export BUILDDROID="$HOME/Yap/bins/android"
|
||||||
|
fi
|
||||||
|
|
||||||
# which platform to compile for
|
|
||||||
ANDROID_PLATFORM=android-17
|
|
||||||
# which gcc to use
|
# which gcc to use
|
||||||
GCC_VERSION=4.8
|
GCC_VERSION=4.8
|
||||||
# which disk
|
|
||||||
IMAGE=first
|
|
||||||
|
|
||||||
if test -d $HOME/Yap/my-android-toolchain
|
#========================================================
|
||||||
|
# should be fine
|
||||||
|
#========================================================
|
||||||
|
|
||||||
|
export ANDROID_NDK_ROOT="$NDK_ROOT"/
|
||||||
|
export ANDROID_SYSROOT="$NDK_ROOT"/platforms/android-"$ANDROID_RELEASE"/arch-"$ANDROID_ARCH"
|
||||||
|
|
||||||
|
# which platform to compile for
|
||||||
|
ANDROID_PLATFORM=android-"$ANDROID_RELEASE"
|
||||||
|
# which disk
|
||||||
|
IMAGE="$ANDROID_IMAGE"
|
||||||
|
|
||||||
|
export PATH="$BUILDTOOLCHAIN"/bin:"$NDK_ROOT":"$SDK_ROOT/tools":"$SDK_ROOT/platform-tools":$PATH
|
||||||
|
|
||||||
|
echo $PATH
|
||||||
|
|
||||||
|
if test -d "$BUILDTOOLCHAIN"
|
||||||
then
|
then
|
||||||
echo using the setup at $HOME/Yap/my-android-toolchain
|
echo using the setup at "$BUILDTOOLCHAIN"
|
||||||
else
|
else
|
||||||
"$NDK_ROOT"/build/tools/make-standalone-toolchain.sh \
|
"$NDK_ROOT"/build/tools/make-standalone-toolchain.sh \
|
||||||
--platform="$ANDROID_PLATFORM" \
|
--platform="$ANDROID_PLATFORM" \
|
||||||
--toolchain=arm-linux-androideabi-"$GCC_VERSION" \
|
--toolchain="$ANDROID_ARCH"-"$ANDROID_BUILD"-androideabi-"$GCC_VERSION" \
|
||||||
--install-dir="$HOME"/Yap/my-android-toolchain
|
--install-dir="$BUILDTOOLCHAIN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH="$HOME"/Yap/my-android-toolchain/bin:"$NDK_ROOT":"$SDK_ROOT/tools":"$SDK_ROOT/platform-tools":$PATH
|
|
||||||
|
|
||||||
cd ~/Yap/bins/android
|
mkdir -p $BUILDDROID
|
||||||
|
|
||||||
|
cd $BUILDDROID
|
||||||
|
|
||||||
if test x$1 = xmake
|
if test x$1 = xmake
|
||||||
then
|
then
|
||||||
@ -48,18 +111,22 @@ then
|
|||||||
elif test x$1 = xeclipse
|
elif test x$1 = xeclipse
|
||||||
then
|
then
|
||||||
emulator -avd $IMAGE &
|
emulator -avd $IMAGE &
|
||||||
~/eclipse/eclipse &
|
"$ECLIPSE"eclipse &
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
emulator -avd $IMAGE &
|
EMS=`ps -ef | grep emulator64| grep -v grep`
|
||||||
rm -rf ~/Yap/bins/android/*
|
if test x"$EMS" = x
|
||||||
cd ~/Yap/bins/android
|
then
|
||||||
~/git/yap-6.3/configure --host=arm-linux-androideabi --prefix=`pwd` --enable-low-level-tracer --enable-debug-yap --enable-dynamic-loading --with-swig --with-gmp=$GMPDIR --disable-chr #--enable-threads
|
emulator -avd $IMAGE &
|
||||||
|
fi
|
||||||
|
rm -rf "$BUILDDROID"/*
|
||||||
|
cd "$BUILDDROID"
|
||||||
|
"$YAP_SRC"/configure --host="$ANDROID_ARCH"-"$ANDROID_BUILD"-androideabi --prefix=`pwd` --enable-low-level-tracer --enable-debug-yap --enable-dynamic-loading --with-swig --with-gmp=$GMPDIR --disable-chr #--enable-threads
|
||||||
make depend
|
make depend
|
||||||
make -j install
|
make -j install
|
||||||
fi
|
fi
|
||||||
cd packages/swig
|
cd packages/swig
|
||||||
mkdir -p $ANDROID_NDK_ROOT/build/core/lib
|
mkdir -p "$ANDROID_NDK_ROOT"/build/core/lib
|
||||||
make android
|
make android
|
||||||
make install-android
|
make install-android
|
||||||
adb uninstall pt.up.fc.dcc.yap
|
adb uninstall pt.up.fc.dcc.yap
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 911ad4d6f1cf58828dc755621c7f1e6072073a6d
|
Subproject commit 3637c14d2f0bcb2113e28de5aa0cae25a55dcca8
|
@ -6,7 +6,7 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_LDLIBS := -landroid -llog
|
LOCAL_LDLIBS := -landroid -llog
|
||||||
LOCAL_MODULE := yap0
|
LOCAL_MODULE := yap0
|
||||||
LOCAL_SRC_FILES += @abs_top_builddir@/../../gmp-android/lib/libgmp.so
|
LOCAL_SRC_FILES += @abs_top_builddir@/../gmp-android/lib/libgmp.so
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
include $(PREBUILT_SHARED_LIBRARY)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
@ -24,7 +24,7 @@ LOCAL_MODULE := example
|
|||||||
LOCAL_SHARED_LIBRARIES := yap0 yap1
|
LOCAL_SHARED_LIBRARIES := yap0 yap1
|
||||||
LOCAL_STATIC_LIBRARIES := @abs_top_builddir@/libYap.ar
|
LOCAL_STATIC_LIBRARIES := @abs_top_builddir@/libYap.ar
|
||||||
LOCAL_SRC_FILES += @abs_top_builddir@/packages/swig/android/jni/yap_wrap.cpp
|
LOCAL_SRC_FILES += @abs_top_builddir@/packages/swig/android/jni/yap_wrap.cpp
|
||||||
LOCAL_C_INCLUDES := @abs_top_builddir@ @abs_top_builddir@/../../gmp-android/include @srcdir@/../../H @srcdir@/../../include @srcdir@/../../os @srcdir@/../../OPTYap @srcdir@/../../BEAM @srcdir@/../../CXX
|
LOCAL_C_INCLUDES := @abs_top_builddir@ @abs_top_builddir@/../gmp-android/include @srcdir@/../../H @srcdir@/../../include @srcdir@/../../os @srcdir@/../../OPTYap @srcdir@/../../BEAM @srcdir@/../../CXX
|
||||||
LOCAL_CFLAGS := @YAP_EXTRAS@ @DEFS@ -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"\"
|
LOCAL_CFLAGS := @YAP_EXTRAS@ @DEFS@ -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"\"
|
||||||
LOCAL_CPP_FEATURES := rtti
|
LOCAL_CPP_FEATURES := rtti
|
||||||
# LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
# LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
||||||
|
@ -9,7 +9,7 @@ DEFS=@DEFS@ -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"$(DESTDIR)\"
|
|||||||
YAP_EXTRAS=@YAP_EXTRAS@
|
YAP_EXTRAS=@YAP_EXTRAS@
|
||||||
srcdir=@srcdir@
|
srcdir=@srcdir@
|
||||||
CPPFLAGS= -I../.. -I$(srcdir)/../../H -I$(srcdir)/../../include -I$(srcdir)/../../os -I$(srcdir)/../../OPTYap -I$(srcdir)/../../BEAM -I$(srcdir)/../../CXX
|
CPPFLAGS= -I../.. -I$(srcdir)/../../H -I$(srcdir)/../../include -I$(srcdir)/../../os -I$(srcdir)/../../OPTYap -I$(srcdir)/../../BEAM -I$(srcdir)/../../CXX
|
||||||
CXXFLAGS= $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
CXXFLAGS= $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||||
|
|
||||||
PROGRAMS= $(srcdir)/python/demo.py \
|
PROGRAMS= $(srcdir)/python/demo.py \
|
||||||
|
|
||||||
@ -22,14 +22,14 @@ python: $(SWIG_FILES) python/_yap.so python/yap.py
|
|||||||
cp $(srcdir)/python/demo.py python
|
cp $(srcdir)/python/demo.py python
|
||||||
|
|
||||||
python/_yap.so: python/yap_wrap.o
|
python/_yap.so: python/yap_wrap.o
|
||||||
$(CXX) -shared $(LDSOFLAGS) -o python/_yap.so python/yap_wrap.o ../../yapi.o $(LIBS) @PYTHON_LIBS@ -L ../.. -lYap -lpthrea
|
$(CXX) -shared $(LDSOFLAGS) -o python/_yap.so python/yap_wrap.o ../../yapi.o $(LIBS) @PYTHON_LIBS@ -L ../.. -lYap -lpthread
|
||||||
|
|
||||||
python/yap_wrap.cpp python/yap.py: $(srcdir)/yap.i
|
python/yap_wrap.cpp python/yap.py: $(srcdir)/yap.i
|
||||||
mkdir -p python
|
mkdir -p python
|
||||||
$(SWIG) -c++ -python -outdir python -o $@ $(CXXFLAGS) -Wall $<
|
$(SWIG) -c++ -python -outdir python -o $@ $(CXXFLAGS) -Wall $<
|
||||||
|
|
||||||
python/yap_wrap.o: python/yap_wrap.cpp
|
python/yap_wrap.o: python/yap_wrap.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) @PYTHON_INCLUDES@ $< -o $@
|
$(CXX) -c @SHLIB_CXXFLAGS@ $(CXXFLAGS) @PYTHON_INCLUDES@ $< -o $@
|
||||||
|
|
||||||
java: jni/libyap.@SO@ java/yap.java
|
java: jni/libyap.@SO@ java/yap.java
|
||||||
cd java ; $(JAVAC) *.java; $(JAR) cvf yap.jar *.class
|
cd java ; $(JAVAC) *.java; $(JAR) cvf yap.jar *.class
|
||||||
@ -41,7 +41,7 @@ jni/yap_wrap.cpp java/yap.java: $(srcdir)/yap.i
|
|||||||
$(SWIG) -c++ -java -package pt.up.fc.dcc.yap -outdir java -o jni/yap_wrap.cpp $(CXXFLAGS) -Wall $<
|
$(SWIG) -c++ -java -package pt.up.fc.dcc.yap -outdir java -o jni/yap_wrap.cpp $(CXXFLAGS) -Wall $<
|
||||||
|
|
||||||
jni/yap_wrap.o: jni/yap_wrap.cpp
|
jni/yap_wrap.o: jni/yap_wrap.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) @JPLCFLAGS@ $< -o $@
|
$(CXX) -c @SHLIB_CXXFLAGS@ $(CXXFLAGS) @JPLCFLAGS@ $< -o $@
|
||||||
|
|
||||||
# depends on make install on top-level
|
# depends on make install on top-level
|
||||||
# also, should have an android device running, say
|
# also, should have an android device running, say
|
||||||
|
Reference in New Issue
Block a user