From 733aaa70aaf4e245809a46faef50910f0732d4c7 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Tue, 4 Aug 2026 22:59:12 +0200 Subject: Update display libraries lookup --- Makefile | 1 + src/disp.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5d7f8f4..d9a887a 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ CALCULER_VERSION := 1.0 __CFLAGS := -std=c99 \ -Wall \ -DCALCULER_VERSION=\"$(CALCULER_VERSION)\" \ + -DCALCULER_PREFIX=\"$(PREFIX)\" \ $(shell pkg-config --cflags readline) __LDFLAGS := __LIBS := $(shell pkg-config --libs readline) diff --git a/src/disp.c b/src/disp.c index 02f9bdc..efb91d3 100644 --- a/src/disp.c +++ b/src/disp.c @@ -86,10 +86,11 @@ get_disp(char *disp_name) { #ifndef NDEBUG /* displays are shared libraries */ - char so_path[64] = {0}; - strcpy(so_path, "./src/.libs/"); + char so_path[128]; + strcpy(so_path, CALCULER_PREFIX); + strcat(so_path, "/lib/calculer/lib"); strcat(so_path, disp_name); - strcat(so_path, ".so.0.0.0"); + strcat(so_path, ".so"); struct disp *disp = malloc(sizeof(*disp)); disp->so_path = strdup(so_path); disp->name = disp_name; -- cgit v1.2.3