summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/cssh.c19
3 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89fa63c..ee3367f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,11 @@
+cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
+
project(cssh C)
+set( CMAKE_C_FLAGS "-std=c99 -Wall -pedantic -Wfatal-errors -Werror -fPIC -O0" )
+
+add_subdirectory(src)
+
add_custom_target(distclean
COMMAND git clean -d -f -x
)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..975552d
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,4 @@
+include_directories(${LIBSSH_PUBLIC_INCLUDE_DIRS})
+
+add_executable(cssh cssh.c)
+target_link_libraries(cssh ssh)
diff --git a/src/cssh.c b/src/cssh.c
new file mode 100644
index 0000000..483e1ef
--- /dev/null
+++ b/src/cssh.c
@@ -0,0 +1,19 @@
+#include <libssh/libssh.h>
+
+#include <stdlib.h>
+
+int main( int argc, char *argv[] )
+{
+ ssh_session session;
+ //~ int verbosity = SSH_LOG_PROTOCOL;
+ //~ int port = 22;
+
+ session = ssh_new( );
+ if( session == NULL ) {
+ exit( EXIT_FAILURE );
+ }
+
+ ssh_free( session );
+
+ exit( EXIT_SUCCESS );
+}