aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--src/disp.c7
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;