Browse code

db_postgres: Makefile comment updated to reference main Makefile

Daniel-Constantin Mierla authored on 02/11/2020 10:16:35
Showing 1 changed files
... ...
@@ -1,5 +1,5 @@
1 1
 #
2
-# WARNING: do not run this directly, it should be run by the master Makefile
2
+# WARNING: do not run this directly, it should be run by the main Makefile
3 3
 
4 4
 include ../../Makefile.defs
5 5
 auto_gen=
Browse code

db_postgres: Makefile - fixed name of variable used to detect pkg-config

Daniel-Constantin Mierla authored on 01/04/2019 14:52:21
Showing 1 changed files
... ...
@@ -10,13 +10,13 @@ NAME=db_postgres.so
10 10
 # CROSS_COMPILE=true
11 11
 
12 12
 ifeq ($(CROSS_COMPILE),)
13
-LIBPQL_BUILDER = $(shell \
13
+LIBPQ_BUILDER = $(shell \
14 14
 	if pkg-config --exists libpq; then \
15 15
 		echo 'pkg-config libpq'; \
16 16
 	fi)
17 17
 ifneq ($(LIBPQ_BUILDER),)
18
-	DEFS += $(shell $(LIBPQL_BUILDER) --cflags)
19
-	LIBS += $(shell $(LIBPQL_BUILDER) --libs)
18
+	DEFS += $(shell $(LIBPQ_BUILDER) --cflags)
19
+	LIBS += $(shell $(LIBPQ_BUILDER) --libs)
20 20
 endif
21 21
 endif
22 22
 
Browse code

db_postgres: try to use pkg-config for lib paths

- GH #1915

Daniel-Constantin Mierla authored on 01/04/2019 07:52:16
Showing 1 changed files
... ...
@@ -9,6 +9,19 @@ NAME=db_postgres.so
9 9
 # the autodetection
10 10
 # CROSS_COMPILE=true
11 11
 
12
+ifeq ($(CROSS_COMPILE),)
13
+LIBPQL_BUILDER = $(shell \
14
+	if pkg-config --exists libpq; then \
15
+		echo 'pkg-config libpq'; \
16
+	fi)
17
+ifneq ($(LIBPQ_BUILDER),)
18
+	DEFS += $(shell $(LIBPQL_BUILDER) --cflags)
19
+	LIBS += $(shell $(LIBPQL_BUILDER) --libs)
20
+endif
21
+endif
22
+
23
+ifeq ($(LIBPQ_BUILDER),)
24
+
12 25
 ifeq ($(CROSS_COMPILE),)
13 26
 PGCFG=$(shell which pg_config)
14 27
 endif
... ...
@@ -27,6 +40,8 @@ else
27 40
 		-L$(LOCALBASE)/lib/pgsql -lpq
28 41
 endif
29 42
 
43
+endif
44
+
30 45
 SERLIBPATH=../../lib
31 46
 SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
32 47
 
Browse code

db_postgres: updated to the new mod interface

Daniel-Constantin Mierla authored on 28/09/2018 09:17:43 • Victor Seva committed on 28/09/2018 11:03:26
Showing 1 changed files
... ...
@@ -27,9 +27,6 @@ else
27 27
 		-L$(LOCALBASE)/lib/pgsql -lpq
28 28
 endif
29 29
 
30
-#DEFS += -DPG_TEST
31
-DEFS += -DSER_MOD_INTERFACE
32
-
33 30
 SERLIBPATH=../../lib
34 31
 SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
35 32
 
Browse code

db_postgres: updated the path to kamctl sql files

Daniel-Constantin Mierla authored on 07/12/2016 12:23:36
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ ifeq ($(INSTALL_FLAVOUR),kamailio)
39 39
 # extra install for kamailio
40 40
 
41 41
 install-pgsql-scripts: $(bin_prefix)/$(bin_dir)
42
-		PGSQLON=yes $(MAKE) -C ../../utils/kamctl/ install-modules
42
+		PGSQLON=yes $(MAKE) -C ../../../utils/kamctl/ install-modules
43 43
 
44 44
 install-scripts: install-pgsql-scripts
45 45
 
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,46 @@
1
+#
2
+# WARNING: do not run this directly, it should be run by the master Makefile
3
+
4
+include ../../Makefile.defs
5
+auto_gen=
6
+NAME=db_postgres.so
7
+
8
+# set CROSS_COMPILE to true if you want to skip
9
+# the autodetection
10
+# CROSS_COMPILE=true
11
+
12
+ifeq ($(CROSS_COMPILE),)
13
+PGCFG=$(shell which pg_config)
14
+endif
15
+
16
+ifneq ($(PGCFG),)
17
+	# use autodetection
18
+	DEFS += -I$(shell $(PGCFG) --includedir)
19
+	LIBS += -L$(shell $(PGCFG) --libdir) -lpq
20
+else
21
+	# use standard know paths
22
+	# libpq-fe.h locations
23
+	DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include \
24
+		-I$(SYSBASE)/include/pgsql -I$(SYSBASE)/include/postgresql \
25
+		-I$(SYSBASE)/include/postgresql/8.0
26
+	LIBS +=-L$(LOCALBASE)/lib -L$(LOCALBASE)/pgsql/lib \
27
+		-L$(LOCALBASE)/lib/pgsql -lpq
28
+endif
29
+
30
+#DEFS += -DPG_TEST
31
+DEFS += -DSER_MOD_INTERFACE
32
+
33
+SERLIBPATH=../../lib
34
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
35
+
36
+include ../../Makefile.modules
37
+
38
+ifeq ($(INSTALL_FLAVOUR),kamailio)
39
+# extra install for kamailio
40
+
41
+install-pgsql-scripts: $(bin_prefix)/$(bin_dir)
42
+		PGSQLON=yes $(MAKE) -C ../../utils/kamctl/ install-modules
43
+
44
+install-scripts: install-pgsql-scripts
45
+
46
+endif # INSTALL_FLAVOUR