Browse code

Changes necessary to make the module compile in the sip-router tree.

This is a set of changes necessary to make the LDAP module compile in the
sip-router tree. This includes:
* Extra stuff in the Makefile to link with libsrdb2
* Defined SER_MOD_INTERFACE in the makefile
* Updated relative paths to srdb2 header files

Jan Janak authored on 13/02/2009 00:51:33
Showing 11 changed files
... ...
@@ -7,7 +7,7 @@ auto_gen=
7 7
 NAME=mysql.so
8 8
 
9 9
 # mysql.h locations (freebsd,openbsd  solaris)
10
-DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \
10
+DEFS +=-DSER_MOD_INTERFACE -I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \
11 11
 		-I$(LOCALBASE)/mysql/include \
12 12
 		-I/usr/include/mysql
13 13
 
... ...
@@ -19,4 +19,7 @@ LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \
19 19
 		-L/usr/lib64/mysql \
20 20
 		-lmysqlclient -lz
21 21
 
22
+SERLIBPATH=../../lib
23
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2
24
+
22 25
 include ../../Makefile.modules
... ...
@@ -42,7 +42,7 @@
42 42
 
43 43
 #include "../../mem/mem.h"
44 44
 #include "../../str.h"
45
-#include "../../db/db_cmd.h"
45
+#include "../../lib/srdb2/db_cmd.h"
46 46
 #include "../../ut.h"
47 47
 
48 48
 #include <strings.h>
... ...
@@ -29,8 +29,8 @@
29 29
 #ifndef _MY_CMD_H
30 30
 #define _MY_CMD_H  1
31 31
 
32
-#include "../../db/db_drv.h"
33
-#include "../../db/db_cmd.h"
32
+#include "../../lib/srdb2/db_drv.h"
33
+#include "../../lib/srdb2/db_cmd.h"
34 34
 #include <mysql/mysql.h>
35 35
 #include <stdarg.h>
36 36
 
... ...
@@ -29,9 +29,9 @@
29 29
 #ifndef _MY_CON_H
30 30
 #define _MY_CON_H  1
31 31
 
32
-#include "../../db/db_pool.h"
33
-#include "../../db/db_con.h"
34
-#include "../../db/db_uri.h"
32
+#include "../../lib/srdb2/db_pool.h"
33
+#include "../../lib/srdb2/db_con.h"
34
+#include "../../lib/srdb2/db_uri.h"
35 35
 
36 36
 #include <time.h>
37 37
 #include <mysql/mysql.h>
... ...
@@ -30,7 +30,7 @@
30 30
 
31 31
 #include "../../mem/mem.h"
32 32
 #include "../../dprint.h"
33
-#include "../../db/db_gen.h"
33
+#include "../../lib/srdb2/db_gen.h"
34 34
 
35 35
 #include <string.h>
36 36
 
... ...
@@ -33,8 +33,8 @@
33 33
  *  @{
34 34
  */
35 35
 
36
-#include "../../db/db_drv.h"
37
-#include "../../db/db_fld.h"
36
+#include "../../lib/srdb2/db_drv.h"
37
+#include "../../lib/srdb2/db_fld.h"
38 38
 #include <mysql/mysql.h>
39 39
 
40 40
 struct my_fld {
... ...
@@ -32,7 +32,7 @@
32 32
 
33 33
 #include "../../mem/mem.h"
34 34
 #include "../../dprint.h"
35
-#include "../../db/db_gen.h"
35
+#include "../../lib/srdb2/db_gen.h"
36 36
 
37 37
 #include <mysql/mysql.h>
38 38
 
... ...
@@ -29,8 +29,8 @@
29 29
 #ifndef _MY_RES_H
30 30
 #define _MY_RES_H  1
31 31
 
32
-#include "../../db/db_drv.h"
33
-#include "../../db/db_res.h"
32
+#include "../../lib/srdb2/db_drv.h"
33
+#include "../../lib/srdb2/db_res.h"
34 34
 
35 35
 struct my_res {
36 36
 	db_drv_t gen;
... ...
@@ -33,7 +33,7 @@
33 33
 #include "../../dprint.h"
34 34
 #include "../../mem/mem.h"
35 35
 #include "../../ut.h"
36
-#include "../../db/db_gen.h"
36
+#include "../../lib/srdb2/db_gen.h"
37 37
 
38 38
 #include <stdlib.h>
39 39
 #include <string.h>
... ...
@@ -31,8 +31,8 @@
31 31
 #ifndef _MY_URI_H
32 32
 #define _MY_URI_H
33 33
 
34
-#include "../../db/db_uri.h"
35
-#include "../../db/db_drv.h"
34
+#include "../../lib/srdb2/db_uri.h"
35
+#include "../../lib/srdb2/db_drv.h"
36 36
 
37 37
 struct my_uri {
38 38
 	db_drv_t drv;
... ...
@@ -46,7 +46,7 @@
46 46
 #include "my_res.h"
47 47
 
48 48
 #include "../../sr_module.h"
49
-#include "../../db/db.h"
49
+#include "../../lib/srdb2/db.h"
50 50
 
51 51
 int my_ping_interval = 5 * 60; /* Default is 5 minutes */
52 52
 unsigned int my_connect_to = 2; /* 2 s by default */