From 8a8d1e61c11a5482a894d76a57053c1b78c76d86 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Tue, 17 Jun 2025 19:30:11 -0400 Subject: [PATCH] Able to compile POSTGRESQL or MYSQL version --- app/Makefile | 13 ++++++++++++- mailleur.spec.in | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Makefile b/app/Makefile index 5f35360..b185af3 100644 --- a/app/Makefile +++ b/app/Makefile @@ -42,9 +42,20 @@ LD = gcc -g CFLAGS = -I ../lib -Wall $(OPTIME) LIBMAIL= ../lib/libmail.a +#linking according database +#postgresql +ifeq ("$(DB)","1") +POSTGRESQL_LIB=-lpq +endif +#mariadb +ifeq ("$(DB)","2") +MYSQL_LIB=-lmysqlclient +endif + LIBS = $(LIBMAIL) \ -luuid \ - -lpq \ + $(POSTGRESQL_LIB) \ + $(MYSQL_LIB) \ -lcrypto \ -lssl \ diff --git a/mailleur.spec.in b/mailleur.spec.in index 1f48fe5..0b1bcb2 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -171,7 +171,7 @@ Requires : %{name} = %{version}-%{release} %build %{__make} \ - DB=2 \ + DB=1 \ debug -- 2.47.3