@@ -241,7 +241,7 @@ EXPAND_ONLY_PREDEF = NO | |||||
SEARCH_INCLUDES = YES | SEARCH_INCLUDES = YES | ||||
INCLUDE_PATH = | INCLUDE_PATH = | ||||
INCLUDE_FILE_PATTERNS = | INCLUDE_FILE_PATTERNS = | ||||
PREDEFINED = DOXYGEN BUILD_BRIDGE BUILD_BRIDGE_PLUGIN BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_LV2_GTK2 BRIDGE_LV2_GTK3 BRIDGE_LV2_QT4 BRIDGE_LV2_X11 BRIDGE_VST BRIDGE_VST_HWND BRIDGE_VST_X11 | |||||
PREDEFINED = DOXYGEN BUILD_BRIDGE BUILD_BRIDGE_PLUGIN BUILD_BRIDGE_UI BRIDGE_GTK2 BRIDGE_GTK3 BRIDGE_QT4 BRIDGE_X11 | |||||
EXPAND_AS_DEFINED = | EXPAND_AS_DEFINED = | ||||
SKIP_FUNCTION_MACROS = YES | SKIP_FUNCTION_MACROS = YES | ||||
#--------------------------------------------------------------------------- | #--------------------------------------------------------------------------- | ||||
@@ -1,533 +0,0 @@ | |||||
/* | |||||
* Carla Bridge UI, VST version | |||||
* Copyright (C) 2011-2014 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 "CarlaBridgeUI.hpp" | |||||
#include "CarlaVstUtils.hpp" | |||||
#include "CarlaMIDI.h" | |||||
CARLA_BRIDGE_START_NAMESPACE | |||||
// ------------------------------------------------------------------------- | |||||
// fake values | |||||
uint32_t bufferSize = 512; | |||||
double sampleRate = 44100.0; | |||||
class CarlaVstClient : public CarlaBridgeUI | |||||
{ | |||||
public: | |||||
CarlaVstClient() | |||||
: CarlaBridgeUI(), | |||||
unique1(0), | |||||
effect(nullptr), | |||||
needIdle(false), | |||||
unique2(1), | |||||
leakDetector_CarlaVstClient() | |||||
{ | |||||
// make client valid | |||||
srand((uint)(uintptr_t)uiTitle[0]); | |||||
unique1 = unique2 = rand(); | |||||
} | |||||
~CarlaVstClient() override | |||||
{ | |||||
// make client invalid | |||||
unique2 += 1; | |||||
} | |||||
// --------------------------------------------------------------------- | |||||
// ui initialization | |||||
bool uiInit(const char* binary, const char*, const char*) override | |||||
{ | |||||
// ----------------------------------------------------------------- | |||||
// init | |||||
CarlaBridgeUI::uiInit(binary, nullptr, nullptr); | |||||
// ----------------------------------------------------------------- | |||||
// open DLL | |||||
if (! uiLibOpen(binary)) | |||||
{ | |||||
carla_stderr("%s", uiLibError()); | |||||
return false; | |||||
} | |||||
// ----------------------------------------------------------------- | |||||
// get DLL main entry | |||||
VST_Function vstFn = uiLibSymbol<VST_Function>("VSTPluginMain"); | |||||
if (vstFn == nullptr) | |||||
vstFn = uiLibSymbol<VST_Function>("main"); | |||||
if (vstFn == nullptr) | |||||
return false; | |||||
// ----------------------------------------------------------------- | |||||
// initialize plugin | |||||
lastVstPlugin = this; | |||||
effect = vstFn(hostCallback); | |||||
lastVstPlugin = nullptr; | |||||
if (! (effect && effect->magic == kEffectMagic)) | |||||
return false; | |||||
// ----------------------------------------------------------------- | |||||
// initialize VST stuff | |||||
#ifdef VESTIGE_HEADER | |||||
effect->ptr1 = this; | |||||
#else | |||||
effect->resvd1 = ToVstPtr(this); | |||||
#endif | |||||
intptr_t value = 0; | |||||
#if defined(HAVE_X11) && defined(BRIDGE_X11) | |||||
value = (intptr_t)getContainerId2(); | |||||
#endif | |||||
effect->dispatcher(effect, effOpen, 0, 0, nullptr, 0.0f); | |||||
effect->dispatcher(effect, effMainsChanged, 0, 0, nullptr, 0.0f); | |||||
#if ! VST_FORCE_DEPRECATED | |||||
effect->dispatcher(effect, effSetBlockSizeAndSampleRate, 0, static_cast<intptr_t>(bufferSize), nullptr, static_cast<float>(sampleRate)); | |||||
#endif | |||||
effect->dispatcher(effect, effSetSampleRate, 0, 0, nullptr, static_cast<float>(sampleRate)); | |||||
effect->dispatcher(effect, effSetBlockSize, 0, static_cast<intptr_t>(bufferSize), nullptr, 0.0f); | |||||
effect->dispatcher(effect, effSetProcessPrecision, 0, kVstProcessPrecision32, nullptr, 0.0f); | |||||
if (effect->dispatcher(effect, effEditOpen, 0, value, getContainerId(), 0.0f) != 1) | |||||
{ | |||||
//effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f); | |||||
//return false; | |||||
carla_stderr("VST UI failed to open, trying to init anyway..."); | |||||
} | |||||
// ----------------------------------------------------------------- | |||||
// initialize gui stuff | |||||
ERect* vstRect = nullptr; | |||||
effect->dispatcher(effect, effEditGetRect, 0, 0, &vstRect, 0.0f); | |||||
if (vstRect) | |||||
{ | |||||
int width = vstRect->right - vstRect->left; | |||||
int height = vstRect->bottom - vstRect->top; | |||||
if (width > 0 && height > 0) | |||||
toolkitResize(width, height); | |||||
} | |||||
return true; | |||||
} | |||||
void uiIdle() override | |||||
{ | |||||
if (needIdle) | |||||
effect->dispatcher(effect, effIdle, 0, 0, nullptr, 0.0f); | |||||
effect->dispatcher(effect, effEditIdle, 0, 0, nullptr, 0.0f); | |||||
} | |||||
void uiClose() override | |||||
{ | |||||
if (effect != nullptr) | |||||
{ | |||||
effect->dispatcher(effect, effEditClose, 0, 0, nullptr, 0.0f); | |||||
effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f); | |||||
effect = nullptr; | |||||
} | |||||
CarlaBridgeUI::uiClose(); | |||||
uiLibClose(); | |||||
} | |||||
// --------------------------------------------------------------------- | |||||
// ui management | |||||
void* getWidget() const override | |||||
{ | |||||
return nullptr; // VST always uses reparent | |||||
} | |||||
bool isResizable() const override | |||||
{ | |||||
return false; | |||||
} | |||||
// --------------------------------------------------------------------- | |||||
// ui processing | |||||
void setParameter(const int32_t rindex, const float value) override | |||||
{ | |||||
if (effect != nullptr) | |||||
effect->setParameter(effect, rindex, value); | |||||
} | |||||
void setProgram(const uint32_t index) override | |||||
{ | |||||
if (effect != nullptr) | |||||
effect->dispatcher(effect, effSetProgram, 0, static_cast<intptr_t>(index), nullptr, 0.0f); | |||||
} | |||||
void setMidiProgram(const uint32_t, const uint32_t) override | |||||
{ | |||||
} | |||||
void noteOn(const uint8_t, const uint8_t, const uint8_t) override | |||||
{ | |||||
} | |||||
void noteOff(const uint8_t, const uint8_t) override | |||||
{ | |||||
} | |||||
// --------------------------------------------------------------------- | |||||
void handleAudioMasterAutomate(const uint32_t index, const float value) | |||||
{ | |||||
effect->setParameter(effect, static_cast<int32_t>(index), value); | |||||
if (isOscControlRegistered()) | |||||
sendOscControl(static_cast<int32_t>(index), value); | |||||
} | |||||
void handleAudioMasterNeedIdle() | |||||
{ | |||||
needIdle = true; | |||||
} | |||||
intptr_t handleAudioMasterProcessEvents(const VstEvents* const vstEvents) | |||||
{ | |||||
if (isOscControlRegistered()) | |||||
return 1; | |||||
for (int32_t i=0; i < vstEvents->numEvents; ++i) | |||||
{ | |||||
if (! vstEvents->events[i]) | |||||
break; | |||||
const VstMidiEvent* const vstMidiEvent = (const VstMidiEvent*)vstEvents->events[i]; | |||||
if (vstMidiEvent->type != kVstMidiType) | |||||
{ | |||||
uint8_t status = uint8_t(vstMidiEvent->midiData[0]); | |||||
// Fix bad note-off | |||||
if (MIDI_IS_STATUS_NOTE_ON(status) && vstMidiEvent->midiData[2] == 0) | |||||
status = uint8_t(status - 0x10); | |||||
uint8_t midiBuf[4] = { 0, status, uint8_t(vstMidiEvent->midiData[1]), uint8_t(vstMidiEvent->midiData[2]) }; | |||||
sendOscMidi(midiBuf); | |||||
} | |||||
} | |||||
return 1; | |||||
} | |||||
intptr_t handleAdioMasterSizeWindow(int32_t width, int32_t height) | |||||
{ | |||||
toolkitResize(width, height); | |||||
return 1; | |||||
} | |||||
void handleAudioMasterUpdateDisplay() | |||||
{ | |||||
if (isOscControlRegistered()) | |||||
sendOscConfigure("reloadprograms", ""); | |||||
} | |||||
// --------------------------------------------------------------------- | |||||
static intptr_t hostCanDo(const char* const feature) | |||||
{ | |||||
carla_debug("CarlaVstClient::hostCanDo(\"%s\")", feature); | |||||
if (std::strcmp(feature, "supplyIdle") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "sendVstEvents") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "sendVstMidiEvent") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "sendVstMidiEventFlagIsRealtime") == 0) | |||||
return -1; | |||||
if (std::strcmp(feature, "sendVstTimeInfo") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "receiveVstEvents") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "receiveVstMidiEvent") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "receiveVstTimeInfo") == 0) | |||||
return -1; | |||||
if (std::strcmp(feature, "reportConnectionChanges") == 0) | |||||
return -1; | |||||
if (std::strcmp(feature, "acceptIOChanges") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "sizeWindow") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "offline") == 0) | |||||
return -1; | |||||
if (std::strcmp(feature, "openFileSelector") == 0) | |||||
return -1; | |||||
if (std::strcmp(feature, "closeFileSelector") == 0) | |||||
return -1; | |||||
if (std::strcmp(feature, "startStopProcess") == 0) | |||||
return 1; | |||||
if (std::strcmp(feature, "supportShell") == 0) | |||||
return -1; | |||||
if (std::strcmp(feature, "shellCategory") == 0) | |||||
return -1; | |||||
// unimplemented | |||||
carla_stderr("CarlaVstClient::hostCanDo(\"%s\") - unknown feature", feature); | |||||
return 0; | |||||
} | |||||
static intptr_t VSTCALLBACK hostCallback(AEffect* const effect, const int32_t opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) | |||||
{ | |||||
#ifdef DEBUG | |||||
carla_debug("CarlaVstClient::hostCallback(%p, %s, %i, " P_INTPTR ", %p, %f", effect, vstMasterOpcode2str(opcode), index, value, ptr, opt); | |||||
#endif | |||||
// Check if 'resvd1' points to this client, or register ourselfs if possible | |||||
CarlaVstClient* self = nullptr; | |||||
if (effect) | |||||
{ | |||||
#ifdef VESTIGE_HEADER | |||||
if (effect && effect->ptr1) | |||||
{ | |||||
self = (CarlaVstClient*)effect->ptr1; | |||||
#else | |||||
if (effect && effect->resvd1) | |||||
{ | |||||
self = FromVstPtr<CarlaVstClient>(effect->resvd1); | |||||
#endif | |||||
if (self->unique1 != self->unique2) | |||||
self = nullptr; | |||||
} | |||||
if (self != nullptr) | |||||
{ | |||||
if (! self->effect) | |||||
self->effect = effect; | |||||
CARLA_ASSERT(self->effect == effect); | |||||
if (self->effect != effect) | |||||
{ | |||||
carla_stderr("CarlaVstClient::hostCallback() - host pointer mismatch: %p != %p", self->effect, effect); | |||||
self = nullptr; | |||||
} | |||||
} | |||||
else if (lastVstPlugin) | |||||
{ | |||||
#ifdef VESTIGE_HEADER | |||||
effect->ptr1 = lastVstPlugin; | |||||
#else | |||||
effect->resvd1 = ToVstPtr(lastVstPlugin); | |||||
#endif | |||||
self = lastVstPlugin; | |||||
} | |||||
} | |||||
intptr_t ret = 0; | |||||
switch (opcode) | |||||
{ | |||||
case audioMasterAutomate: | |||||
if (self != nullptr && index >= 0) | |||||
self->handleAudioMasterAutomate(static_cast<uint32_t>(index), opt); | |||||
break; | |||||
case audioMasterVersion: | |||||
ret = kVstVersion; | |||||
break; | |||||
case audioMasterCurrentId: | |||||
// TODO | |||||
break; | |||||
case audioMasterIdle: | |||||
//if (effect) | |||||
// effect->dispatcher(effect, effEditIdle, 0, 0, nullptr, 0.0f); | |||||
break; | |||||
case audioMasterGetTime: | |||||
static VstTimeInfo vstTimeInfo; | |||||
carla_zeroStruct(vstTimeInfo); | |||||
vstTimeInfo.sampleRate = sampleRate; | |||||
// Tempo | |||||
vstTimeInfo.tempo = 120.0; | |||||
vstTimeInfo.flags |= kVstTempoValid; | |||||
// Time Signature | |||||
vstTimeInfo.timeSigNumerator = 4; | |||||
vstTimeInfo.timeSigDenominator = 4; | |||||
vstTimeInfo.flags |= kVstTimeSigValid; | |||||
ret = (intptr_t)&vstTimeInfo; | |||||
break; | |||||
case audioMasterProcessEvents: | |||||
if (self != nullptr && ptr != nullptr) | |||||
ret = self->handleAudioMasterProcessEvents((const VstEvents*)ptr); | |||||
break; | |||||
#if ! VST_FORCE_DEPRECATED | |||||
case audioMasterTempoAt: | |||||
// Deprecated in VST SDK 2.4 | |||||
ret = 120 * 10000; | |||||
break; | |||||
#endif | |||||
case audioMasterSizeWindow: | |||||
if (self != nullptr && index > 0 && value > 0) | |||||
ret = self->handleAdioMasterSizeWindow(index, static_cast<int32_t>(value)); | |||||
break; | |||||
case audioMasterGetSampleRate: | |||||
ret = static_cast<intptr_t>(sampleRate); | |||||
break; | |||||
case audioMasterGetBlockSize: | |||||
ret = static_cast<intptr_t>(bufferSize); | |||||
break; | |||||
case audioMasterGetCurrentProcessLevel: | |||||
ret = kVstProcessLevelUser; | |||||
break; | |||||
case audioMasterGetAutomationState: | |||||
ret = kVstAutomationReadWrite; | |||||
break; | |||||
case audioMasterGetVendorString: | |||||
if (ptr != nullptr) | |||||
std::strcpy((char*)ptr, "falkTX"); | |||||
break; | |||||
case audioMasterGetProductString: | |||||
if (ptr != nullptr) | |||||
std::strcpy((char*)ptr, "Carla-Bridge"); | |||||
break; | |||||
case audioMasterGetVendorVersion: | |||||
ret = 0x110; // 1.1.0 | |||||
break; | |||||
case audioMasterCanDo: | |||||
if (ptr != nullptr) | |||||
ret = hostCanDo((const char*)ptr); | |||||
break; | |||||
case audioMasterGetLanguage: | |||||
ret = kVstLangEnglish; | |||||
break; | |||||
case audioMasterUpdateDisplay: | |||||
if (self != nullptr) | |||||
self->handleAudioMasterUpdateDisplay(); | |||||
break; | |||||
default: | |||||
#ifdef DEBUG | |||||
carla_debug("CarlaVstClient::hostCallback(%p, %s, %i, " P_INTPTR ", %p, %f", effect, vstMasterOpcode2str(opcode), index, value, ptr, opt); | |||||
#endif | |||||
break; | |||||
} | |||||
return ret; | |||||
} | |||||
private: | |||||
int unique1; | |||||
AEffect* effect; | |||||
bool needIdle; | |||||
static CarlaVstClient* lastVstPlugin; | |||||
int unique2; | |||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaVstClient) | |||||
}; | |||||
CarlaVstClient* CarlaVstClient::lastVstPlugin = nullptr; | |||||
// ------------------------------------------------------------------------- | |||||
CARLA_BRIDGE_END_NAMESPACE | |||||
int main(int argc, char* argv[]) | |||||
{ | |||||
CARLA_BRIDGE_USE_NAMESPACE | |||||
if (argc != 4) | |||||
{ | |||||
carla_stderr("usage: %s <osc-url|\"null\"> <binary> <ui-title>", argv[0]); | |||||
return 1; | |||||
} | |||||
const char* oscUrl = argv[1]; | |||||
const char* binary = argv[2]; | |||||
const char* uiTitle = argv[3]; | |||||
const bool useOsc = std::strcmp(oscUrl, "null"); | |||||
// try to get sampleRate value | |||||
if (const char* const sampleRateStr = std::getenv("CARLA_SAMPLE_RATE")) | |||||
sampleRate = std::atof(sampleRateStr); | |||||
// Init VST client | |||||
CarlaVstClient client(uiTitle); | |||||
// Init OSC | |||||
if (useOsc) | |||||
{ | |||||
client.oscInit(oscUrl); | |||||
client.sendOscUpdate(); | |||||
} | |||||
// Load UI | |||||
int ret; | |||||
if (client.uiInit(binary, nullptr, nullptr)) | |||||
{ | |||||
client.toolkitExec(!useOsc); | |||||
ret = 0; | |||||
} | |||||
else | |||||
{ | |||||
carla_stderr("Failed to load VST UI"); | |||||
ret = 1; | |||||
} | |||||
// Close OSC | |||||
if (useOsc) | |||||
client.oscClose(); | |||||
// Close VST client | |||||
client.uiClose(); | |||||
return ret; | |||||
} |
@@ -20,11 +20,9 @@ | |||||
#include "CarlaBase64Utils.hpp" | #include "CarlaBase64Utils.hpp" | ||||
#ifdef BRIDGE_LV2 | |||||
# undef NULL | |||||
# define NULL nullptr | |||||
# include "lv2/atom-util.h" | |||||
#endif | |||||
#undef NULL | |||||
#define NULL nullptr | |||||
#include "lv2/atom-util.h" | |||||
CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
@@ -173,7 +171,6 @@ bool CarlaBridgeUI::msgReceived(const char* const msg) noexcept | |||||
dspNoteReceived(onOff, channel, note, velocity); | dspNoteReceived(onOff, channel, note, velocity); | ||||
} | } | ||||
#ifdef BRIDGE_LV2 | |||||
if (std::strcmp(msg, "atom") == 0) | if (std::strcmp(msg, "atom") == 0) | ||||
{ | { | ||||
uint32_t index, size; | uint32_t index, size; | ||||
@@ -208,7 +205,6 @@ bool CarlaBridgeUI::msgReceived(const char* const msg) noexcept | |||||
delete[] uri; | delete[] uri; | ||||
return true; | return true; | ||||
} | } | ||||
#endif | |||||
if (std::strcmp(msg, "uiOptions") == 0) | if (std::strcmp(msg, "uiOptions") == 0) | ||||
{ | { | ||||
@@ -23,10 +23,8 @@ | |||||
#include "CarlaPipeUtils.hpp" | #include "CarlaPipeUtils.hpp" | ||||
#include "CarlaString.hpp" | #include "CarlaString.hpp" | ||||
#ifdef BRIDGE_LV2 | |||||
# include "lv2/atom.h" | |||||
# include "lv2/urid.h" | |||||
#endif | |||||
#include "lv2/atom.h" | |||||
#include "lv2/urid.h" | |||||
//#include "CarlaBridgeToolkit.hpp" | //#include "CarlaBridgeToolkit.hpp" | ||||
//#include "CarlaLibUtils.hpp" | //#include "CarlaLibUtils.hpp" | ||||
@@ -70,10 +68,8 @@ protected: | |||||
virtual void dspStateChanged(const char* const key, const char* const value) = 0; | virtual void dspStateChanged(const char* const key, const char* const value) = 0; | ||||
virtual void dspNoteReceived(const bool onOff, const uint8_t channel, const uint8_t note, const uint8_t velocity) = 0; | virtual void dspNoteReceived(const bool onOff, const uint8_t channel, const uint8_t note, const uint8_t velocity) = 0; | ||||
#ifdef BRIDGE_LV2 | |||||
virtual void dspAtomReceived(const uint32_t index, const LV2_Atom* const atom) = 0; | virtual void dspAtomReceived(const uint32_t index, const LV2_Atom* const atom) = 0; | ||||
virtual void dspURIDReceived(const LV2_URID urid, const char* const uri) = 0; | virtual void dspURIDReceived(const LV2_URID urid, const char* const uri) = 0; | ||||
#endif | |||||
virtual void uiOptionsChanged(const bool useTheme, const bool useThemeColors, const char* const windowTitle, uintptr_t transientWindowId) = 0; | virtual void uiOptionsChanged(const bool useTheme, const bool useThemeColors, const char* const windowTitle, uintptr_t transientWindowId) = 0; | ||||
@@ -22,47 +22,36 @@ endif | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||||
BUILD_LV2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_LV2 | |||||
BUILD_VST2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_VST2 | |||||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||||
BUILD_VST2_FLAGS += -DVESTIGE_HEADER | |||||
endif | |||||
LINK_FLAGS += $(JUCE_CORE_LIBS) | |||||
BUILD_CXX_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_UI -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||||
LINK_FLAGS += $(JUCE_CORE_LIBS) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
BUILD_LV2_GTK2_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0) | |||||
LINK_LV2_GTK2_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-2.0) -ldl | |||||
BUILD_GTK2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_GTK2 $(shell pkg-config --cflags gtk+-2.0) | |||||
LINK_GTK2_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-2.0) -ldl | |||||
BUILD_LV2_GTK3_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0) | |||||
LINK_LV2_GTK3_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-3.0) -ldl | |||||
BUILD_GTK3_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_GTK3 $(shell pkg-config --cflags gtk+-3.0) | |||||
LINK_GTK3_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-3.0) -ldl | |||||
BUILD_LV2_QT4_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui) -I$(OBJDIR) -I$(CWD)/theme | |||||
LINK_LV2_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl | |||||
BUILD_QT4_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_QT4 $(shell pkg-config --cflags QtCore QtGui) -I$(OBJDIR) -I$(CWD)/theme | |||||
LINK_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl | |||||
BUILD_LV2_QT5_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) -I$(OBJDIR) -I$(CWD)/theme | |||||
LINK_LV2_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl | |||||
BUILD_QT5_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) -I$(OBJDIR) -I$(CWD)/theme | |||||
LINK_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl | |||||
BUILD_LV2_X11_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 $(X11_FLAGS) | |||||
LINK_LV2_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) -ldl | |||||
BUILD_X11_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_X11 $(X11_FLAGS) | |||||
LINK_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) -ldl | |||||
BUILD_LV2_COCOA_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA -ObjC++ | |||||
LINK_LV2_COCOA_FLAGS = $(LINK_FLAGS) -framework Cocoa -framework IOKit -framework QuartzCore -ldl | |||||
BUILD_COCOA_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_COCOA -ObjC++ | |||||
LINK_COCOA_FLAGS = $(LINK_FLAGS) -framework Cocoa -framework IOKit -framework QuartzCore -ldl | |||||
BUILD_LV2_WINDOWS_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND | |||||
LINK_LV2_WINDOWS_FLAGS = $(LINK_FLAGS) -static -mwindows | |||||
BUILD_VST2_X11_FLAGS = $(BUILD_VST2_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST2_X11 $(X11_FLAGS) | |||||
LINK_VST2_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) -ldl | |||||
BUILD_WINDOWS_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_HWND | |||||
LINK_WINDOWS_FLAGS = $(LINK_FLAGS) -static -mwindows | |||||
ifeq ($(LINUX),true) | ifeq ($(LINUX),true) | ||||
LINK_LV2_GTK2_FLAGS += -lX11 | |||||
LINK_LV2_GTK3_FLAGS += -lX11 | |||||
LINK_LV2_QT4_FLAGS += -lX11 | |||||
LINK_GTK2_FLAGS += -lX11 | |||||
LINK_GTK3_FLAGS += -lX11 | |||||
LINK_QT4_FLAGS += -lX11 | |||||
endif | endif | ||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
@@ -90,7 +79,6 @@ endif | |||||
ifeq ($(HAVE_X11),true) | ifeq ($(HAVE_X11),true) | ||||
TARGETS += ui_lv2-x11 | TARGETS += ui_lv2-x11 | ||||
TARGETS += ui_vst2-x11 | |||||
endif | endif | ||||
ifeq ($(MACOS),true) | ifeq ($(MACOS),true) | ||||
@@ -109,7 +97,7 @@ all: $(TARGETS) | |||||
clean: | clean: | ||||
rm -f $(OBJDIR)/*.cpp $(OBJDIR)/*.moc $(OBJDIR)/*.o | rm -f $(OBJDIR)/*.cpp $(OBJDIR)/*.moc $(OBJDIR)/*.o | ||||
rm -f $(BINDIR)/$(MODULENAME)-lv2-* $(BINDIR)/$(MODULENAME)-vst2-* | |||||
rm -f $(BINDIR)/$(MODULENAME)-lv2-* | |||||
debug: | debug: | ||||
$(MAKE) DEBUG=true | $(MAKE) DEBUG=true | ||||
@@ -126,100 +114,91 @@ ui_lv2-qt5: $(BINDIR)/$(MODULENAME)-lv2-qt5 | |||||
ui_lv2-x11: $(BINDIR)/$(MODULENAME)-lv2-x11 | ui_lv2-x11: $(BINDIR)/$(MODULENAME)-lv2-x11 | ||||
ui_lv2-cocoa: $(BINDIR)/$(MODULENAME)-lv2-cocoa | ui_lv2-cocoa: $(BINDIR)/$(MODULENAME)-lv2-cocoa | ||||
ui_lv2-windows: $(BINDIR)/$(MODULENAME)-lv2-windows.exe | ui_lv2-windows: $(BINDIR)/$(MODULENAME)-lv2-windows.exe | ||||
ui_vst2-x11: #$(BINDIR)/$(MODULENAME)-vst2-x11 | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# Common libs | # Common libs | ||||
LIBS_LV2 = \ | |||||
LIBS = \ | |||||
$(MODULEDIR)/juce_core.a \ | $(MODULEDIR)/juce_core.a \ | ||||
$(MODULEDIR)/lilv.a | $(MODULEDIR)/lilv.a | ||||
LIBS_LV2_JUCE = \ | |||||
$(LIBS_LV2) \ | |||||
LIBS_JUCE = \ | |||||
$(LIBS) \ | |||||
$(MODULEDIR)/juce_data_structures.a \ | $(MODULEDIR)/juce_data_structures.a \ | ||||
$(MODULEDIR)/juce_events.a \ | $(MODULEDIR)/juce_events.a \ | ||||
$(MODULEDIR)/juce_graphics.a \ | $(MODULEDIR)/juce_graphics.a \ | ||||
$(MODULEDIR)/juce_gui_basics.a | $(MODULEDIR)/juce_gui_basics.a | ||||
ifeq ($(MACOS),true) | ifeq ($(MACOS),true) | ||||
LIBS_LV2_JUCE += \ | |||||
LIBS_JUCE += \ | |||||
$(MODULEDIR)/juce_gui_extra.a | $(MODULEDIR)/juce_gui_extra.a | ||||
endif | endif | ||||
LIBS_VST2 = \ | |||||
$(MODULEDIR)/juce_core.a | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# Common objects | # Common objects | ||||
$(OBJDIR)/%.cpp.lv2.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | |||||
@echo "Compiling $< (LV2)" | |||||
@$(CXX) $< $(BUILD_LV2_FLAGS) -c -o $@ | |||||
$(OBJDIR)/%.cpp.vst2.o: %.cpp | |||||
$(OBJDIR)/%.cpp.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (VST2)" | |||||
@$(CXX) $< $(BUILD_VST2_FLAGS) -c -o $@ | |||||
@echo "Compiling $<" | |||||
@$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# ui_lv2-gtk2 | # ui_lv2-gtk2 | ||||
OBJS_LV2_GTK2 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.lv2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-gtk2.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitGtk.cpp.lv2-gtk2.o | |||||
OBJS_GTK2 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp-gtk2.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitGtk.cpp-gtk2.o | |||||
$(BINDIR)/$(MODULENAME)-lv2-gtk2: $(OBJS_LV2_GTK2) $(LIBS_LV2) | |||||
$(BINDIR)/$(MODULENAME)-lv2-gtk2: $(OBJS_GTK2) $(LIBS) | |||||
-@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
@echo "Linking $(MODULENAME)-lv2-gtk2" | @echo "Linking $(MODULENAME)-lv2-gtk2" | ||||
@$(CXX) $(OBJS_LV2_GTK2) $(LIBS_START) $(LIBS_LV2) $(LIBS_END) $(LINK_LV2_GTK2_FLAGS) -o $@ | |||||
@$(CXX) $(OBJS_GTK2) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_GTK2_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.lv2-gtk2.o: %.cpp | |||||
$(OBJDIR)/%.cpp-gtk2.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (LV2-GTK2)" | |||||
@$(CXX) $< $(BUILD_LV2_GTK2_FLAGS) -c -o $@ | |||||
@echo "Compiling $< (GTK2)" | |||||
@$(CXX) $< $(BUILD_GTK2_FLAGS) -c -o $@ | |||||
-include $(OBJS_LV2_GTK2:%.o=%.d) | |||||
-include $(OBJS_GTK2:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# ui_lv2-gtk3 | # ui_lv2-gtk3 | ||||
OBJS_LV2_GTK3 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.lv2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-gtk3.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitGtk.cpp.lv2-gtk3.o | |||||
OBJS_GTK3 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp-gtk3.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitGtk.cpp-gtk3.o | |||||
$(BINDIR)/$(MODULENAME)-lv2-gtk3: $(OBJS_LV2_GTK3) $(LIBS_LV2) | |||||
$(BINDIR)/$(MODULENAME)-lv2-gtk3: $(OBJS_GTK3) $(LIBS) | |||||
-@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
@echo "Linking $(MODULENAME)-lv2-gtk3" | @echo "Linking $(MODULENAME)-lv2-gtk3" | ||||
@$(CXX) $(OBJS_LV2_GTK3) $(LIBS_START) $(LIBS_LV2) $(LIBS_END) $(LINK_LV2_GTK3_FLAGS) -o $@ | |||||
@$(CXX) $(OBJS_GTK3) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_GTK3_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.lv2-gtk3.o: %.cpp | |||||
$(OBJDIR)/%.cpp-gtk3.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (LV2-GTK3)" | |||||
@$(CXX) $< $(BUILD_LV2_GTK3_FLAGS) -c -o $@ | |||||
@echo "Compiling $< (GTK3)" | |||||
@$(CXX) $< $(BUILD_GTK3_FLAGS) -c -o $@ | |||||
-include $(OBJS_LV2_GTK3:%.o=%.d) | |||||
-include $(OBJS_GTK3:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# ui_lv2-qt4 | # ui_lv2-qt4 | ||||
OBJS_LV2_QT4 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.lv2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-qt4.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitQt.cpp.lv2-qt4.o | |||||
OBJS_QT4 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp-qt4.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitQt.cpp-qt4.o | |||||
$(BINDIR)/$(MODULENAME)-lv2-qt4: $(OBJS_LV2_QT4) $(LIBS_LV2) $(MODULEDIR)/theme.qt4.a | |||||
$(BINDIR)/$(MODULENAME)-lv2-qt4: $(OBJS_QT4) $(LIBS) $(MODULEDIR)/theme.qt4.a | |||||
-@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
@echo "Linking $(MODULENAME)-lv2-qt4" | @echo "Linking $(MODULENAME)-lv2-qt4" | ||||
@$(CXX) $(OBJS_LV2_QT4) $(LIBS_START) $(LIBS_LV2) $(MODULEDIR)/theme.qt4.a $(LIBS_END) $(LINK_LV2_QT4_FLAGS) -o $@ | |||||
@$(CXX) $(OBJS_QT4) $(LIBS_START) $(LIBS) $(MODULEDIR)/theme.qt4.a $(LIBS_END) $(LINK_QT4_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.lv2-qt4.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt4.moc $(OBJDIR)/resources.qt4.cpp | |||||
$(OBJDIR)/%.cpp-qt4.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt4.moc $(OBJDIR)/resources.qt4.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (LV2-QT4)" | |||||
@$(CXX) $< $(BUILD_LV2_QT4_FLAGS) -c -o $@ | |||||
@echo "Compiling $< (QT4)" | |||||
@$(CXX) $< $(BUILD_QT4_FLAGS) -c -o $@ | |||||
$(OBJDIR)/CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp | $(OBJDIR)/CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp | ||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@@ -231,25 +210,25 @@ $(OBJDIR)/resources.qt4.cpp: ../../resources/resources-theme.qrc | |||||
@echo "Generating resources.qt4.cpp" | @echo "Generating resources.qt4.cpp" | ||||
@$(RCC_QT4) $< -o $@ | @$(RCC_QT4) $< -o $@ | ||||
-include $(OBJS_LV2_QT4:%.o=%.d) | |||||
-include $(OBJS_QT4:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# ui_lv2-qt5 | # ui_lv2-qt5 | ||||
OBJS_LV2_QT5 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.lv2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-qt5.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitQt.cpp.lv2-qt5.o | |||||
OBJS_QT5 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp-qt5.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitQt.cpp-qt5.o | |||||
$(BINDIR)/$(MODULENAME)-lv2-qt5: $(OBJS_LV2_QT5) $(LIBS_LV2) $(MODULEDIR)/theme.qt5.a | |||||
$(BINDIR)/$(MODULENAME)-lv2-qt5: $(OBJS_QT5) $(LIBS) $(MODULEDIR)/theme.qt5.a | |||||
-@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
@echo "Linking $(MODULENAME)-lv2-qt5" | @echo "Linking $(MODULENAME)-lv2-qt5" | ||||
@$(CXX) $(OBJS_LV2_QT5) $(LIBS_START) $(LIBS_LV2) $(MODULEDIR)/theme.qt5.a $(LIBS_END) $(LINK_LV2_QT5_FLAGS) -o $@ | |||||
@$(CXX) $(OBJS_QT5) $(LIBS_START) $(LIBS) $(MODULEDIR)/theme.qt5.a $(LIBS_END) $(LINK_QT5_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.lv2-qt5.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt5.moc $(OBJDIR)/resources.qt5.cpp | |||||
$(OBJDIR)/%.cpp-qt5.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt5.moc $(OBJDIR)/resources.qt5.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (LV2-QT5)" | |||||
@$(CXX) $< $(BUILD_LV2_QT5_FLAGS) -c -o $@ | |||||
@echo "Compiling $< (QT5)" | |||||
@$(CXX) $< $(BUILD_QT5_FLAGS) -c -o $@ | |||||
$(OBJDIR)/CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp | $(OBJDIR)/CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp | ||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@@ -261,86 +240,66 @@ $(OBJDIR)/resources.qt5.cpp: ../../resources/resources-theme.qrc | |||||
@echo "Generating resources.qt5.cpp" | @echo "Generating resources.qt5.cpp" | ||||
@$(RCC_QT5) $< -o $@ | @$(RCC_QT5) $< -o $@ | ||||
-include $(OBJS_LV2_QT5:%.o=%.d) | |||||
-include $(OBJS_QT5:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# ui_lv2-x11 | # ui_lv2-x11 | ||||
OBJS_LV2_X11 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.lv2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-x11.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.lv2-x11.o | |||||
OBJS_X11 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp-x11.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp-x11.o | |||||
$(BINDIR)/$(MODULENAME)-lv2-x11: $(OBJS_LV2_X11) $(LIBS_LV2) | |||||
$(BINDIR)/$(MODULENAME)-lv2-x11: $(OBJS_X11) $(LIBS) | |||||
-@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
@echo "Linking $(MODULENAME)-lv2-x11" | @echo "Linking $(MODULENAME)-lv2-x11" | ||||
@$(CXX) $(OBJS_LV2_X11) $(LIBS_START) $(LIBS_LV2) $(LIBS_END) $(LINK_LV2_X11_FLAGS) -o $@ | |||||
@$(CXX) $(OBJS_X11) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_X11_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.lv2-x11.o: %.cpp | |||||
$(OBJDIR)/%.cpp-x11.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (LV2-X11)" | |||||
@$(CXX) $< $(BUILD_LV2_X11_FLAGS) -c -o $@ | |||||
@echo "Compiling $< (X11)" | |||||
@$(CXX) $< $(BUILD_X11_FLAGS) -c -o $@ | |||||
-include $(OBJS_LV2_X11:%.o=%.d) | |||||
-include $(OBJS_X11:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# ui_lv2-cocoa | # ui_lv2-cocoa | ||||
OBJS_LV2_COCOA = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.lv2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-cocoa.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.lv2-cocoa.o | |||||
OBJS_COCOA = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp-cocoa.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp-cocoa.o | |||||
$(BINDIR)/$(MODULENAME)-lv2-cocoa: $(OBJS_LV2_COCOA) $(LIBS_LV2_JUCE) | |||||
$(BINDIR)/$(MODULENAME)-lv2-cocoa: $(OBJS_COCOA) $(LIBS_JUCE) | |||||
-@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
@echo "Linking $(MODULENAME)-lv2-cocoa" | @echo "Linking $(MODULENAME)-lv2-cocoa" | ||||
@$(CXX) $(OBJS_LV2_COCOA) $(LIBS_START) $(LIBS_LV2_JUCE) $(LIBS_END) $(LINK_LV2_COCOA_FLAGS) -o $@ | |||||
@$(CXX) $(OBJS_COCOA) $(LIBS_START) $(LIBS_JUCE) $(LIBS_END) $(LINK_COCOA_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.lv2-cocoa.o: %.cpp | |||||
$(OBJDIR)/%.cpp-cocoa.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (LV2-Cocoa)" | |||||
@$(CXX) $< $(BUILD_LV2_COCOA_FLAGS) -c -o $@ | |||||
@echo "Compiling $< (Cocoa)" | |||||
@$(CXX) $< $(BUILD_COCOA_FLAGS) -c -o $@ | |||||
-include $(OBJS_LV2_COCOA:%.o=%.d) | |||||
-include $(OBJS_COCOA:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
# ui_lv2-windows | # ui_lv2-windows | ||||
OBJS_LV2_WINDOWS = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.lv2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-windows.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.lv2-windows.o | |||||
OBJS_WINDOWS = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp-windows.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp-windows.o | |||||
$(BINDIR)/$(MODULENAME)-lv2-windows.exe: $(OBJS_LV2_WINDOWS) $(LIBS_LV2_JUCE) | |||||
$(BINDIR)/$(MODULENAME)-lv2-windows.exe: $(OBJS_WINDOWS) $(LIBS_JUCE) | |||||
-@mkdir -p $(BINDIR) | -@mkdir -p $(BINDIR) | ||||
@echo "Linking $(MODULENAME)-lv2-windows.exe" | @echo "Linking $(MODULENAME)-lv2-windows.exe" | ||||
@$(CXX) $(OBJS_LV2_WINDOWS) $(LIBS_START) $(LIBS_LV2_JUCE) $(LIBS_END) $(LINK_LV2_WINDOWS_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.lv2-windows.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | |||||
@echo "Compiling $< (LV2-Windows)" | |||||
@$(CXX) $< $(BUILD_LV2_WINDOWS_FLAGS) -c -o $@ | |||||
-include $(OBJS_LV2_WINDOWS:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | |||||
# ui_vst2-x11 | |||||
OBJS_VST2_X11 = \ | |||||
$(OBJDIR)/CarlaBridgeUI.cpp.vst2.o \ | |||||
$(OBJDIR)/CarlaBridgeUI-VST2.cpp.vst2-x11.o \ | |||||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.vst2-x11.o | |||||
$(BINDIR)/$(MODULENAME)-vst2-x11: $(OBJS_VST2_X11) $(LIBS_VST2) | |||||
-@mkdir -p $(BINDIR) | |||||
@echo "Linking $(MODULENAME)-vst2-x11" | |||||
@$(CXX) $(OBJS_VST2_X11) $(LIBS_START) $(LIBS_VST2) $(LIBS_END) $(LINK_VST2_X11_FLAGS) -o $@ | |||||
@$(CXX) $(OBJS_WINDOWS) $(LIBS_START) $(LIBS_JUCE) $(LIBS_END) $(LINK_WINDOWS_FLAGS) -o $@ | |||||
$(OBJDIR)/%.cpp.vst2-x11.o: %.cpp | |||||
$(OBJDIR)/%.cpp-windows.o: %.cpp | |||||
-@mkdir -p $(OBJDIR) | -@mkdir -p $(OBJDIR) | ||||
@echo "Compiling $< (VST2-X11)" | |||||
@$(CXX) $< $(BUILD_VST2_X11_FLAGS) -c -o $@ | |||||
@echo "Compiling $< (Windows)" | |||||
@$(CXX) $< $(BUILD_WINDOWS_FLAGS) -c -o $@ | |||||
-include $(OBJS_VST2_X11:%.o=%.d) | |||||
-include $(OBJS_WINDOWS:%.o=%.d) | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- |
@@ -38,6 +38,6 @@ LIBS = \ | |||||
DEFINES = QTCREATOR_TEST | DEFINES = QTCREATOR_TEST | ||||
DEFINES += DEBUG | DEFINES += DEBUG | ||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_GTK2 BRIDGE_LV2_GTK2 | |||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_GTK2 | |||||
QMAKE_CXXFLAGS *= -std=c++0x | QMAKE_CXXFLAGS *= -std=c++0x |
@@ -38,6 +38,6 @@ LIBS = \ | |||||
DEFINES = QTCREATOR_TEST | DEFINES = QTCREATOR_TEST | ||||
DEFINES += DEBUG | DEFINES += DEBUG | ||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_GTK3 BRIDGE_LV2_GTK3 | |||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_GTK3 | |||||
QMAKE_CXXFLAGS *= -std=c++0x | QMAKE_CXXFLAGS *= -std=c++0x |
@@ -16,9 +16,7 @@ DEFINES += QTCREATOR_TEST | |||||
DEFINES += BUILD_BRIDGE | DEFINES += BUILD_BRIDGE | ||||
DEFINES += BUILD_BRIDGE_UI | DEFINES += BUILD_BRIDGE_UI | ||||
DEFINES += BRIDGE_LV2 | |||||
DEFINES += BRIDGE_QT4 | DEFINES += BRIDGE_QT4 | ||||
DEFINES += BRIDGE_LV2_QT4 | |||||
PKGCONFIG = liblo | PKGCONFIG = liblo | ||||
@@ -38,6 +38,6 @@ LIBS = \ | |||||
DEFINES = QTCREATOR_TEST | DEFINES = QTCREATOR_TEST | ||||
DEFINES += DEBUG | DEFINES += DEBUG | ||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_QT5 BRIDGE_LV2_QT5 | |||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_QT5 | |||||
QMAKE_CXXFLAGS *= -std=c++0x | QMAKE_CXXFLAGS *= -std=c++0x |
@@ -42,6 +42,6 @@ LIBS = \ | |||||
DEFINES = QTCREATOR_TEST | DEFINES = QTCREATOR_TEST | ||||
DEFINES += DEBUG | DEFINES += DEBUG | ||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_X11 BRIDGE_LV2_X11 | |||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_X11 | |||||
QMAKE_CXXFLAGS *= -std=c++0x | QMAKE_CXXFLAGS *= -std=c++0x |
@@ -1,42 +0,0 @@ | |||||
# QtCreator project file | |||||
contains(QT_VERSION, ^5.*) { | |||||
QT = core widgets | |||||
} else { | |||||
QT = core gui | |||||
} | |||||
CONFIG = debug link_pkgconfig qt warn_on | |||||
PKGCONFIG = liblo | |||||
TARGET = carla-bridge-vst-x11 | |||||
TEMPLATE = app | |||||
VERSION = 0.5.0 | |||||
SOURCES = \ | |||||
../carla_bridge_client.cpp \ | |||||
../carla_bridge_osc.cpp \ | |||||
../carla_bridge_toolkit.cpp \ | |||||
../carla_bridge_toolkit-qt.cpp \ | |||||
../carla_bridge_ui-vst.cpp | |||||
HEADERS = \ | |||||
../carla_bridge.hpp \ | |||||
../carla_bridge_client.hpp \ | |||||
../carla_bridge_osc.hpp \ | |||||
../carla_bridge_toolkit.hpp \ | |||||
../../carla-includes/carla_defines.hpp \ | |||||
../../carla-includes/carla_midi.h \ | |||||
../../carla-utils/carla_lib_utils.hpp \ | |||||
../../carla-utils/carla_osc_utils.hpp \ | |||||
../../carla-utils/carla_vst_utils.hpp | |||||
INCLUDEPATH = .. \ | |||||
../../carla-includes \ | |||||
../../carla-utils | |||||
DEFINES = QTCREATOR_TEST | |||||
DEFINES += DEBUG | |||||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_VST BRIDGE_X11 BRIDGE_VST_X11 | |||||
QMAKE_CXXFLAGS *= -std=c++0x |
@@ -1503,7 +1503,7 @@ bool is_lv2_ui_feature_supported(const LV2_URI uri) noexcept | |||||
if (is_lv2_feature_supported(uri)) | if (is_lv2_feature_supported(uri)) | ||||
return true; | return true; | ||||
#ifndef BRIDGE_LV2 | |||||
#ifndef BUILD_BRIDGE_UI | |||||
if (std::strcmp(uri, LV2_DATA_ACCESS_URI) == 0) | if (std::strcmp(uri, LV2_DATA_ACCESS_URI) == 0) | ||||
return true; | return true; | ||||
if (std::strcmp(uri, LV2_INSTANCE_ACCESS_URI) == 0) | if (std::strcmp(uri, LV2_INSTANCE_ACCESS_URI) == 0) | ||||