Bump version and generate bindings
This commit is contained in:
21
bindings/java/CMakeLists.txt
Normal file
21
bindings/java/CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(JNI)
|
||||
|
||||
if (JNI_FOUND)
|
||||
message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
|
||||
message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
|
||||
else()
|
||||
message(FATAL_ERROR "JNI not found, please try to update JAVA_HOME accordingly")
|
||||
endif()
|
||||
|
||||
add_library(unicorn_java SHARED unicorn_Unicorn.c)
|
||||
|
||||
message("${CMAKE_CURRENT_SOURCE_DIR}/bindings/java/target/headers")
|
||||
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/target/headers")
|
||||
message(FATAL_ERROR "bindings/java/target/headers not generated, please generate them firstly")
|
||||
endif()
|
||||
|
||||
target_include_directories(unicorn_java PRIVATE target/headers ${JNI_INCLUDE_DIRS})
|
||||
target_link_libraries(unicorn_java PRIVATE unicorn ${JNI_LIBRARIES})
|
||||
@@ -36,6 +36,9 @@ unicorn_Unicorn.o: unicorn_Unicorn.c target/headers/unicorn_Unicorn.h
|
||||
libunicorn_java$(LIB_EXT): $(OBJS)
|
||||
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
|
||||
gen_const:
|
||||
cd .. && python3 const_generator.py java
|
||||
|
||||
clean:
|
||||
rm -f libunicorn_java$(LIB_EXT)
|
||||
rm -f $(OBJS)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.unicorn-engine</groupId>
|
||||
<artifactId>unicorn</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.1.0</version>
|
||||
|
||||
<name>unicorn</name>
|
||||
<url>https://www.unicorn-engine.org</url>
|
||||
|
||||
@@ -4,15 +4,15 @@ package unicorn;
|
||||
|
||||
public interface UnicornConst {
|
||||
public static final int UC_API_MAJOR = 2;
|
||||
public static final int UC_API_MINOR = 1;
|
||||
|
||||
public static final int UC_API_MINOR = 0;
|
||||
public static final int UC_API_PATCH = 2;
|
||||
public static final int UC_API_EXTRA = 1;
|
||||
public static final int UC_API_PATCH = 0;
|
||||
public static final int UC_API_EXTRA = 255;
|
||||
public static final int UC_VERSION_MAJOR = 2;
|
||||
public static final int UC_VERSION_MINOR = 1;
|
||||
|
||||
public static final int UC_VERSION_MINOR = 0;
|
||||
public static final int UC_VERSION_PATCH = 2;
|
||||
public static final int UC_VERSION_EXTRA = 1;
|
||||
public static final int UC_VERSION_PATCH = 0;
|
||||
public static final int UC_VERSION_EXTRA = 255;
|
||||
public static final int UC_SECOND_SCALE = 1000000;
|
||||
public static final int UC_MILISECOND_SCALE = 1000;
|
||||
public static final int UC_ARCH_ARM = 1;
|
||||
@@ -144,11 +144,14 @@ public interface UnicornConst {
|
||||
public static final int UC_CTL_TLB_FLUSH = 11;
|
||||
public static final int UC_CTL_TLB_TYPE = 12;
|
||||
public static final int UC_CTL_TCG_BUFFER_SIZE = 13;
|
||||
public static final int UC_CTL_CONTEXT_MODE = 14;
|
||||
|
||||
public static final int UC_PROT_NONE = 0;
|
||||
public static final int UC_PROT_READ = 1;
|
||||
public static final int UC_PROT_WRITE = 2;
|
||||
public static final int UC_PROT_EXEC = 4;
|
||||
public static final int UC_PROT_ALL = 7;
|
||||
public static final int UC_CTL_CONTEXT_CPU = 1;
|
||||
public static final int UC_CTL_CONTEXT_MEMORY = 2;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user