Parcourir la source

lib/print: relocated to archive

Daniel-Constantin Mierla il y a 9 mois
Parent
commit
c389e443e9

+ 2 - 0
src/lib/print/.cvsignore

@@ -0,0 +1,2 @@
+libprint.so.*
+

+ 18 - 0
src/lib/print/CMakeLists.txt

@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.10)
+
+project(kamailio_lib_print VERSION 1.2.1)
+
+file(GLOB SRC_FILES "*.c")
+
+# Original target to be named as folder, so when included from lib/CMakeLists.txt
+# it will be named as lib/ims.so
+add_library(lib_print SHARED ${SRC_FILES})
+
+target_link_libraries(lib_print common kamailio)
+
+# TODO: do we need version control?
+set_target_properties(
+  lib_print PROPERTIES VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+                       OUTPUT_NAME print
+)
+set_target_properties(lib_print PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})

+ 14 - 0
src/lib/print/Makefile

@@ -0,0 +1,14 @@
+#
+# example library makefile
+#
+
+include ../../Makefile.defs
+auto_gen=
+NAME:=print
+MAJOR_VER=1
+MINOR_VER=2
+BUGFIX_VER=1
+LIBS=
+
+include ../../Makefile.libs
+

+ 11 - 0
src/lib/print/README

@@ -0,0 +1,11 @@
+example print library
+--------------
+
+
+Description:
+------------
+
+This library is an example on how to implement a ser specific library
+(see the Makefile).
+See also modules/print_lib for a library usage example.
+

+ 12 - 0
src/lib/print/print.c

@@ -0,0 +1,12 @@
+/*
+ * example library
+ */
+
+
+#include <stdio.h>
+
+int stderr_println(char *text)
+{
+	fprintf(stderr, "%s\n", text);
+	return 0;
+}

+ 7 - 0
src/lib/print/print.h

@@ -0,0 +1,7 @@
+
+#ifndef _print_h
+#define _print_h
+
+int stderr_println(char *text);
+
+#endif