Browse Source

Split interposer into 2 separate libs

tags/1.9.6
falkTX 9 years ago
parent
commit
216192ca3a
4 changed files with 51 additions and 25 deletions
  1. +3
    -14
      Makefile
  2. +21
    -11
      source/interposer/Makefile
  3. +0
    -0
      source/interposer/interposer-safe.cpp
  4. +27
    -0
      source/interposer/interposer-x11.cpp

+ 3
- 14
Makefile View File

@@ -139,16 +139,13 @@ bridges-ui: libs
discovery: libs discovery: libs
@$(MAKE) -C source/discovery @$(MAKE) -C source/discovery


ifeq ($(LINUX),true)
interposer: interposer:
@$(MAKE) -C source/interposer @$(MAKE) -C source/interposer
else
interposer:
endif


plugin: backend bridges-plugin bridges-ui discovery plugin: backend bridges-plugin bridges-ui discovery
@$(MAKE) -C source/plugin @$(MAKE) -C source/plugin


# FIXME
ifeq ($(HAVE_QT),true) ifeq ($(HAVE_QT),true)
theme: theme:
@$(MAKE) -C source/theme @$(MAKE) -C source/theme
@@ -455,19 +452,11 @@ install:
# Install pkg-config file # Install pkg-config file
install -m 644 data/carla-standalone.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/ install -m 644 data/carla-standalone.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/


# Install backend
# Install backend libs
install -m 644 \ install -m 644 \
bin/libcarla_standalone2.* \
bin/libcarla_utils.* \
bin/libcarla_*.* \
$(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.* \


+ 21
- 11
source/interposer/Makefile View File

@@ -21,20 +21,20 @@ endif


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


BUILD_CXX_FLAGS += -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils
BUILD_CXX_FLAGS += -I$(CWD)/includes -I$(CWD)/utils


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


OBJS = $(OBJDIR)/interposer.cpp.o
OBJS =
TARGETS =


ifeq ($(LINUX),true) ifeq ($(LINUX),true)
TARGETS = $(BINDIR)/libcarla_interposer$(LIB_EXT)
else
TARGETS =
OBJS += $(OBJDIR)/interposer-safe.cpp.o
TARGETS += $(BINDIR)/libcarla_interposer-safe$(LIB_EXT)
ifeq ($(HAVE_X11),true)
OBJS += $(OBJDIR)/interposer-x11.cpp.o
TARGETS += $(BINDIR)/libcarla_interposer-x11$(LIB_EXT)
endif endif

ifeq ($(UNIX),true)
LINK_FLAGS += -ldl
endif endif


# ---------------------------------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------------------------------
@@ -51,18 +51,28 @@ debug:


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


$(BINDIR)/libcarla_interposer$(LIB_EXT): $(OBJS)
$(BINDIR)/libcarla_interposer-safe$(LIB_EXT): $(OBJDIR)/interposer-safe.cpp.o
-@mkdir -p $(BINDIR) -@mkdir -p $(BINDIR)
@echo "Linking libcarla_interposer$(LIB_EXT)"
@echo "Linking libcarla_interposer-safe$(LIB_EXT)"
@$(CXX) $< $(SHARED) $(LINK_FLAGS) -o $@ @$(CXX) $< $(SHARED) $(LINK_FLAGS) -o $@


$(BINDIR)/libcarla_interposer-x11$(LIB_EXT): $(OBJDIR)/interposer-x11.cpp.o
-@mkdir -p $(BINDIR)
@echo "Linking libcarla_interposer-x11$(LIB_EXT)"
@$(CXX) $< $(SHARED) $(LINK_FLAGS) $(X11_LIBS) -o $@

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


$(OBJDIR)/%.cpp.o: %.cpp
$(OBJDIR)/interposer-safe.cpp.o: interposer-safe.cpp
-@mkdir -p $(OBJDIR) -@mkdir -p $(OBJDIR)
@echo "Compiling $<" @echo "Compiling $<"
@$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@


$(OBJDIR)/interposer-x11.cpp.o: interposer-x11.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
@$(CXX) $< $(BUILD_CXX_FLAGS) $(X11_FLAGS) -c -o $@

-include $(OBJS:%.o=%.d) -include $(OBJS:%.o=%.d)


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

source/interposer/interposer.cpp → source/interposer/interposer-safe.cpp View File


+ 27
- 0
source/interposer/interposer-x11.cpp View File

@@ -0,0 +1,27 @@
/*
* Carla Interposer for X11
* Copyright (C) 2014-2015 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/

#include "CarlaUtils.hpp"

#include <X11/Xlib.h>

CARLA_EXPORT
int XMapWindow(Display* /*display*/, Window /*w*/)
{
carla_stdout("------------------------------- XMapWindow called");
return 0;
}

Loading…
Cancel
Save