summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-13 11:19:40 +0100
committerGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-13 11:19:40 +0100
commit02a8661864a46f83287cf07320635743191b2b92 (patch)
treef2c58baa0af0289a0e9e93c54459de3a23eb6682 /src
parent99db593250aa02e957135966f501c8a49d33513f (diff)
Rework build, move libconf to lib folder.
Diffstat (limited to 'src')
-rw-r--r--src/bin/Makefile.mk5
-rw-r--r--src/bin/conf.c2
-rw-r--r--src/bin/rules.c2
-rw-r--r--src/include/Conf.h (renamed from src/bin/libconf.h)0
-rw-r--r--src/lib/Makefile.mk10
-rw-r--r--src/lib/conf.c (renamed from src/bin/libconf.c)8
6 files changed, 17 insertions, 10 deletions
diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index 0246c79..3767425 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -7,12 +7,13 @@ src/bin/smman
7src_bin_smman_SOURCES = \ 7src_bin_smman_SOURCES = \
8src/bin/conf.c \ 8src/bin/conf.c \
9src/bin/utils.c \ 9src/bin/utils.c \
10src/bin/libconf.c \
11src/bin/logfiles.c \ 10src/bin/logfiles.c \
12src/bin/logmessages.c \ 11src/bin/logmessages.c \
13src/bin/main.c \ 12src/bin/main.c \
14src/bin/rules.c \ 13src/bin/rules.c \
15src/bin/send.c \ 14src/bin/send.c \
16src/bin/spy.c 15src/bin/spy.c
17src_bin_smman_CPPFLAGS = @BIN_CFLAGS@ 16src_bin_smman_CPPFLAGS = @BIN_CFLAGS@ $(EXTRA_CPPFLAGS)
18src_bin_smman_LDFLAGS = @BIN_LIBS@ 17src_bin_smman_LDFLAGS = @BIN_LIBS@
18src_bin_smman_LDADD = \
19src/lib/libconf.la
diff --git a/src/bin/conf.c b/src/bin/conf.c
index 8b65a1a..cae7e9a 100644
--- a/src/bin/conf.c
+++ b/src/bin/conf.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "smman.h" 19#include "smman.h"
20#include "libconf.h" 20#include <Conf.h>
21 21
22/** 22/**
23 * @brief This function will init libconf and ask to load our configuration 23 * @brief This function will init libconf and ask to load our configuration
diff --git a/src/bin/rules.c b/src/bin/rules.c
index 34fc8b7..fe3c6f5 100644
--- a/src/bin/rules.c
+++ b/src/bin/rules.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "smman.h" 19#include "smman.h"
20#include "libconf.h" 20#include <Conf.h>
21 21
22struct rule *rules_temp; /**< Pointer to a rule, used so rules_load_rule_loadspec() knowns which rule rules_load_rule() is processing */ 22struct rule *rules_temp; /**< Pointer to a rule, used so rules_load_rule_loadspec() knowns which rule rules_load_rule() is processing */
23 23
diff --git a/src/bin/libconf.h b/src/include/Conf.h
index d26a4a2..d26a4a2 100644
--- a/src/bin/libconf.h
+++ b/src/include/Conf.h
diff --git a/src/lib/Makefile.mk b/src/lib/Makefile.mk
new file mode 100644
index 0000000..a4e2945
--- /dev/null
+++ b/src/lib/Makefile.mk
@@ -0,0 +1,10 @@
1MAINTAINERCLEANFILES += src/lib/*.gc{no,da}
2
3noinst_LTLIBRARIES = \
4src/lib/libconf.la
5
6src_lib_libconf_la_SOURCES = \
7src/lib/conf.c \
8src/include/Conf.h
9src_lib_libconf_la_CFLAGS = $(LIBS_CFLAGS) $(EXTRA_CPPFLAGS)
10src_lib_libconf_la_LDFLAGS = $(LIBS_CFLAGS)
diff --git a/src/bin/libconf.c b/src/lib/conf.c
index 0be5eba..acca01e 100644
--- a/src/bin/libconf.c
+++ b/src/lib/conf.c
@@ -65,10 +65,9 @@
65 * @verbatim gcc -o main main.c `pkg-config --cflags libconf` `pkg-config --libs libconf` `pkg-config --cflags eina` @endverbatim 65 * @verbatim gcc -o main main.c `pkg-config --cflags libconf` `pkg-config --libs libconf` `pkg-config --cflags eina` @endverbatim
66 * @verbatim EINA_LOG_LEVEL=5 ./main /etc/docupack.conf@endverbatim 66 * @verbatim EINA_LOG_LEVEL=5 ./main /etc/docupack.conf@endverbatim
67 */ 67 */
68#include "libconf.h" 68#include <Conf.h>
69 69
70/** 70/**
71 * \fn int libconfig_init(char *file, struct libconfig *myconf)
72 * \brief Inits lib. 71 * \brief Inits lib.
73 * 72 *
74 * \param file full path to configuration file 73 * \param file full path to configuration file
@@ -80,7 +79,7 @@ int libconfig_init(char *file, struct libconfig *myconf)
80 strcpy(myconf->file, file); 79 strcpy(myconf->file, file);
81 myconf->lconfig = NULL; 80 myconf->lconfig = NULL;
82 81
83 ligconfig_einadom = eina_log_domain_register("Libconf", EINA_COLOR_ORANGE); 82 ligconfig_einadom = eina_log_domain_register("Libconf", EINA_COLOR_ORANGE);
84 83
85 EINA_LOG_DOM_DBG(ligconfig_einadom, "Using configuration file %s", myconf->file); 84 EINA_LOG_DOM_DBG(ligconfig_einadom, "Using configuration file %s", myconf->file);
86 85
@@ -89,7 +88,6 @@ int libconfig_init(char *file, struct libconfig *myconf)
89 88
90 89
91/** 90/**
92 * \fn int libconfig_load(struct libconfig *myconf)
93 * \brief Loads configuration file to store every variable into our Eina list 91 * \brief Loads configuration file to store every variable into our Eina list
94 * 92 *
95 * \param myconf Pointer to a libconfig structure 93 * \param myconf Pointer to a libconfig structure
@@ -178,7 +176,6 @@ int libconfig_load(struct libconfig *myconf)
178} 176}
179 177
180/** 178/**
181 * \fn int libconfig_list(struct libconfig *myconf, int (*callback_function)(char *variable, char *value))
182 * \brief Will send to a callback every entry of the Eina list 179 * \brief Will send to a callback every entry of the Eina list
183 * 180 *
184 * \param myconf Pointer to a libconfig structure 181 * \param myconf Pointer to a libconfig structure
@@ -197,7 +194,6 @@ int libconfig_list(struct libconfig *myconf, int (*callback_function)(char *vari
197} 194}
198 195
199/** 196/**
200 * \fn int libconfig_free(struct libconfig *myconf)
201 * \brief Will free our eina list 197 * \brief Will free our eina list
202 * 198 *
203 * \param myconf Pointer to a libconfig structure 199 * \param myconf Pointer to a libconfig structure