@@ -28,7 +28,7 @@ all: BIN RES UI WIDGETS | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Binaries (native) | # 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: plugin_build bin/carla.lv2/manifest.ttl | ||||
plugin_build: libs .FORCE | plugin_build: libs .FORCE | ||||
@@ -442,6 +449,13 @@ install: | |||||
bin/libcarla_standalone2.* \ | bin/libcarla_standalone2.* \ | ||||
$(DESTDIR)$(PREFIX)/lib/carla/ | $(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 lv2 plugin | ||||
install -m 644 \ | install -m 644 \ | ||||
bin/carla.lv2/carla.* \ | bin/carla.lv2/carla.* \ | ||||
@@ -1357,7 +1357,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||||
#ifdef CARLA_OS_LINUX | #ifdef CARLA_OS_LINUX | ||||
if (value != 0) | 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); | ::setenv("LD_PRELOAD", interposerPath.buffer(), 1); | ||||
} | } | ||||
else | else | ||||
@@ -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 $@ | $(CXX) $< $(SHARED) $(LINK_FLAGS) -ldl -o $@ | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- |