you can use the .so file with python on raspberry pi or another embded platform. and library file was in directory cmake-build-debug/libmotion.so
link : libsmotion.so
import ctypes
dll_file = "/lib/sensor/motion/libmotion.so"
motion_sensor = ctypes.CDLL(dll_file)
motion_sensor.motion_setup()
while True :
motion_sensor.motion_update()
roll = ctypes.c_float.in_dll(motion_sensor,"roll")
print(roll.value)
motion_sensor.motion_close()