From 0ff6217227ce551d6c91524c8e7fd37352e20490 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Sun, 19 Oct 2025 19:17:37 -0300 Subject: add include path for PostgreSQL + overall cleanup Some distributions place libpq headers under /usr/include/postgresql which is why it's added to the include path. And even though we don't support it yet, the same happens with MariaDB, with headers being placed under /usr/include/mariadb. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 972092f..ad0020c 100644 --- a/Makefile +++ b/Makefile @@ -26,11 +26,11 @@ ifeq ($(DATABASE), sqlite) CFLAGS += -DDATABASE_SQLITE=1 else ifeq ($(DATABASE), postgres) DATABASEOBJ = $(BUILDDIR)/database_postgres.obj - CFLAGS += -DDATABASE_POSTGRESQL=1 + CFLAGS += -DDATABASE_POSTGRESQL=1 -I/usr/include/postgresql LFLAGS += -lpq else ifeq ($(DATABASE), mariadb) - DATABASEOBJ = $(BUILDDIR)/database_mysql.obj - CFLAGS += -DDATABASE_MYSQL=1 -DDATABASE_MARIADB=1 + DATABASEOBJ = $(BUILDDIR)/database_mariadb.obj + CFLAGS += -DDATABASE_MARIADB=1 -I/usr/include/mariadb LFLAGS += -lmariadb else $(error Unsupported DATABASE: `$(DATABASE)`. Valid options are `sqlite`, `postgres`, or `mariadb`) @@ -68,7 +68,7 @@ $(BUILDDIR)/database_postgres.obj: $(SRCDIR)/database_postgres.cc $(SRCDIR)/quer @mkdir -p $(@D) $(CXX) -c $(CXXFLAGS) -o $@ $< -$(BUILDDIR)/database_mysql.obj: $(SRCDIR)/database_mysql.cc $(SRCDIR)/querymanager.hh +$(BUILDDIR)/database_mariadb.obj: $(SRCDIR)/database_mariadb.cc $(SRCDIR)/querymanager.hh @mkdir -p $(@D) $(CXX) -c $(CXXFLAGS) -o $@ $< -- cgit v1.2.3