summaryrefslogtreecommitdiff
path: root/plugins/bhash/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/bhash/Makefile.am')
-rw-r--r--plugins/bhash/Makefile.am31
1 files changed, 23 insertions, 8 deletions
diff --git a/plugins/bhash/Makefile.am b/plugins/bhash/Makefile.am
index 44d1c21..45c5ee0 100644
--- a/plugins/bhash/Makefile.am
+++ b/plugins/bhash/Makefile.am
@@ -4,23 +4,36 @@ lib_LTLIBRARIES = libbhash.la
libdir = $(pluginslibdir)
+if BUILD_PYTHON_PACKAGE
+
+RUN_PATH = -Wl,-rpath,'$$ORIGIN/../chrysalide-libs:$$ORIGIN'
+
+else
+
+RUN_PATH = -Wl,-rpath,'$$ORIGIN'
+
+endif
+
if BUILD_PYTHON3_BINDINGS
-PYTHON3_LIBADD = \
- python/libbhashpython.la
+PYTHON3_LIBADD = python/libbhashpython.la
if BUILD_DISCARD_LOCAL
-PYTHON3_LDFLAGS = -Wl,-rpath,$(pluginslibdir) \
- -L$(top_srcdir)/plugins/pychrysalide/.libs -l:pychrysalide.so
+if BUILD_PYTHON_PACKAGE
+PYTHON3_RUN_PATH = -Wl,-rpath,'$$ORIGIN/..'
+else
+PYTHON3_RUN_PATH = -Wl,-rpath,'$$ORIGIN'
+endif
else
-PYTHON3_LDFLAGS = -Wl,-rpath,$(abs_top_srcdir)/plugins/pychrysalide/.libs \
- -L$(top_srcdir)/plugins/pychrysalide/.libs -l:pychrysalide.so
+PYTHON3_RUN_PATH = -Wl,-rpath,$(abs_top_srcdir)/plugins/pychrysalide/.libs
endif
+PYTHON3_LDFLAGS = $(PYTHON3_RUN_PATH) -L$(top_srcdir)/plugins/pychrysalide/.libs -l:pychrysalide.so
+
PYTHON3_SUBDIRS = python
endif
@@ -35,9 +48,11 @@ libbhash_la_SOURCES = \
libbhash_la_LIBADD = \
$(PYTHON3_LIBADD)
-libbhash_la_LDFLAGS = \
+libbhash_la_LDFLAGS = \
+ -avoid-version \
-L$(top_srcdir)/src/.libs -lchrysacore \
- $(PYTHON3_LDFLAGS)
+ -L$(top_srcdir)/plugins/pe/.libs -lpe \
+ $(RUN_PATH) $(PYTHON3_LDFLAGS)
devdir = $(includedir)/chrysalide/$(subdir)