mirror of https://github.com/dnomd343/klotski.git
Dnomd343
2 years ago
7 changed files with 46 additions and 27 deletions
@ -1,8 +1,10 @@ |
|||||
cmake_minimum_required(VERSION 3.0) |
cmake_minimum_required(VERSION 3.0) |
||||
|
|
||||
|
project(klotski-cli LANGUAGES C) |
||||
|
|
||||
include_directories(klotski/ffi) |
include_directories(klotski/ffi) |
||||
|
|
||||
add_subdirectory(klotski) |
add_subdirectory(klotski) |
||||
|
|
||||
add_executable(demo main.c) |
add_executable(cli main.c) |
||||
target_link_libraries(demo PUBLIC klotski) |
target_link_libraries(cli PUBLIC klotski) |
||||
|
@ -0,0 +1,7 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
|
||||
|
import ctypes |
||||
|
|
||||
|
lib = ctypes.CDLL('../cmake-build-release/src/klotski/libklotski.so') |
||||
|
|
||||
|
lib.tmain() |
@ -1,23 +1,21 @@ |
|||||
#pragma once |
#pragma once |
||||
|
|
||||
|
/// klotski test interface
|
||||
#ifdef __cplusplus |
#ifdef __cplusplus |
||||
extern "C" { |
extern "C" { |
||||
#endif |
#endif |
||||
|
// TODO: remove after test
|
||||
void tmain(); |
extern void tmain(); |
||||
|
|
||||
#ifdef __cplusplus |
#ifdef __cplusplus |
||||
} |
} |
||||
#endif |
#endif |
||||
|
|
||||
|
/// klotski codec interface
|
||||
#ifdef __cplusplus |
#ifdef __cplusplus |
||||
extern "C" { |
extern "C" { |
||||
#endif |
#endif |
||||
|
extern void short_code_speed_up(); |
||||
void short_code_speed_up(); |
extern void short_code_speed_up_fast(); |
||||
void short_code_speed_up_fast(); |
|
||||
|
|
||||
#ifdef __cplusplus |
#ifdef __cplusplus |
||||
} |
} |
||||
#endif |
#endif |
||||
|
Loading…
Reference in new issue