summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-08-08 16:57:16 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-08-08 16:57:16 +0200
commit02fc9c6d5e5dbc0b8e8502e3b86e1fbd67f491d7 (patch)
treee18d7b37d021f64bfc68bf491ed6437a63e4e6f7
parentd42be19fd2f8f93b045c8e0642a50413f8e36223 (diff)
downloadcssh-02fc9c6d5e5dbc0b8e8502e3b86e1fbd67f491d7.tar.gz
cssh-02fc9c6d5e5dbc0b8e8502e3b86e1fbd67f491d7.tar.bz2
minimal frame
-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 );
+}