android
This commit is contained in:
parent
237430afb4
commit
85f444cc94
@ -439,7 +439,6 @@ extern bool Yap_ChDir(const char *path);
|
||||
bool Yap_isDirectory(const char *FileName);
|
||||
extern bool Yap_Exists(const char *f);
|
||||
|
||||
|
||||
/* threads.c */
|
||||
extern void Yap_InitThreadPreds(void);
|
||||
extern void Yap_InitFirstWorkerThreadHandle(void);
|
||||
|
@ -53,7 +53,7 @@ typedef struct AliasDescS {
|
||||
* @return a new VFS that will support /assets
|
||||
*/
|
||||
|
||||
extern VFS_t *Yap_InitAssetManager( void );
|
||||
extern struct vfs *Yap_InitAssetManager( void );
|
||||
|
||||
/* routines in parser.c */
|
||||
extern VarEntry *Yap_LookupVar(const char *);
|
||||
|
@ -82,5 +82,5 @@
|
||||
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install --ignore-installed --no-deps .
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
|
||||
|
||||
install(FILES ${PL_FILES} DESTINATION ${libpl} )
|
||||
install(FILES ${PL_SOURCES} DESTINATION ${libpl} )
|
||||
|
||||
|
@ -1,55 +1,72 @@
|
||||
include (UseSWIG)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
../../../H
|
||||
../../../H/generated
|
||||
../../../OPTYap
|
||||
../../../include
|
||||
../../../CXX
|
||||
.
|
||||
..
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
set_property(GLOBAL
|
||||
APPEND PROPERTY
|
||||
COMPILE_DEFINITIONS
|
||||
-Dmmap=mmap64)
|
||||
|
||||
|
||||
# This is a CMake file for SWIG and Android
|
||||
|
||||
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/java/pt/up/yap/lib )
|
||||
FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/assets)
|
||||
set(CMAKE_SWIG_OUTDIR ${YAP_APP_DIR}/src/generated/java )
|
||||
set(SWIG_OUTFILE_OUTDIR ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
set_property(SOURCE ../yap.i PROPERTY CPLUSPLUS ON)
|
||||
set_property(SOURCE streamer.i PROPERTY CPLUSPLUS ON)
|
||||
set(CMAKE_SWIG_OUTDIR ${YAP_APP_DIR}/src/generated/java/pt/up/yap/lib )
|
||||
set( SWIG_MODULE_NAME pt.up.yap.lib )
|
||||
set ( pllib ${YAP_APP_DIR}/src/generated/assets/Yap )
|
||||
|
||||
set (SWIG_SOURCES ../yap.i streamer.i streamer.cpp)
|
||||
set ( SWIG_SOURCES ${CMAKE_SOURCE_DIR}/packages/swig/yap.i )
|
||||
SET_SOURCE_FILES_PROPERTIES(${SWIG_SOURCES} PROPERTIES CPLUSPLUS ON)
|
||||
|
||||
SWIG_ADD_LIBRARY(YAPJava
|
||||
SHARED # [TYPE <SHARED|MODULE|STATIC|USE_BUILD_SHARED_LIBS>]
|
||||
LANGUAGE java
|
||||
SOURCES ../yap.i
|
||||
)
|
||||
include_directories (
|
||||
${CMAKE_SOURCE_DIR}/CXX
|
||||
)
|
||||
set( GMP_ROOT ${CMAKE_SOURCE_DIR}/../gmp/${ANDROID_ABI} )
|
||||
set (GMP_INCLUDE_DIRS ${GMP_ROOT})
|
||||
set (GMP_LIBRARIES ${GMP_ROOT}/libgmp.so)
|
||||
|
||||
SWIG_ADD_LIBRARY(YAPStreamer
|
||||
SHARED # [TYPE <SHARED|MODULE|STATIC|USE_BUILD_SHARED_LIBS>]
|
||||
LANGUAGE java
|
||||
SOURCES streamer.i streamer.cpp streamer.h
|
||||
)
|
||||
|
||||
target_link_libraries(YAPJava YAP++ android log)
|
||||
add_custom_command (OUTPUT yap_swig.cpp
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${pllib}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${pllib}/pl
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${pllib}/os
|
||||
|
||||
target_link_libraries(YAPStreamer YAP++ android log)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${pl_library} ${pllib}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${pl_boot_library} ${pllib}/pl
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${pl_os_library} ${pllib}/os
|
||||
COMMAND ${SWIG_EXECUTABLE} -c++ -java -package ${SWIG_MODULE_NAME} -outdir ${CMAKE_SWIG_OUTDIR} -outcurrentdir -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 yap_swig.cpp ${SWIG_SOURCES}
|
||||
DEPENDS ${SWIG_SOURCES} YAP++
|
||||
)
|
||||
|
||||
add_custom_command (OUTPUT swig_streamer.cpp
|
||||
COMMAND ${SWIG_EXECUTABLE} -c++ -java -package ${SWIG_MODULE_NAME} -outdir ${CMAKE_SWIG_OUTDIR} -outcurrentdir -addextern -I${CMAKE_CURRENT_SOURCE_DIR} -o swig_streamer.cpp streamer.i
|
||||
DEPENDS streamer.i
|
||||
)
|
||||
|
||||
|
||||
# GMP_FOUND - true if GMP/MPIR was found
|
||||
# GMP_INCLUDE_DIRS - include search path
|
||||
# GMP_LIBRARIES - libraries to link with
|
||||
#config.h needs this (TODO: change in code latter)
|
||||
include_directories( .;${GMP_INCLUDE_DIRS};${CMAKE_SOURCE_DIR}/include;${CMAKE_SOURCE_DIR}/H;${CMAKE_SOURCE_DIR}/H/generated;${CMAKE_SOURCE_DIR}/os;${CMAKE_SOURCE_DIR}/OPTYap;${CMAKE_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
|
||||
|
||||
|
||||
install(TARGETS YAPJava YAPStreamer
|
||||
RUNTIME DESTINATION ${dlls}
|
||||
LIBRARY DESTINATION c{libdir}
|
||||
ARCHIVE DESTINATION ${libdir}
|
||||
)
|
||||
|
||||
add_lib(YAPJava
|
||||
yap_swig.cpp swig_streamer.cpp streamer.cpp streamer.h
|
||||
)
|
||||
target_link_libraries(YAPJava ${GMP_LIBRARIES} )
|
||||
|
||||
|
||||
target_link_libraries( YAPJava YAP++ libYap android log)
|
||||
|
||||
if (FALSE)
|
||||
|
||||
set (SWIG_ADD_MODULE YAPJava SHARED CPLUPLUS ${SWIG_SOURCES} )
|
||||
# Define swig module with given name and specified language
|
||||
|
||||
|
||||
set (SWIG_LINK_LIBRARIES YAPJava YAP++ libYAP )
|
||||
#- Link libraries to swig module
|
||||
|
||||
|
||||
add_library (YAPJavaTop SHARED
|
||||
main.cpp main.h
|
||||
)
|
||||
|
||||
target_link_libraries( YAPJavaTop ${SWIG_MODULE_${YAPJava}_REAL_NAME} YAP++ libYap android)
|
||||
|
||||
endif()
|
||||
|
@ -370,8 +370,9 @@ be lost.
|
||||
stream_property(_,alias(debugger_input)),
|
||||
!.
|
||||
'$debugger_input' :-
|
||||
S = user_input,
|
||||
stream_property(S,tty(true)),
|
||||
stream_property(S,input),
|
||||
% stream_property(S,input),
|
||||
!,
|
||||
set_stream(S,alias(debugger_input)).
|
||||
'$debugger_input' :-
|
||||
@ -469,7 +470,7 @@ be lost.
|
||||
( Spy == ignore ; '$pred_being_spied'(G, M) )
|
||||
),
|
||||
writeln(go:G:M),
|
||||
!,
|
||||
!,
|
||||
'$execute_nonstop'(G,M).
|
||||
'$trace_goal'(G, M, GoalNumber, H) :-
|
||||
'$undefined'(G, M),
|
||||
@ -631,7 +632,7 @@ be lost.
|
||||
'$TraceError'(E, GoalNumber, G, Module, Info).
|
||||
'$trace_port_'(external_exception(E), GoalNumber, G, Module, Info) :-
|
||||
'$TraceError'(E, GoalNumber, G, Module, Info).
|
||||
|
||||
|
||||
|
||||
%%% - abort: forward throw while the call is newer than goal
|
||||
'$TraceError'( abort, _, _, _, _).
|
||||
|
Reference in New Issue
Block a user