Browse Source

Build and install interposer by default

tags/1.9.5
falkTX 10 years ago
parent
commit
061cd920fd
3 changed files with 20 additions and 4 deletions
  1. +15
    -1
      Makefile
  2. +1
    -1
      source/backend/engine/CarlaEngine.cpp
  3. +4
    -2
      source/interposer/Makefile

+ 15
- 1
Makefile View File

@@ -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.* \


+ 1
- 1
source/backend/engine/CarlaEngine.cpp View File

@@ -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


+ 4
- 2
source/interposer/Makefile View File

@@ -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 $@

# --------------------------------------------------------------

Loading…
Cancel
Save