]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Able to compile BOTH database
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 24 Jun 2025 13:57:35 +0000 (09:57 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 24 Jun 2025 13:57:35 +0000 (09:57 -0400)
Makefile
app/Makefile
lib/Makefile
lib/subrou.h
lib/unimar.c
lib/unipos.c

index 2b18f1c41e49b149e0fb93d44f81b3fd311b7b7b..80dea0cdab65d32d93cf67d4cd24a0a0dd533eec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -241,7 +241,7 @@ APPNAME     =  mailleur
 #--------------------------------------------------------------------
 #to set the compiled default library
 ifeq ($(strip $(DB)),)
-DB=1
+DB=0
 endif
 #--------------------------------------------------------------------
 #Managing testarea
index b185af354b88b9af6377a340ad253c4418b66455..d4545039b74f68fcecdd49b9bafcc4240cc2a85f 100644 (file)
@@ -44,6 +44,10 @@ LIBMAIL=  ../lib/libmail.a
 
 #linking according database
 #postgresql
+ifeq ("$(DB)","0")
+POSTGRESQL_LIB=-lpq
+MYSQL_LIB=-lmysqlclient
+endif
 ifeq ("$(DB)","1")
 POSTGRESQL_LIB=-lpq
 endif
index d663038d01a75d27eb620e679a0e9c375bb58be0..a1d460e504a54f5d0f0b5a5feea69191160f474a 100644 (file)
@@ -145,7 +145,7 @@ toremake:  Makefile
 #--------------------------------------------------------------------
 #to set the compiled default library
 ifeq ($(strip $(DB)),)
-DB=1
+DB=0
 endif
 #--------------------------------------------------------------------
 CC     = gcc
index 90d256e7e832031d5c9d43e1659f677214d85b20..d79025e685605c3d17fffd0ed021fcd426df9862 100644 (file)
@@ -20,7 +20,7 @@
 #define ITSOK   0               //to check errno against no error
 
 //defining database #define
-#define USE_NODB        0       //No data base to be linked
+#define USE_ALLDB       0       //All database type need to be linked
 #define USE_POSTGRESQL  1
 #define USE_MYSQL       2
 
index a3013c1ec0de3b3efc5f9e6a218a8136822ef87a..384b50dacd5a5976d0cb2e8c13466358f0c29186 100644 (file)
@@ -16,7 +16,7 @@
 #include        "unimar.h"
 
 //checking if MYSQL database need to compiled
-#if DATABASE==USE_MYSQL
+#if DATABASE==USE_MYSQL || DATABSE==USE_ALLDB
   #define DB_MYSQL
 #endif
 
index df2c23ae348f9f0994057eeb678678575698ab47..ada3471f57bd6fe5d7ea569957f4b58e211b00be 100644 (file)
@@ -12,7 +12,7 @@
 #include        "unipos.h"
 
 //checking if MYSQL database need to compiled
-#if DATABASE==USE_POSTGRESQL
+#if DATABASE==USE_POSTGRESQL || DATABSE==USE_ALLDB
   #define DB_POSTGRESQL
 #endif