From: Jean-Marc Pigeon (Delson) Date: Tue, 17 Jun 2025 23:30:11 +0000 (-0400) Subject: Able to compile POSTGRESQL or MYSQL version X-Git-Tag: tag-0.9~125 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=8a8d1e61c11a5482a894d76a57053c1b78c76d86;p=jmp%2Fmailleur Able to compile POSTGRESQL or MYSQL version --- 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