@@ -495,16 +495,19 @@ endif | |||
# Adjust PREFIX, LIBDIR and INCLUDEDIR in pkg-config files | |||
sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc | |||
sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc | |||
sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \ | |||
$(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc | |||
@@ -775,6 +778,7 @@ install: install_main install_external_plugins | |||
uninstall: | |||
rm -f $(DESTDIR)$(BINDIR)/carla* | |||
rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc | |||
rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc | |||
rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc | |||
rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc | |||
@@ -0,0 +1,9 @@ | |||
prefix=X-PREFIX-X | |||
libdir=X-LIBDIR-X/carla | |||
includedir=X-INCLUDEDIR-X/carla | |||
Name: carla-host-plugin | |||
Version: 2.1.95 | |||
Description: Carla Host as Native Plugin | |||
Libs: -Wl,-rpath,${libdir} -L${libdir} -lcarla_host-plugin | |||
Cflags: -DREAL_BUILD -I${includedir} -I${includedir}/includes |
@@ -45,9 +45,11 @@ | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
// API | |||
#define CARLA_COMMON_NEED_CHECKSTRINGPTR | |||
#include "CarlaHostCommon.cpp" | |||
#undef CARLA_COMMON_NEED_CHECKSTRINGPTR | |||
#ifndef CARLA_PLUGIN_EXPORT | |||
# define CARLA_COMMON_NEED_CHECKSTRINGPTR | |||
# include "CarlaHostCommon.cpp" | |||
# undef CARLA_COMMON_NEED_CHECKSTRINGPTR | |||
#endif | |||
#ifdef USING_JUCE | |||
static void carla_juce_init(); | |||
@@ -2267,15 +2269,16 @@ const char* carla_get_host_osc_url_udp(CarlaHostHandle handle) | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
#define CARLA_PLUGIN_UI_CLASS_PREFIX Standalone | |||
#include "CarlaPluginUI.cpp" | |||
#undef CARLA_PLUGIN_UI_CLASS_PREFIX | |||
#include "CarlaDssiUtils.cpp" | |||
#include "CarlaMacUtils.cpp" | |||
#include "CarlaPatchbayUtils.cpp" | |||
#include "CarlaPipeUtils.cpp" | |||
#include "CarlaProcessUtils.cpp" | |||
#include "CarlaStateUtils.cpp" | |||
#ifndef CARLA_PLUGIN_EXPORT | |||
# define CARLA_PLUGIN_UI_CLASS_PREFIX Standalone | |||
# include "CarlaPluginUI.cpp" | |||
# undef CARLA_PLUGIN_UI_CLASS_PREFIX | |||
# include "CarlaDssiUtils.cpp" | |||
# include "CarlaMacUtils.cpp" | |||
# include "CarlaPatchbayUtils.cpp" | |||
# include "CarlaPipeUtils.cpp" | |||
# include "CarlaProcessUtils.cpp" | |||
# include "CarlaStateUtils.cpp" | |||
#endif | |||
// -------------------------------------------------------------------------------------------------------------------- |
@@ -176,6 +176,7 @@ WINE_LINK_FLAGS += -Wl,-rpath,/usr/lib/carla | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
TARGETS = \ | |||
$(BINDIR)/libcarla_host-plugin$(LIB_EXT) \ | |||
$(BINDIR)/libcarla_native-plugin$(LIB_EXT) | |||
# sometimes needed for testing: | |||
@@ -254,6 +255,13 @@ debug: | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
$(BINDIR)/libcarla_host-plugin$(LIB_EXT): $(OBJDIR)/carla-host-plugin.cpp.o $(OBJDIR)/carla-native-plugin.cpp.o $(LIBS) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking libcarla-host-plugin$(LIB_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(NATIVE_LINK_FLAGS) -o $@ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
$(BINDIR)/carla-native-plugin$(APP_EXT): $(OBJDIR)/carla-native-plugin.cpp.o $(LIBS) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking carla-native-plugin$(APP_EXT)" | |||
@@ -370,7 +378,7 @@ endif | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
$(OBJDIR)/carla-native-plugin.cpp.o: carla-native-plugin.cpp | |||
$(OBJDIR)/carla-%-plugin.cpp.o: carla-%-plugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $<" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||
@@ -498,6 +506,7 @@ $(OBJDIR)/carla-lv2-export.cpp.o: carla-lv2-export.cpp | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
-include $(OBJDIR)/carla-host-plugin.cpp.d | |||
-include $(OBJDIR)/carla-native-plugin.cpp.d | |||
-include $(OBJDIR)/carla-lv2.cpp.d | |||
-include $(OBJDIR)/carla-lv2-export.cpp.d | |||
@@ -0,0 +1,37 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2020 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 "water/files/File.h" | |||
// ------------------------------------------------------------------------------------------------------------------- | |||
// Always return a valid string ptr | |||
static const char* const gNullCharPtr = ""; | |||
static void checkStringPtr(const char*& charPtr) noexcept | |||
{ | |||
if (charPtr == nullptr) | |||
charPtr = gNullCharPtr; | |||
} | |||
// ------------------------------------------------------------------------------------------------------------------- | |||
// Include all standalone code | |||
#define CARLA_PLUGIN_EXPORT | |||
#include "CarlaStandalone.cpp" | |||
// ------------------------------------------------------------------------------------------------------------------- |