droid
This commit is contained in:
parent
40633a3f83
commit
cb8c37ce56
@ -332,7 +332,7 @@ bool Yap_PrintWarning(Term twarning) {
|
|||||||
PredEntry *pred = RepPredProp(PredPropByFunc(
|
PredEntry *pred = RepPredProp(PredPropByFunc(
|
||||||
FunctorPrintMessage, PROLOG_MODULE)); // PROCEDURE_print_message2;
|
FunctorPrintMessage, PROLOG_MODULE)); // PROCEDURE_print_message2;
|
||||||
__android_log_print(ANDROID_LOG_INFO, "YAPDroid ", " warning(%s)",
|
__android_log_print(ANDROID_LOG_INFO, "YAPDroid ", " warning(%s)",
|
||||||
Yap_TermToBuffer(twarning, Quote_illegal_f | Ignore_ops_f | Unfold_cyclics_f));
|
Yap_TermToBuffer(twarning, Quote_illegal_f | Ignore_ops_f | Ignore_cyclics_f));
|
||||||
Term cmod = (CurrentModule == PROLOG_MODULE ? TermProlog : CurrentModule);
|
Term cmod = (CurrentModule == PROLOG_MODULE ? TermProlog : CurrentModule);
|
||||||
bool rc;
|
bool rc;
|
||||||
Term ts[2], err;
|
Term ts[2], err;
|
||||||
|
@ -351,14 +351,10 @@ list(APPEND YAP_SYSTEM_OPTIONS big_numbers)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (GMP_FOUND)
|
if (GMP_INCLUDE_DIRS)
|
||||||
#config.h needs this (TODO: change in code latter)
|
#config.h needs this (TODO: change in code latter)
|
||||||
include_directories(${GMP_INCLUDE_DIRS})
|
include_directories(${GMP_INCLUDE_DIRS})
|
||||||
check_include_file(gmp.h HAVE_GMP_H)
|
endif ()
|
||||||
check_include_file_cxx(gmpxx.h HAVE_GMPXX_H)
|
|
||||||
|
|
||||||
|
|
||||||
endif (GMP_FOUND)
|
|
||||||
|
|
||||||
|
|
||||||
if (WITH_READLINE)
|
if (WITH_READLINE)
|
||||||
|
@ -16,7 +16,7 @@ extern "C" {
|
|||||||
#include "YapConfig.h"
|
#include "YapConfig.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_GMPXX_H
|
#if HAVE_GMPXX_H || defined(__ANDROID__)
|
||||||
#include <gmpxx.h>
|
#include <gmpxx.h>
|
||||||
#elif HAVE_GMP_H
|
#elif HAVE_GMP_H
|
||||||
#include <gmp.h>
|
#include <gmp.h>
|
||||||
|
@ -470,7 +470,7 @@ extern void Yap_InitAbsmi(void);
|
|||||||
extern void Yap_InitUnify(void);
|
extern void Yap_InitUnify(void);
|
||||||
extern void Yap_TrimTrail(void);
|
extern void Yap_TrimTrail(void);
|
||||||
extern int Yap_Unifiable(Term d0, Term d1);
|
extern int Yap_Unifiable(Term d0, Term d1);
|
||||||
extern int Yap_IUnify(register CELL d0, register CELL d1);
|
extern int Yap_IUnify( CELL d0, CELL d1);
|
||||||
|
|
||||||
/* userpreds.c */
|
/* userpreds.c */
|
||||||
extern void Yap_InitUserCPreds(void);
|
extern void Yap_InitUserCPreds(void);
|
||||||
|
@ -1884,7 +1884,9 @@ signal. */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* use bignums/rationals in YAP code. */
|
/* use bignums/rationals in YAP code. */
|
||||||
#ifndef USE_GMP
|
#if defined( __ANDROID__ ) && !defined(USE_GMP)
|
||||||
|
#define USE_GMP 1
|
||||||
|
#elif !defined(USE_GMP)
|
||||||
#define USE_GMP ${GMP_FOUND}
|
#define USE_GMP ${GMP_FOUND}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# This is a CMake file for SWIG and Android
|
# This is a CMake file for SWIG and Android
|
||||||
|
|
||||||
|
set (SWIG_CXX_DIR ${YAP_APP_DIR}/src/generated/jni)
|
||||||
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/java/pt/up/yap/lib )
|
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/java/pt/up/yap/lib )
|
||||||
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/assets)
|
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/assets)
|
||||||
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/jni)
|
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/jni)
|
||||||
@ -16,42 +17,43 @@ FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/jni)
|
|||||||
set (GMP_INCLUDE_DIRS ${GMP_ROOT})
|
set (GMP_INCLUDE_DIRS ${GMP_ROOT})
|
||||||
set (GMP_LIBRARIES ${GMP_ROOT}/libgmp.so)
|
set (GMP_LIBRARIES ${GMP_ROOT}/libgmp.so)
|
||||||
|
|
||||||
|
#
|
||||||
add_custom_target (pllib
|
# add_custom_target (pllib
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}
|
# COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${pl_library} ${YAP_INSTALL_DATADIR}
|
# COMMAND ${CMAKE_COMMAND} -E copy ${pl_library} ${YAP_INSTALL_DATADIR}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/android.yap ${YAP_INSTALL_DATADIR}
|
# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/android.yap ${YAP_INSTALL_DATADIR}
|
||||||
DEPENDS ${pl_library}
|
# DEPENDS ${pl_library}
|
||||||
)
|
#)
|
||||||
|
#
|
||||||
add_custom_target (pllibpl
|
# add_custom_target (pllibpl
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}/pl
|
# COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}/pl
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${pl_boot_library} ${YAP_INSTALL_DATADIR}/pl
|
# COMMAND ${CMAKE_COMMAND} -E copy ${pl_boot_library} ${YAP_INSTALL_DATADIR}/pl
|
||||||
DEPENDS pllib ${pl_boot_library}
|
#DEPENDS pllib ${pl_boot_library}
|
||||||
)
|
# )
|
||||||
add_custom_target (pllibos ALL
|
# add_custom_target (pllibos ALL
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}/os
|
# COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}/os
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${pl_os_library} ${YAP_INSTALL_DATADIR}/os
|
# COMMAND ${CMAKE_COMMAND} -E copy ${pl_os_library} ${YAP_INSTALL_DATADIR}/os
|
||||||
DEPENDS pllibpl ${pl_os_library}
|
#DEPENDS pllibpl ${pl_os_library}
|
||||||
)
|
# )
|
||||||
|
#
|
||||||
add_custom_command (OUTPUT ${CMAKE_SWIG_OUTPUT}/swig_streamer.cpp
|
# add_custom_command (OUTPUT ${CMAKE_SWIG_OUTPUT}/swig_streamer.cpp
|
||||||
COMMAND ${SWIG_EXECUTABLE} -c++ -java -package ${SWIG_MODULE_NAME} -O -outdir ${CMAKE_SWIG_OUTDIR} -addextern -I${CMAKE_CURRENT_SOURCE_DIR} -o ${CMAKE_SWIG_OUTPUT}/swig_streamer.cpp -oh ${CMAKE_SWIG_OUTPUT}/swig_streamer.hh streamer.i
|
# COMMAND ${SWIG_EXECUTABLE} -c++ -java -package ${SWIG_MODULE_NAME} -O -outdir ${CMAKE_SWIG_OUTDIR} -addextern -I${CMAKE_CURRENT_SOURCE_DIR} -o ${CMAKE_SWIG_OUTPUT}/swig_streamer.cpp -oh ${CMAKE_SWIG_OUTPUT}/swig_streamer.hh streamer.i
|
||||||
DEPENDS streamer.i
|
# DEPENDS streamer.i
|
||||||
)
|
# )
|
||||||
|
#
|
||||||
add_custom_command (OUTPUT ${CMAKE_SWIG_OUTPUT}/yap_swig.cpp
|
# add_custom_command (OUTPUT ${CMAKE_SWIG_OUTPUT}/yap_swig.cpp
|
||||||
COMMAND ${SWIG_EXECUTABLE} -c++ -java -package ${SWIG_MODULE_NAME} -O -outdir ${CMAKE_SWIG_OUTDIR} -addextern -I${CMAKE_SOURCE_DIR}/CXX -I${CMAKE_SOURCE_DIR}/include -I${CMAKE_SOURCE_DIR}/H -I${CMAKE_SOURCE_DIR}/os -I${CMAKE_SOURCE_DIR}/OPTYap -I${CMAKE_BINARY_DIR} -I${GMP_INCLUDE_DIRS} -DX_API="" -o ${CMAKE_SWIG_OUTPUT}/yap_swig.cpp -oh ${CMAKE_SWIG_OUTPUT}/yap_swig.hh ${SWIG_SOURCES}
|
# COMMAND ${SWIG_EXECUTABLE} -c++ -java -package ${SWIG_MODULE_NAME} -O -outdir ${CMAKE_SWIG_OUTDIR} -addextern -I${CMAKE_SOURCE_DIR}/CXX -I${CMAKE_SOURCE_DIR}/include -I${CMAKE_SOURCE_DIR}/H -I${CMAKE_SOURCE_DIR}/os -I${CMAKE_SOURCE_DIR}/OPTYap -I${CMAKE_BINARY_DIR} -I${GMP_INCLUDE_DIRS} -DX_API="" -o ${CMAKE_SWIG_OUTPUT}/yap_swig.cpp -oh ${CMAKE_SWIG_OUTPUT}/yap_swig.hh ${SWIG_SOURCES}
|
||||||
DEPENDS pllibos ${SWIG_SOURCES} YAP++)
|
# DEPENDS pllibos ${SWIG_SOURCES} YAP++)
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
add_library(YAPJava OBJECT
|
add_library(YAPJava OBJECT
|
||||||
${CMAKE_SWIG_OUTPUT}/swig_streamer.cpp
|
${SWIG_CXX_DIR}/streamer_swig.cxx
|
||||||
${CMAKE_SWIG_OUTPUT}/yap_swig.cpp
|
${SWIG_CXX_DIR}/yapi_swig.cxx
|
||||||
streamer.cpp
|
streamer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_target_properties(YAPJava PROPERTIES LINKER_LANGUAGE CXX)
|
||||||
|
|
||||||
# GMP_FOUND - true if GMP/MPIR was found
|
# GMP_FOUND - true if GMP/MPIR was found
|
||||||
# GMP_INCLUDE_DIRS - include search path
|
# GMP_INCLUDE_DIRS - include search path
|
||||||
|
Reference in New Issue
Block a user