diff --git a/Makefile b/Makefile index 320f43ca0..d518f2bc8 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ all: BIN RES UI WIDGETS # -------------------------------------------------------------- # Binaries (native) -BIN: libs backend bridges-plugin bridges-ui discovery plugin theme +BIN: libs backend bridges-plugin bridges-ui discovery interposer plugin theme # -------------------------------------------------------------- @@ -135,6 +135,13 @@ bin/carla-discovery-native$(APP_EXT): libs .FORCE # -------------------------------------------------------------- +interposer: bin/libcarla_interposer.so + +bin/libcarla_interposer.so: .FORCE + $(MAKE) -C source/interposer + +# -------------------------------------------------------------- + plugin: plugin_build bin/carla.lv2/manifest.ttl plugin_build: libs .FORCE @@ -442,6 +449,13 @@ install: bin/libcarla_standalone2.* \ $(DESTDIR)$(PREFIX)/lib/carla/ +ifeq ($(LINUX),true) + # Install interposer + install -m 644 \ + bin/libcarla_interposer.so \ + $(DESTDIR)$(PREFIX)/lib/carla/ +endif + # Install lv2 plugin install -m 644 \ bin/carla.lv2/carla.* \ diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index 87dea8888..2de104691 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -1357,7 +1357,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch #ifdef CARLA_OS_LINUX if (value != 0) { - CarlaString interposerPath(CarlaString(pData->options.binaryDir) + CARLA_OS_SEP_STR "libcarlainterposer.so"); + CarlaString interposerPath(CarlaString(pData->options.binaryDir) + CARLA_OS_SEP_STR "libcarla_interposer.so"); ::setenv("LD_PRELOAD", interposerPath.buffer(), 1); } else diff --git a/source/interposer/Makefile b/source/interposer/Makefile index 744fb30c9..0ff4fd93b 100644 --- a/source/interposer/Makefile +++ b/source/interposer/Makefile @@ -13,7 +13,9 @@ BUILD_CXX_FLAGS += -I../includes -I../utils -isystem ../modules # -------------------------------------------------------------- -TARGETS = ../../bin/libcarlainterposer$(LIB_EXT) +ifeq ($(LINUX),true) +TARGETS = ../../bin/libcarla_interposer.so +endif # -------------------------------------------------------------- @@ -32,7 +34,7 @@ interposer.cpp.o: interposer.cpp # -------------------------------------------------------------- -../../bin/libcarlainterposer$(LIB_EXT): interposer.cpp.o +../../bin/libcarla_interposer.so: interposer.cpp.o $(CXX) $< $(SHARED) $(LINK_FLAGS) -ldl -o $@ # --------------------------------------------------------------