| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Bridge | * Carla Bridge | ||||
| * Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -19,10 +19,7 @@ | |||||
| #define CARLA_BRIDGE_CLIENT_HPP_INCLUDED | #define CARLA_BRIDGE_CLIENT_HPP_INCLUDED | ||||
| #include "CarlaBridgeOsc.hpp" | #include "CarlaBridgeOsc.hpp" | ||||
| #ifdef BUILD_BRIDGE_UI | |||||
| # include "CarlaBridgeToolkit.hpp" | |||||
| #endif | |||||
| #include "CarlaBridgeToolkit.hpp" | |||||
| CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
| @@ -34,7 +31,6 @@ public: | |||||
| CarlaBridgeClient(const char* const uiTitle); | CarlaBridgeClient(const char* const uiTitle); | ||||
| virtual ~CarlaBridgeClient(); | virtual ~CarlaBridgeClient(); | ||||
| #ifdef BUILD_BRIDGE_UI | |||||
| // --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
| // ui initialization | // ui initialization | ||||
| @@ -66,7 +62,6 @@ public: | |||||
| void toolkitResize(const int width, const int height); | void toolkitResize(const int width, const int height); | ||||
| void toolkitExec(const bool showGui); | void toolkitExec(const bool showGui); | ||||
| void toolkitQuit(); | void toolkitQuit(); | ||||
| #endif | |||||
| // --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
| // osc stuff | // osc stuff | ||||
| @@ -78,15 +73,9 @@ public: | |||||
| bool isOscControlRegistered() const noexcept; | bool isOscControlRegistered() const noexcept; | ||||
| void sendOscUpdate() const; | void sendOscUpdate() const; | ||||
| #ifdef BUILD_BRIDGE_PLUGIN | |||||
| void sendOscBridgeUpdate() const; | |||||
| void sendOscBridgeError(const char* const error) const; | |||||
| #endif | |||||
| // --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
| protected: | protected: | ||||
| #ifdef BUILD_BRIDGE_UI | |||||
| void sendOscConfigure(const char* const key, const char* const value) const; | void sendOscConfigure(const char* const key, const char* const value) const; | ||||
| void sendOscControl(const int32_t index, const float value) const; | void sendOscControl(const int32_t index, const float value) const; | ||||
| void sendOscProgram(const uint32_t index) const; | void sendOscProgram(const uint32_t index) const; | ||||
| @@ -94,10 +83,10 @@ protected: | |||||
| void sendOscMidi(const uint8_t midiBuf[4]) const; | void sendOscMidi(const uint8_t midiBuf[4]) const; | ||||
| void sendOscExiting() const; | void sendOscExiting() const; | ||||
| # ifdef BRIDGE_LV2 | |||||
| #ifdef BRIDGE_LV2 | |||||
| void sendOscLv2AtomTransfer(const int32_t portIndex, const char* const atomBuf) const; | void sendOscLv2AtomTransfer(const int32_t portIndex, const char* const atomBuf) const; | ||||
| void sendOscLv2UridMap(const uint32_t urid, const char* const uri) const; | void sendOscLv2UridMap(const uint32_t urid, const char* const uri) const; | ||||
| # endif | |||||
| #endif | |||||
| // --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
| @@ -106,7 +95,6 @@ protected: | |||||
| bool uiLibClose(); | bool uiLibClose(); | ||||
| void* uiLibSymbol(const char* const symbol); | void* uiLibSymbol(const char* const symbol); | ||||
| const char* uiLibError(); | const char* uiLibError(); | ||||
| #endif | |||||
| // --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
| @@ -114,7 +102,6 @@ private: | |||||
| CarlaBridgeOsc fOsc; | CarlaBridgeOsc fOsc; | ||||
| const CarlaOscData& fOscData; | const CarlaOscData& fOscData; | ||||
| #ifdef BUILD_BRIDGE_UI | |||||
| struct UI { | struct UI { | ||||
| CarlaBridgeToolkit* const toolkit; | CarlaBridgeToolkit* const toolkit; | ||||
| CarlaString filename; | CarlaString filename; | ||||
| @@ -146,16 +133,12 @@ private: | |||||
| toolkit->quit(); | toolkit->quit(); | ||||
| } | } | ||||
| # ifdef CARLA_PROPER_CPP11_SUPPORT | |||||
| #ifdef CARLA_PROPER_CPP11_SUPPORT | |||||
| UI() = delete; | UI() = delete; | ||||
| UI(UI&) = delete; | UI(UI&) = delete; | ||||
| UI(const UI&) = delete; | UI(const UI&) = delete; | ||||
| # endif | |||||
| } fUI; | |||||
| #else | |||||
| friend class CarlaPluginClient; | |||||
| #endif | #endif | ||||
| } fUI; | |||||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeClient) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeClient) | ||||
| }; | }; | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Bridge OSC | * Carla Bridge OSC | ||||
| * Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -23,7 +23,7 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| CarlaBridgeOsc::CarlaBridgeOsc(CarlaBridgeClient* const client) | CarlaBridgeOsc::CarlaBridgeOsc(CarlaBridgeClient* const client) | ||||
| : fClient(client), | |||||
| : kClient(client), | |||||
| fServer(nullptr) | fServer(nullptr) | ||||
| { | { | ||||
| CARLA_ASSERT(client != nullptr); | CARLA_ASSERT(client != nullptr); | ||||
| @@ -50,13 +50,8 @@ void CarlaBridgeOsc::init(const char* const url) | |||||
| std::srand((uint)(uintptr_t)this); | std::srand((uint)(uintptr_t)this); | ||||
| std::srand((uint)(uintptr_t)&url); | std::srand((uint)(uintptr_t)&url); | ||||
| #ifdef BUILD_BRIDGE_PLUGIN | |||||
| fName = "plug-"; | |||||
| fName += CarlaString(std::rand() % 99999); | |||||
| #else | |||||
| fName = "ui-"; | fName = "ui-"; | ||||
| fName += CarlaString(std::rand() % 99999); | fName += CarlaString(std::rand() % 99999); | ||||
| #endif | |||||
| fServer = lo_server_new_with_proto(nullptr, LO_UDP, osc_error_handler); | fServer = lo_server_new_with_proto(nullptr, LO_UDP, osc_error_handler); | ||||
| @@ -79,9 +74,7 @@ void CarlaBridgeOsc::init(const char* const url) | |||||
| std::free(tmpServerPath); | std::free(tmpServerPath); | ||||
| } | } | ||||
| #ifdef BUILD_BRIDGE_UI | |||||
| lo_server_add_method(fServer, nullptr, nullptr, osc_message_handler, this); | lo_server_add_method(fServer, nullptr, nullptr, osc_message_handler, this); | ||||
| #endif | |||||
| CARLA_ASSERT(fName.isNotEmpty()); | CARLA_ASSERT(fName.isNotEmpty()); | ||||
| CARLA_ASSERT(fServerPath.isNotEmpty()); | CARLA_ASSERT(fServerPath.isNotEmpty()); | ||||
| @@ -120,7 +113,6 @@ void CarlaBridgeOsc::close() | |||||
| CARLA_ASSERT(fServer == nullptr); | CARLA_ASSERT(fServer == nullptr); | ||||
| } | } | ||||
| #ifdef BUILD_BRIDGE_UI | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg) | int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg) | ||||
| @@ -161,25 +153,25 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
| // UI methods | // UI methods | ||||
| if (std::strcmp(method, "configure") == 0) | if (std::strcmp(method, "configure") == 0) | ||||
| return handleMsgUiConfigure(argc, argv, types); | |||||
| return handleMsgConfigure(argc, argv, types); | |||||
| if (std::strcmp(method, "control") == 0) | if (std::strcmp(method, "control") == 0) | ||||
| return handleMsgUiControl(argc, argv, types); | |||||
| return handleMsgControl(argc, argv, types); | |||||
| if (std::strcmp(method, "program") == 0) | if (std::strcmp(method, "program") == 0) | ||||
| return handleMsgUiProgram(argc, argv, types); | |||||
| return handleMsgProgram(argc, argv, types); | |||||
| if (std::strcmp(method, "midi-program") == 0) | if (std::strcmp(method, "midi-program") == 0) | ||||
| return handleMsgUiMidiProgram(argc, argv, types); | |||||
| return handleMsgMidiProgram(argc, argv, types); | |||||
| if (std::strcmp(method, "midi") == 0) | if (std::strcmp(method, "midi") == 0) | ||||
| return handleMsgUiMidi(argc, argv, types); | |||||
| return handleMsgMidi(argc, argv, types); | |||||
| if (std::strcmp(method, "sample-rate") == 0) | if (std::strcmp(method, "sample-rate") == 0) | ||||
| return 0; // unused | return 0; // unused | ||||
| # ifdef BRIDGE_LV2 | |||||
| #ifdef BRIDGE_LV2 | |||||
| // LV2 methods | // LV2 methods | ||||
| if (std::strcmp(method, "lv2_atom_transfer") == 0) | if (std::strcmp(method, "lv2_atom_transfer") == 0) | ||||
| return handleMsgLv2UiAtomTransfer(argc, argv, types); | |||||
| return handleMsgLv2AtomTransfer(argc, argv, types); | |||||
| if (std::strcmp(method, "lv2_urid_map") == 0) | if (std::strcmp(method, "lv2_urid_map") == 0) | ||||
| return handleMsgLv2UiUridMap(argc, argv, types); | |||||
| # endif | |||||
| return handleMsgLv2UridMap(argc, argv, types); | |||||
| #endif | |||||
| carla_stderr("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received unsupported OSC method '%s'", path, method); | carla_stderr("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received unsupported OSC method '%s'", path, method); | ||||
| return 1; | return 1; | ||||
| @@ -187,38 +179,38 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
| int CarlaBridgeOsc::handleMsgShow() | int CarlaBridgeOsc::handleMsgShow() | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgShow()"); | carla_debug("CarlaBridgeOsc::handleMsgShow()"); | ||||
| fClient->toolkitShow(); | |||||
| kClient->toolkitShow(); | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgHide() | int CarlaBridgeOsc::handleMsgHide() | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgHide()"); | carla_debug("CarlaBridgeOsc::handleMsgHide()"); | ||||
| fClient->toolkitHide(); | |||||
| kClient->toolkitHide(); | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgQuit() | int CarlaBridgeOsc::handleMsgQuit() | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgQuit()"); | carla_debug("CarlaBridgeOsc::handleMsgQuit()"); | ||||
| fClient->toolkitQuit(); | |||||
| kClient->toolkitQuit(); | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgUiConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| { | { | ||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ss"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ss"); | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgConfigure()"); | carla_debug("CarlaBridgeOsc::handleMsgConfigure()"); | ||||
| // nothing here for now | // nothing here for now | ||||
| @@ -228,10 +220,10 @@ int CarlaBridgeOsc::handleMsgUiConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| (void)argv; | (void)argv; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgUiControl(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| { | { | ||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "if"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "if"); | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgControl()"); | carla_debug("CarlaBridgeOsc::handleMsgControl()"); | ||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| @@ -239,30 +231,30 @@ int CarlaBridgeOsc::handleMsgUiControl(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| CARLA_SAFE_ASSERT_RETURN(index != -1, 1); | CARLA_SAFE_ASSERT_RETURN(index != -1, 1); | ||||
| fClient->setParameter(index, value); | |||||
| kClient->setParameter(index, value); | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgUiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| { | { | ||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "i"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "i"); | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgProgram()"); | carla_debug("CarlaBridgeOsc::handleMsgProgram()"); | ||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| CARLA_SAFE_ASSERT_RETURN(index >= 0, 1); | CARLA_SAFE_ASSERT_RETURN(index >= 0, 1); | ||||
| fClient->setProgram(static_cast<uint32_t>(index)); | |||||
| kClient->setProgram(static_cast<uint32_t>(index)); | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgUiMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| { | { | ||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ii"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ii"); | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgMidiProgram()"); | carla_debug("CarlaBridgeOsc::handleMsgMidiProgram()"); | ||||
| const int32_t bank = argv[0]->i; | const int32_t bank = argv[0]->i; | ||||
| @@ -271,15 +263,15 @@ int CarlaBridgeOsc::handleMsgUiMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| CARLA_SAFE_ASSERT_RETURN(bank >= 0, 1); | CARLA_SAFE_ASSERT_RETURN(bank >= 0, 1); | ||||
| CARLA_SAFE_ASSERT_RETURN(program >= 0, 1); | CARLA_SAFE_ASSERT_RETURN(program >= 0, 1); | ||||
| fClient->setMidiProgram(static_cast<uint32_t>(bank), static_cast<uint32_t>(program)); | |||||
| kClient->setMidiProgram(static_cast<uint32_t>(bank), static_cast<uint32_t>(program)); | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgUiMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| { | { | ||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "m"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "m"); | ||||
| CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, 1); | |||||
| CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgMidi()"); | carla_debug("CarlaBridgeOsc::handleMsgMidi()"); | ||||
| const uint8_t* const data = argv[0]->m; | const uint8_t* const data = argv[0]->m; | ||||
| @@ -296,7 +288,7 @@ int CarlaBridgeOsc::handleMsgUiMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| CARLA_SAFE_ASSERT_RETURN(note < MAX_MIDI_NOTE, 1); | CARLA_SAFE_ASSERT_RETURN(note < MAX_MIDI_NOTE, 1); | ||||
| fClient->noteOff(channel, note); | |||||
| kClient->noteOff(channel, note); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_NOTE_ON(status)) | else if (MIDI_IS_STATUS_NOTE_ON(status)) | ||||
| { | { | ||||
| @@ -306,14 +298,12 @@ int CarlaBridgeOsc::handleMsgUiMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| CARLA_SAFE_ASSERT_RETURN(note < MAX_MIDI_NOTE, 1); | CARLA_SAFE_ASSERT_RETURN(note < MAX_MIDI_NOTE, 1); | ||||
| CARLA_SAFE_ASSERT_RETURN(velo < MAX_MIDI_VALUE, 1); | CARLA_SAFE_ASSERT_RETURN(velo < MAX_MIDI_VALUE, 1); | ||||
| fClient->noteOn(channel, note, velo); | |||||
| kClient->noteOn(channel, note, velo); | |||||
| } | } | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| #endif // BUILD_BRIDGE_UI | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Bridge OSC | * Carla Bridge OSC | ||||
| * Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -81,32 +81,31 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| private: | private: | ||||
| CarlaBridgeClient* const fClient; | |||||
| CarlaBridgeClient* const kClient; | |||||
| CarlaOscData fControlData; | CarlaOscData fControlData; | ||||
| CarlaString fName; | CarlaString fName; | ||||
| CarlaString fServerPath; | CarlaString fServerPath; | ||||
| lo_server fServer; | lo_server fServer; | ||||
| #ifdef BUILD_BRIDGE_UI | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| int handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg); | int handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg); | ||||
| int handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgShow(); | int handleMsgShow(); | ||||
| int handleMsgHide(); | int handleMsgHide(); | ||||
| int handleMsgQuit(); | int handleMsgQuit(); | ||||
| int handleMsgUiConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgUiControl(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgUiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgUiMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgUiMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| # ifdef BRIDGE_LV2 | |||||
| int handleMsgLv2UiAtomTransfer(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgLv2UiUridMap(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| # endif | |||||
| #ifdef BRIDGE_LV2 | |||||
| int handleMsgLv2AtomTransfer(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| int handleMsgLv2UridMap(CARLA_BRIDGE_OSC_HANDLE_ARGS); | |||||
| #endif | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -114,7 +113,6 @@ private: | |||||
| { | { | ||||
| return ((CarlaBridgeOsc*)userData)->handleMessage(path, argc, argv, types, msg); | return ((CarlaBridgeOsc*)userData)->handleMessage(path, argc, argv, types, msg); | ||||
| } | } | ||||
| #endif | |||||
| static void osc_error_handler(int num, const char* msg, const char* path) | static void osc_error_handler(int num, const char* msg, const char* path) | ||||
| { | { | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Bridge Toolkit | * Carla Bridge Toolkit | ||||
| * Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -19,19 +19,16 @@ | |||||
| #define CARLA_BRIDGE_TOOLKIT_HPP_INCLUDED | #define CARLA_BRIDGE_TOOLKIT_HPP_INCLUDED | ||||
| #include "CarlaBridge.hpp" | #include "CarlaBridge.hpp" | ||||
| #include "CarlaJuceUtils.hpp" | |||||
| #include "CarlaString.hpp" | |||||
| CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
| #if 0 | |||||
| } // Fix editor indentation | |||||
| #endif | |||||
| // ----------------------------------------------------------------------- | |||||
| class CarlaBridgeToolkit | class CarlaBridgeToolkit | ||||
| { | { | ||||
| public: | public: | ||||
| CarlaBridgeToolkit(CarlaBridgeClient* const client, const char* const uiTitle); | |||||
| virtual ~CarlaBridgeToolkit(); | |||||
| virtual ~CarlaBridgeToolkit() {} | |||||
| virtual void init() = 0; | virtual void init() = 0; | ||||
| virtual void exec(const bool showGui) = 0; | virtual void exec(const bool showGui) = 0; | ||||
| @@ -41,17 +38,23 @@ public: | |||||
| virtual void hide() = 0; | virtual void hide() = 0; | ||||
| virtual void resize(const int width, const int height) = 0; | virtual void resize(const int width, const int height) = 0; | ||||
| virtual void* getContainerId(); | |||||
| virtual void* getContainerId() const { return nullptr; } | |||||
| static CarlaBridgeToolkit* createNew(CarlaBridgeClient* const client, const char* const uiTitle); | static CarlaBridgeToolkit* createNew(CarlaBridgeClient* const client, const char* const uiTitle); | ||||
| protected: | protected: | ||||
| CarlaBridgeClient* const kClient; | CarlaBridgeClient* const kClient; | ||||
| const char* const kUiTitle; | |||||
| const CarlaString kWindowTitle; | |||||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeToolkit) | |||||
| CarlaBridgeToolkit(CarlaBridgeClient* const client, const char* const title) | |||||
| : kClient(client), | |||||
| kWindowTitle(title) {} | |||||
| CARLA_LEAK_DETECTOR(CarlaBridgeToolkit) | |||||
| }; | }; | ||||
| // ----------------------------------------------------------------------- | |||||
| CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
| #endif // __CARLA_BRIDGE_TOOLKIT_HPP__ | #endif // __CARLA_BRIDGE_TOOLKIT_HPP__ | ||||
| @@ -18,12 +18,7 @@ | |||||
| #include "CarlaBridgeClient.hpp" | #include "CarlaBridgeClient.hpp" | ||||
| #include "CarlaBridgeToolkit.hpp" | #include "CarlaBridgeToolkit.hpp" | ||||
| #if defined(BRIDGE_COCOA) || defined(BRIDGE_HWND) || defined(BRIDGE_X11) | |||||
| # error Embed UI uses Qt | |||||
| #endif | |||||
| #include <gtk/gtk.h> | #include <gtk/gtk.h> | ||||
| //#include <QtCore/QSettings> // FIXME | |||||
| CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
| @@ -42,10 +37,10 @@ static char** gargv = nullptr; | |||||
| // ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
| class CarlaToolkitGtk : public CarlaBridgeToolkit | |||||
| class CarlaBridgeToolkitGtk : public CarlaBridgeToolkit | |||||
| { | { | ||||
| public: | public: | ||||
| CarlaToolkitGtk(CarlaBridgeClient* const client, const char* const uiTitle) | |||||
| CarlaBridgeToolkitGtk(CarlaBridgeClient* const client, const char* const uiTitle) | |||||
| : CarlaBridgeToolkit(client, uiTitle), | : CarlaBridgeToolkit(client, uiTitle), | ||||
| fNeedsShow(false), | fNeedsShow(false), | ||||
| fWindow(nullptr), | fWindow(nullptr), | ||||
| @@ -54,19 +49,19 @@ public: | |||||
| fLastWidth(0), | fLastWidth(0), | ||||
| fLastHeight(0) | fLastHeight(0) | ||||
| { | { | ||||
| carla_debug("CarlaToolkitGtk::CarlaToolkitGtk(%p, \"%s\")", client, uiTitle); | |||||
| carla_debug("CarlaBridgeToolkitGtk::CarlaBridgeToolkitGtk(%p, \"%s\")", client, uiTitle); | |||||
| } | } | ||||
| ~CarlaToolkitGtk() override | |||||
| ~CarlaBridgeToolkitGtk() override | |||||
| { | { | ||||
| CARLA_ASSERT(fWindow == nullptr); | CARLA_ASSERT(fWindow == nullptr); | ||||
| carla_debug("CarlaToolkitGtk::~CarlaToolkitGtk()"); | |||||
| carla_debug("CarlaBridgeToolkitGtk::~CarlaBridgeToolkitGtk()"); | |||||
| } | } | ||||
| void init() override | void init() override | ||||
| { | { | ||||
| CARLA_ASSERT(fWindow == nullptr); | CARLA_ASSERT(fWindow == nullptr); | ||||
| carla_debug("CarlaToolkitGtk::init()"); | |||||
| carla_debug("CarlaBridgeToolkitGtk::init()"); | |||||
| gtk_init(&gargc, &gargv); | gtk_init(&gargc, &gargv); | ||||
| @@ -79,7 +74,7 @@ public: | |||||
| { | { | ||||
| CARLA_ASSERT(kClient != nullptr); | CARLA_ASSERT(kClient != nullptr); | ||||
| CARLA_ASSERT(fWindow != nullptr); | CARLA_ASSERT(fWindow != nullptr); | ||||
| carla_debug("CarlaToolkitGtk::exec(%s)", bool2str(showGui)); | |||||
| carla_debug("CarlaBridgeToolkitGtk::exec(%s)", bool2str(showGui)); | |||||
| GtkWidget* const widget((GtkWidget*)kClient->getWidget()); | GtkWidget* const widget((GtkWidget*)kClient->getWidget()); | ||||
| @@ -139,7 +134,7 @@ public: | |||||
| void quit() override | void quit() override | ||||
| { | { | ||||
| carla_debug("CarlaToolkitGtk::quit()"); | |||||
| carla_debug("CarlaBridgeToolkitGtk::quit()"); | |||||
| if (fWindow != nullptr) | if (fWindow != nullptr) | ||||
| { | { | ||||
| @@ -153,7 +148,7 @@ public: | |||||
| void show() override | void show() override | ||||
| { | { | ||||
| carla_debug("CarlaToolkitGtk::show()"); | |||||
| carla_debug("CarlaBridgeToolkitGtk::show()"); | |||||
| fNeedsShow = true; | fNeedsShow = true; | ||||
| @@ -163,7 +158,7 @@ public: | |||||
| void hide() override | void hide() override | ||||
| { | { | ||||
| carla_debug("CarlaToolkitGtk::hide()"); | |||||
| carla_debug("CarlaBridgeToolkitGtk::hide()"); | |||||
| fNeedsShow = false; | fNeedsShow = false; | ||||
| @@ -174,7 +169,7 @@ public: | |||||
| void resize(int width, int height) override | void resize(int width, int height) override | ||||
| { | { | ||||
| CARLA_ASSERT(fWindow != nullptr); | CARLA_ASSERT(fWindow != nullptr); | ||||
| carla_debug("CarlaToolkitGtk::resize(%i, %i)", width, height); | |||||
| carla_debug("CarlaBridgeToolkitGtk::resize(%i, %i)", width, height); | |||||
| if (fWindow != nullptr) | if (fWindow != nullptr) | ||||
| gtk_window_resize(GTK_WINDOW(fWindow), width, height); | gtk_window_resize(GTK_WINDOW(fWindow), width, height); | ||||
| @@ -193,7 +188,7 @@ protected: | |||||
| void handleDestroy() | void handleDestroy() | ||||
| { | { | ||||
| carla_debug("CarlaToolkitGtk::handleDestroy()"); | |||||
| carla_debug("CarlaBridgeToolkitGtk::handleDestroy()"); | |||||
| fWindow = nullptr; | fWindow = nullptr; | ||||
| @@ -225,7 +220,7 @@ private: | |||||
| { | { | ||||
| CARLA_ASSERT(data != nullptr); | CARLA_ASSERT(data != nullptr); | ||||
| if (CarlaToolkitGtk* const _this_ = (CarlaToolkitGtk*)data) | |||||
| if (CarlaBridgeToolkitGtk* const _this_ = (CarlaBridgeToolkitGtk*)data) | |||||
| _this_->handleDestroy(); | _this_->handleDestroy(); | ||||
| gtk_main_quit(); | gtk_main_quit(); | ||||
| @@ -235,7 +230,7 @@ private: | |||||
| { | { | ||||
| CARLA_ASSERT(data != nullptr); | CARLA_ASSERT(data != nullptr); | ||||
| if (CarlaToolkitGtk* const _this_ = (CarlaToolkitGtk*)data) | |||||
| if (CarlaBridgeToolkitGtk* const _this_ = (CarlaBridgeToolkitGtk*)data) | |||||
| return _this_->handleTimeout(); | return _this_->handleTimeout(); | ||||
| return false; | return false; | ||||
| @@ -246,7 +241,9 @@ private: | |||||
| CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeClient* const client, const char* const uiTitle) | CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeClient* const client, const char* const uiTitle) | ||||
| { | { | ||||
| return new CarlaToolkitGtk(client, uiTitle); | |||||
| return new CarlaBridgeToolkitGtk(client, uiTitle); | |||||
| } | } | ||||
| // ------------------------------------------------------------------------- | |||||
| CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Bridge Toolkit | |||||
| * Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com> | |||||
| * Carla Bridge Toolkit, Plugin version | |||||
| * Copyright (C) 2014 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -15,30 +15,25 @@ | |||||
| * For a full copy of the GNU General Public License see the GPL.txt file | * For a full copy of the GNU General Public License see the GPL.txt file | ||||
| */ | */ | ||||
| #include "CarlaBridgeClient.hpp" | |||||
| #include "CarlaBridgeToolkit.hpp" | #include "CarlaBridgeToolkit.hpp" | ||||
| CARLA_BRIDGE_START_NAMESPACE | |||||
| #include "CarlaPluginUI.hpp" | |||||
| CarlaBridgeToolkit::CarlaBridgeToolkit(CarlaBridgeClient* const client, const char* const uiTitle) | |||||
| : kClient(client), | |||||
| kUiTitle(carla_strdup((uiTitle != nullptr) ? uiTitle : "(null)")) | |||||
| { | |||||
| CARLA_ASSERT(client != nullptr); | |||||
| CARLA_ASSERT(uiTitle != nullptr); | |||||
| carla_debug("CarlaBridgeToolkit::CarlaBridgeToolkit(%p, \"%s\")", client, uiTitle); | |||||
| } | |||||
| CarlaBridgeToolkit::~CarlaBridgeToolkit() | |||||
| { | |||||
| carla_debug("CarlaBridgeToolkit::~CarlaBridgeToolkit()"); | |||||
| CARLA_BRIDGE_START_NAMESPACE | |||||
| delete[] kUiTitle; | |||||
| } | |||||
| // ------------------------------------------------------------------------- | |||||
| void* CarlaBridgeToolkit::getContainerId() | |||||
| CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeClient* const client, const char* const uiTitle) | |||||
| { | { | ||||
| carla_debug("CarlaBridgeToolkit::getContainerId()"); | |||||
| return nullptr; | return nullptr; | ||||
| (void)client; (void)uiTitle; | |||||
| } | } | ||||
| // ------------------------------------------------------------------------- | |||||
| CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
| #include "CarlaPluginUI.cpp" | |||||
| // ------------------------------------------------------------------------- | |||||
| @@ -26,29 +26,9 @@ | |||||
| #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | ||||
| # include <QtWidgets/QApplication> | # include <QtWidgets/QApplication> | ||||
| # include <QtWidgets/QMainWindow> | # include <QtWidgets/QMainWindow> | ||||
| # ifdef Q_WS_X11 | |||||
| # undef Q_WS_X11 | |||||
| # endif | |||||
| #else | #else | ||||
| # include <QtGui/QApplication> | # include <QtGui/QApplication> | ||||
| # include <QtGui/QMainWindow> | # include <QtGui/QMainWindow> | ||||
| # ifdef Q_WS_X11 | |||||
| # include <QtGui/QX11EmbedContainer> | |||||
| # endif | |||||
| #endif | |||||
| #if defined(BRIDGE_COCOA) || defined(BRIDGE_HWND) || defined(BRIDGE_X11) | |||||
| # define BRIDGE_CONTAINER | |||||
| # ifndef BRIDGE_X11 | |||||
| typedef QWidget QEmbedContainer; | |||||
| # else | |||||
| # ifdef Q_WS_X11 | |||||
| typedef QX11EmbedContainer QEmbedContainer; | |||||
| # else | |||||
| # warning Using X11 UI bridge without QX11EmbedContainer | |||||
| typedef QWidget QEmbedContainer; | |||||
| # endif | |||||
| # endif | |||||
| #endif | #endif | ||||
| CARLA_BRIDGE_START_NAMESPACE | CARLA_BRIDGE_START_NAMESPACE | ||||
| @@ -59,12 +39,6 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
| static const char* const appName = "Carla-Qt4UIs"; | static const char* const appName = "Carla-Qt4UIs"; | ||||
| #elif defined(BRIDGE_QT5) | #elif defined(BRIDGE_QT5) | ||||
| static const char* const appName = "Carla-Qt5UIs"; | static const char* const appName = "Carla-Qt5UIs"; | ||||
| #elif defined(BRIDGE_COCOA) | |||||
| static const char* const appName = "Carla-CocoaUIs"; | |||||
| #elif defined(BRIDGE_HWND) | |||||
| static const char* const appName = "Carla-HWNDUIs"; | |||||
| #elif defined(BRIDGE_X11) | |||||
| static const char* const appName = "Carla-X11UIs"; | |||||
| #else | #else | ||||
| static const char* const appName = "Carla-UIs"; | static const char* const appName = "Carla-UIs"; | ||||
| #endif | #endif | ||||
| @@ -85,9 +59,6 @@ public: | |||||
| CarlaBridgeToolkit(client, uiTitle), | CarlaBridgeToolkit(client, uiTitle), | ||||
| fApp(nullptr), | fApp(nullptr), | ||||
| fWindow(nullptr), | fWindow(nullptr), | ||||
| #ifdef BRIDGE_CONTAINER | |||||
| fEmbedContainer(nullptr), | |||||
| #endif | |||||
| fMsgTimer(0), | fMsgTimer(0), | ||||
| fNeedsShow(false) | fNeedsShow(false) | ||||
| { | { | ||||
| @@ -162,16 +133,16 @@ public: | |||||
| } | } | ||||
| fWindow->setWindowIcon(QIcon::fromTheme("carla", QIcon(":/scalable/carla.svg"))); | fWindow->setWindowIcon(QIcon::fromTheme("carla", QIcon(":/scalable/carla.svg"))); | ||||
| fWindow->setWindowTitle(kUiTitle); | |||||
| fWindow->setWindowTitle(kWindowTitle); | |||||
| { | { | ||||
| QSettings settings("falkTX", appName); | QSettings settings("falkTX", appName); | ||||
| if (settings.contains(QString("%1/pos_x").arg(kUiTitle))) | |||||
| if (settings.contains(QString("%1/pos_x").arg(kWindowTitle))) | |||||
| { | { | ||||
| bool hasX, hasY; | bool hasX, hasY; | ||||
| const int posX(settings.value(QString("%1/pos_x").arg(kUiTitle), fWindow->x()).toInt(&hasX)); | |||||
| const int posY(settings.value(QString("%1/pos_y").arg(kUiTitle), fWindow->y()).toInt(&hasY)); | |||||
| const int posX(settings.value(QString("%1/pos_x").arg(kWindowTitle), fWindow->x()).toInt(&hasX)); | |||||
| const int posY(settings.value(QString("%1/pos_y").arg(kWindowTitle), fWindow->y()).toInt(&hasY)); | |||||
| if (hasX && hasY) | if (hasX && hasY) | ||||
| fWindow->move(posX, posY); | fWindow->move(posX, posY); | ||||
| @@ -179,8 +150,8 @@ public: | |||||
| if (kClient->isResizable()) | if (kClient->isResizable()) | ||||
| { | { | ||||
| bool hasWidth, hasHeight; | bool hasWidth, hasHeight; | ||||
| const int width(settings.value(QString("%1/width").arg(kUiTitle), fWindow->width()).toInt(&hasWidth)); | |||||
| const int height(settings.value(QString("%1/height").arg(kUiTitle), fWindow->height()).toInt(&hasHeight)); | |||||
| const int width(settings.value(QString("%1/width").arg(kWindowTitle), fWindow->width()).toInt(&hasWidth)); | |||||
| const int height(settings.value(QString("%1/height").arg(kWindowTitle), fWindow->height()).toInt(&hasHeight)); | |||||
| if (hasWidth && hasHeight) | if (hasWidth && hasHeight) | ||||
| fWindow->resize(width, height); | fWindow->resize(width, height); | ||||
| @@ -222,24 +193,14 @@ public: | |||||
| if (fWindow != nullptr) | if (fWindow != nullptr) | ||||
| { | { | ||||
| QSettings settings("falkTX", appName); | QSettings settings("falkTX", appName); | ||||
| settings.setValue(QString("%1/pos_x").arg(kUiTitle), fWindow->x()); | |||||
| settings.setValue(QString("%1/pos_y").arg(kUiTitle), fWindow->y()); | |||||
| settings.setValue(QString("%1/width").arg(kUiTitle), fWindow->width()); | |||||
| settings.setValue(QString("%1/height").arg(kUiTitle), fWindow->height()); | |||||
| settings.setValue(QString("%1/pos_x").arg(kWindowTitle), fWindow->x()); | |||||
| settings.setValue(QString("%1/pos_y").arg(kWindowTitle), fWindow->y()); | |||||
| settings.setValue(QString("%1/width").arg(kWindowTitle), fWindow->width()); | |||||
| settings.setValue(QString("%1/height").arg(kWindowTitle), fWindow->height()); | |||||
| settings.sync(); | settings.sync(); | ||||
| fWindow->close(); | fWindow->close(); | ||||
| #ifdef BRIDGE_CONTAINER | |||||
| if (fEmbedContainer != nullptr) | |||||
| { | |||||
| fEmbedContainer->close(); | |||||
| delete fEmbedContainer; | |||||
| fEmbedContainer = nullptr; | |||||
| } | |||||
| #endif | |||||
| delete fWindow; | delete fWindow; | ||||
| fWindow = nullptr; | fWindow = nullptr; | ||||
| } | } | ||||
| @@ -288,35 +249,10 @@ public: | |||||
| emit setSizeSafeSignal(width, height); | emit setSizeSafeSignal(width, height); | ||||
| } | } | ||||
| #ifdef BRIDGE_CONTAINER | |||||
| void* getContainerId() | |||||
| { | |||||
| CARLA_ASSERT(fWindow != nullptr); | |||||
| carla_debug("CarlaBridgeToolkitQt::getContainerId()"); | |||||
| if (fEmbedContainer == nullptr) | |||||
| { | |||||
| fEmbedContainer = new QEmbedContainer(fWindow); | |||||
| fWindow->setCentralWidget(fEmbedContainer); | |||||
| fWindow->adjustSize(); | |||||
| fEmbedContainer->setParent(fWindow); | |||||
| fEmbedContainer->show(); | |||||
| } | |||||
| return (void*)fEmbedContainer->winId(); | |||||
| } | |||||
| #endif | |||||
| protected: | protected: | ||||
| QApplication* fApp; | QApplication* fApp; | ||||
| QMainWindow* fWindow; | QMainWindow* fWindow; | ||||
| #ifdef BRIDGE_CONTAINER | |||||
| QEmbedContainer* fEmbedContainer; | |||||
| #endif | |||||
| int fMsgTimer; | int fMsgTimer; | ||||
| bool fNeedsShow; | bool fNeedsShow; | ||||
| @@ -359,11 +295,6 @@ private slots: | |||||
| fWindow->resize(width, height); | fWindow->resize(width, height); | ||||
| else | else | ||||
| fWindow->setFixedSize(width, height); | fWindow->setFixedSize(width, height); | ||||
| #ifdef BRIDGE_CONTAINER | |||||
| if (fEmbedContainer != nullptr) | |||||
| fEmbedContainer->setFixedSize(width, height); | |||||
| #endif | |||||
| } | } | ||||
| }; | }; | ||||
| @@ -384,6 +315,8 @@ CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeClient* const clien | |||||
| CARLA_BRIDGE_END_NAMESPACE | CARLA_BRIDGE_END_NAMESPACE | ||||
| // ------------------------------------------------------------------------- | |||||
| #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | ||||
| # include "resources.qt5.cpp" | # include "resources.qt5.cpp" | ||||
| #else | #else | ||||
| @@ -7,65 +7,48 @@ | |||||
| include ../Makefile.mk | include ../Makefile.mk | ||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # Common | |||||
| BUILD_CXX_FLAGS += -DBUILD_BRIDGE | |||||
| BUILD_CXX_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_UI | |||||
| BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules | BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules | ||||
| BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | ||||
| LINK_FLAGS += $(LIBLO_LIBS) | LINK_FLAGS += $(LIBLO_LIBS) | ||||
| LINK_FLAGS += $(JUCE_CORE_LIBS) | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # UI bridges | # UI bridges | ||||
| BUILD_UI_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_UI | |||||
| LINK_UI_FLAGS = $(LINK_FLAGS) | |||||
| LINK_UI_FLAGS += ../modules/juce_core.a | |||||
| LINK_UI_FLAGS += $(JUCE_CORE_LIBS) | |||||
| BUILD_UI_LV2_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_LV2 | |||||
| BUILD_UI_VST_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_VST | |||||
| BUILD_LV2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_LV2 | |||||
| BUILD_VST_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_VST | |||||
| ifeq ($(CARLA_VESTIGE_HEADER),true) | ifeq ($(CARLA_VESTIGE_HEADER),true) | ||||
| BUILD_UI_VST_FLAGS += -DVESTIGE_HEADER | |||||
| BUILD_VST_FLAGS += -DVESTIGE_HEADER | |||||
| endif | endif | ||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| BUILD_UI_LV2_GTK2_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0) | |||||
| LINK_UI_LV2_GTK2_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-2.0) -ldl | |||||
| BUILD_UI_LV2_GTK3_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0) | |||||
| LINK_UI_LV2_GTK3_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-3.0) -ldl | |||||
| 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_UI_LV2_QT4_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui) | |||||
| LINK_UI_LV2_QT4_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs QtCore QtGui) -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_UI_LV2_QT5_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) | |||||
| LINK_UI_LV2_QT5_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl | |||||
| BUILD_LV2_QT4_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui) | |||||
| LINK_LV2_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl | |||||
| BUILD_UI_LV2_COCOA_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA | |||||
| LINK_UI_LV2_COCOA_FLAGS = $(LINK_UI_FLAGS) -ldl | |||||
| BUILD_LV2_QT5_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) | |||||
| LINK_LV2_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl | |||||
| BUILD_UI_LV2_HWND_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND | |||||
| LINK_UI_LV2_HWND_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS) -static -mwindows | |||||
| BUILD_LV2_X11_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 | |||||
| LINK_LV2_X11_FLAGS = $(LINK_FLAGS) -ldl | |||||
| BUILD_UI_LV2_X11_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 | |||||
| LINK_UI_LV2_X11_FLAGS = $(LINK_UI_FLAGS) -ldl | |||||
| # -------------------------------------------------------------- | |||||
| BUILD_LV2_COCOA_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA | |||||
| LINK_LV2_COCOA_FLAGS = $(LINK_FLAGS) -ldl | |||||
| BUILD_UI_VST_CARBON_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_CARBON -DBRIDGE_VST_CARBON | |||||
| LINK_UI_VST_CARBON_FLAGS = $(LINK_UI_FLAGS) -ldl | |||||
| BUILD_LV2_WINDOWS_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND | |||||
| LINK_LV2_WINDOWS_FLAGS = $(LINK_FLAGS) -static -mwindows | |||||
| BUILD_UI_VST_COCOA_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_COCOA -DBRIDGE_VST_COCOA | |||||
| LINK_UI_VST_COCOA_FLAGS = $(LINK_UI_FLAGS) -ldl | |||||
| BUILD_UI_VST_HWND_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_HWND -DBRIDGE_VST_HWND | |||||
| LINK_UI_VST_HWND_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS) -static -mwindows | |||||
| BUILD_UI_VST_X11_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11 | |||||
| LINK_UI_VST_X11_FLAGS = $(LINK_UI_FLAGS) -ldl | |||||
| BUILD_VST_X11_FLAGS = $(BUILD_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11 | |||||
| LINK_VST_X11_FLAGS = $(LINK_FLAGS) -ldl | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| @@ -86,52 +69,49 @@ TARGETS += ui_lv2-qt5 | |||||
| endif | endif | ||||
| ifeq ($(HAVE_X11),true) | ifeq ($(HAVE_X11),true) | ||||
| # TARGETS += ui_lv2-x11 | |||||
| # TARGETS += ui_vst-x11 | |||||
| TARGETS += ui_lv2-x11 | |||||
| TARGETS += ui_vst-x11 | |||||
| endif | endif | ||||
| ifeq ($(MACOS),true) | ifeq ($(MACOS),true) | ||||
| # TARGETS += ui_lv2-cocoa | |||||
| # TARGETS += ui_vst-carbon | |||||
| # TARGETS += ui_vst-cocoa | |||||
| TARGETS += ui_lv2-cocoa | |||||
| endif | endif | ||||
| ifeq ($(WIN32),true) | ifeq ($(WIN32),true) | ||||
| # TARGETS += ui_lv2-windows | |||||
| # TARGETS += ui_vst-hwnd | |||||
| TARGETS += ui_lv2-windows | |||||
| endif | endif | ||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| all: $(TARGETS) | |||||
| # all: $(TARGETS) | |||||
| ui_lv2-gtk2: ../../bin/carla-bridge-lv2-gtk2 | |||||
| ui_lv2-gtk3: ../../bin/carla-bridge-lv2-gtk3 | |||||
| ui_lv2-qt4: ../../bin/carla-bridge-lv2-qt4 | |||||
| ui_lv2-qt5: ../../bin/carla-bridge-lv2-qt5 | |||||
| # TODO | |||||
| all: | |||||
| ui_lv2-gtk2: ../../bin/carla-bridge-lv2-gtk2 | |||||
| ui_lv2-gtk3: ../../bin/carla-bridge-lv2-gtk3 | |||||
| ui_lv2-qt4: ../../bin/carla-bridge-lv2-qt4 | |||||
| ui_lv2-qt5: ../../bin/carla-bridge-lv2-qt5 | |||||
| ui_lv2-x11: ../../bin/carla-bridge-lv2-x11 | |||||
| ui_lv2-cocoa: ../../bin/carla-bridge-lv2-cocoa | ui_lv2-cocoa: ../../bin/carla-bridge-lv2-cocoa | ||||
| ui_lv2-windows: ../../bin/carla-bridge-lv2-windows.exe | ui_lv2-windows: ../../bin/carla-bridge-lv2-windows.exe | ||||
| ui_lv2-x11: ../../bin/carla-bridge-lv2-x11 | |||||
| ui_vst-carbon: ../../bin/carla-bridge-vst-carbon | |||||
| ui_vst-cocoa: ../../bin/carla-bridge-vst-cocoa | |||||
| ui_vst-hwnd: ../../bin/carla-bridge-vst-hwnd.exe | |||||
| ui_vst-x11: ../../bin/carla-bridge-vst-x11 | |||||
| ui_vst-x11: ../../bin/carla-bridge-vst-x11 | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # UI common | # UI common | ||||
| OBJS_UI_LV2_LIBS = \ | |||||
| OBJS_LV2_LIBS = \ | |||||
| ../modules/juce_core.a \ | |||||
| ../modules/lilv.a | ../modules/lilv.a | ||||
| OBJS_UI_VST_LIBS = | |||||
| OBJS_VST_LIBS = \ | |||||
| ../modules/juce_core.a | |||||
| %__lv2.o: %.cpp | %__lv2.o: %.cpp | ||||
| $(CXX) $< $(BUILD_UI_LV2_FLAGS) -c -o $@ | |||||
| $(CXX) $< $(BUILD_LV2_FLAGS) -c -o $@ | |||||
| %__vst.o: %.cpp | %__vst.o: %.cpp | ||||
| $(CXX) $< $(BUILD_UI_VST_FLAGS) -c -o $@ | |||||
| $(CXX) $< $(BUILD_VST_FLAGS) -c -o $@ | |||||
| resources.qt4.cpp: ../../resources/resources-theme.qrc | resources.qt4.cpp: ../../resources/resources-theme.qrc | ||||
| $(RCC_QT4) $< -o $@ | $(RCC_QT4) $< -o $@ | ||||
| @@ -148,139 +128,129 @@ CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_lv2-gtk2 | # ui_lv2-gtk2 | ||||
| OBJS_UI_LV2_GTK2 = CarlaBridgeUI-LV2__lv2-gtk2.o \ | |||||
| CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk2.o | |||||
| OBJS_LV2_GTK2 = \ | |||||
| CarlaBridgeClient__lv2.o \ | |||||
| CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkitGtk__lv2-gtk2.o \ | |||||
| CarlaBridgeUI-LV2__lv2-gtk2.o | |||||
| ../../bin/carla-bridge-lv2-gtk2: $(OBJS_UI_LV2_GTK2) $(OBJS_UI_LV2_LIBS) | |||||
| $(CXX) $^ $(LINK_UI_LV2_GTK2_FLAGS) -o $@ | |||||
| ../../bin/carla-bridge-lv2-gtk2: $(OBJS_LV2_GTK2) $(OBJS_LV2_LIBS) | |||||
| $(CXX) $^ $(LINK_LV2_GTK2_FLAGS) -o $@ | |||||
| %__lv2-gtk2.o: %.cpp | %__lv2-gtk2.o: %.cpp | ||||
| $(CXX) $< $(BUILD_UI_LV2_GTK2_FLAGS) -c -o $@ | |||||
| $(CXX) $< $(BUILD_LV2_GTK2_FLAGS) -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_lv2-gtk3 | # ui_lv2-gtk3 | ||||
| OBJS_UI_LV2_GTK3 = CarlaBridgeUI-LV2__lv2-gtk3.o \ | |||||
| CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk3.o | |||||
| OBJS_LV2_GTK3 = \ | |||||
| CarlaBridgeClient__lv2.o \ | |||||
| CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkitGtk__lv2-gtk3.o \ | |||||
| CarlaBridgeUI-LV2__lv2-gtk3.o | |||||
| ../../bin/carla-bridge-lv2-gtk3: $(OBJS_UI_LV2_GTK3) $(OBJS_UI_LV2_LIBS) | |||||
| $(CXX) $^ $(LINK_UI_LV2_GTK3_FLAGS) -o $@ | |||||
| ../../bin/carla-bridge-lv2-gtk3: $(OBJS_LV2_GTK3) $(OBJS_LV2_LIBS) | |||||
| $(CXX) $^ $(LINK_LV2_GTK3_FLAGS) -o $@ | |||||
| %__lv2-gtk3.o: %.cpp | %__lv2-gtk3.o: %.cpp | ||||
| $(CXX) $< $(BUILD_UI_LV2_GTK3_FLAGS) -c -o $@ | |||||
| $(CXX) $< $(BUILD_LV2_GTK3_FLAGS) -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_lv2-qt4 | # ui_lv2-qt4 | ||||
| OBJS_UI_LV2_QT4 = CarlaBridgeUI-LV2__lv2-qt4.o \ | |||||
| CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt4.o | |||||
| OBJS_LV2_QT4 = \ | |||||
| CarlaBridgeClient__lv2.o \ | |||||
| CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkitQt__lv2-qt4.o \ | |||||
| CarlaBridgeUI-LV2__lv2-qt4.o | |||||
| ../../bin/carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt4.a | |||||
| $(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@ | |||||
| ../../bin/carla-bridge-lv2-qt4: $(OBJS_LV2_QT4) $(OBJS_LV2_LIBS) ../modules/theme.qt4.a | |||||
| $(CXX) $^ $(LINK_LV2_QT4_FLAGS) -o $@ | |||||
| %__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt4.moc resources.qt4.cpp | %__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt4.moc resources.qt4.cpp | ||||
| $(CXX) $< $(BUILD_UI_LV2_QT4_FLAGS) -I../modules/theme -c -o $@ | |||||
| $(CXX) $< $(BUILD_LV2_QT4_FLAGS) -I../modules/theme -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_lv2-qt5 | # ui_lv2-qt5 | ||||
| OBJS_UI_LV2_QT5 = CarlaBridgeUI-LV2__lv2-qt5.o \ | |||||
| CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt5.o | |||||
| OBJS_LV2_QT5 = \ | |||||
| CarlaBridgeClient__lv2.o \ | |||||
| CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkitQt__lv2-qt5.o \ | |||||
| CarlaBridgeUI-LV2__lv2-qt5.o | |||||
| ../../bin/carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt5.a | |||||
| $(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@ | |||||
| ../../bin/carla-bridge-lv2-qt5: $(OBJS_LV2_QT5) $(OBJS_LV2_LIBS) ../modules/theme.qt5.a | |||||
| $(CXX) $^ $(LINK_LV2_QT5_FLAGS) -o $@ | |||||
| %__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt5.moc resources.qt5.cpp | %__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt5.moc resources.qt5.cpp | ||||
| $(CXX) $< $(BUILD_UI_LV2_QT5_FLAGS) -I../modules/theme -c -o $@ | |||||
| $(CXX) $< $(BUILD_LV2_QT5_FLAGS) -I../modules/theme -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_lv2-cocoa | |||||
| # ui_lv2-x11 | |||||
| # OBJS_UI_LV2_COCOA = CarlaBridgeUI-LV2__lv2-cocoa.o \ | |||||
| # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
| # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-cocoa.o | |||||
| # | |||||
| # ../../bin/carla-bridge-lv2-cocoa: $(OBJS_UI_LV2_COCOA) $(OBJS_UI_LV2_LIBS) | |||||
| # $(CXX) $^ $(LINK_UI_LV2_COCOA_FLAGS) -o $@ | |||||
| # | |||||
| # %__lv2-cocoa.o: %.cpp | |||||
| # $(CXX) $< $(BUILD_UI_LV2_COCOA_FLAGS) -c -o $@ | |||||
| OBJS_LV2_X11 = \ | |||||
| CarlaBridgeClient__lv2.o \ | |||||
| CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkitPlugin__lv2-x11.o \ | |||||
| CarlaBridgeUI-LV2__lv2-x11.o | |||||
| # -------------------------------------------------------------- | |||||
| # ui_lv2-windows | |||||
| ../../bin/carla-bridge-lv2-x11: $(OBJS_LV2_X11) $(OBJS_LV2_LIBS) | |||||
| $(CXX) $^ $(LINK_LV2_X11_FLAGS) -o $@ | |||||
| # OBJS_UI_LV2_WIN32 = CarlaBridgeUI-LV2__lv2-windows.o \ | |||||
| # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
| # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-windows.o | |||||
| # | |||||
| # ../../bin/carla-bridge-lv2-windows.exe: $(OBJS_UI_LV2_WIN32) $(OBJS_UI_LV2_LIBS) | |||||
| # $(CXX) $^ $(LINK_UI_LV2_WIN32_FLAGS) -o $@ | |||||
| # | |||||
| # %__lv2-windows.o: %.cpp | |||||
| # $(CXX) $< $(BUILD_UI_LV2_WIN32_FLAGS) -c -o $@ | |||||
| %__lv2-x11.o: %.cpp | |||||
| $(CXX) $< $(BUILD_LV2_X11_FLAGS) -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_lv2-x11 | |||||
| # ui_lv2-cocoa | |||||
| # OBJS_UI_LV2_X11 = CarlaBridgeUI-LV2__lv2-x11.o \ | |||||
| # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ | |||||
| # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-x11.o | |||||
| # | |||||
| # ../../bin/carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS) | |||||
| # $(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@ | |||||
| # | |||||
| # %__lv2-x11.o: %.cpp | |||||
| # $(CXX) $< $(BUILD_UI_LV2_X11_FLAGS) -c -o $@ | |||||
| OBJS_LV2_COCOA = \ | |||||
| CarlaBridgeClient__lv2.o \ | |||||
| CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkitPlugin__lv2-cocoa.o \ | |||||
| CarlaBridgeUI-LV2__lv2-cocoa.o | |||||
| # -------------------------------------------------------------- | |||||
| # ui_vst-mac | |||||
| ../../bin/carla-bridge-lv2-cocoa: $(OBJS_LV2_COCOA) $(OBJS_LV2_LIBS) | |||||
| $(CXX) $^ $(LINK_LV2_COCOA_FLAGS) -o $@ | |||||
| # OBJS_UI_VST_MAC = CarlaBridgeUI-VST__vst-mac.o \ | |||||
| # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \ | |||||
| # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-mac.o | |||||
| # | |||||
| # ../../bin/carla-bridge-vst-mac: $(OBJS_UI_VST_MAC) $(OBJS_UI_VST_LIBS) ../modules/theme.a | |||||
| # $(CXX) $^ $(LINK_UI_VST_MAC_FLAGS) -o $@ | |||||
| # | |||||
| # %__vst-mac.o: %.cpp | |||||
| # $(CXX) $< $(BUILD_UI_VST_MAC_FLAGS) -c -o $@ | |||||
| %__lv2-cocoa.o: %.cpp | |||||
| $(CXX) $< $(BUILD_LV2_COCOA_FLAGS) -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_vst-hwnd | |||||
| # ui_lv2-windows | |||||
| # OBJS_UI_VST_HWND = CarlaBridgeUI-VST__vst-hwnd.o \ | |||||
| # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \ | |||||
| # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-hwnd.o | |||||
| # | |||||
| # ../../bin/carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) $(OBJS_UI_VST_LIBS) ../modules/theme.a | |||||
| # $(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@ | |||||
| # | |||||
| # %__vst-hwnd.o: %.cpp | |||||
| # $(CXX) $< $(BUILD_UI_VST_HWND_FLAGS) -c -o $@ | |||||
| OBJS_LV2_WINDOWS = \ | |||||
| CarlaBridgeClient__lv2.o \ | |||||
| CarlaBridgeOsc__lv2.o \ | |||||
| CarlaBridgeToolkitPlugin__lv2-windows.o \ | |||||
| CarlaBridgeUI-LV2__lv2-windows.o | |||||
| ../../bin/carla-bridge-lv2-windows.exe: $(OBJS_LV2_WINDOWS) $(OBJS_LV2_LIBS) | |||||
| $(CXX) $^ $(LINK_LV2_WINDOWS_FLAGS) -o $@ | |||||
| %__lv2-windows.o: %.cpp | |||||
| $(CXX) $< $(BUILD_LV2_WINDOWS_FLAGS) -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # ui_vst-x11 | # ui_vst-x11 | ||||
| # OBJS_UI_VST_X11 = CarlaBridgeUI-VST__vst-x11.o \ | |||||
| # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \ | |||||
| # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-x11.o | |||||
| # | |||||
| # ../../bin/carla-bridge-vst-x11: $(OBJS_UI_VST_X11) $(OBJS_UI_VST_LIBS) ../modules/theme.a | |||||
| # $(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@ | |||||
| # | |||||
| # %__vst-x11.o: %.cpp | |||||
| # $(CXX) $< $(BUILD_UI_VST_X11_FLAGS) -c -o $@ | |||||
| OBJS_VST_X11 = \ | |||||
| CarlaBridgeClient__vst.o \ | |||||
| CarlaBridgeOsc__vst.o \ | |||||
| CarlaBridgeToolkitPlugin__vst-x11.o \ | |||||
| CarlaBridgeUI-VST__vst-x11.o \ | |||||
| ../../bin/carla-bridge-vst-x11: $(OBJS_VST_X11) $(OBJS_VST_LIBS) ../modules/theme.a | |||||
| $(CXX) $^ $(LINK_VST_X11_FLAGS) -o $@ | |||||
| %__vst-x11.o: %.cpp | |||||
| $(CXX) $< $(BUILD_VST_X11_FLAGS) -c -o $@ | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| clean: | clean: | ||||
| $(RM) *.moc *.o | $(RM) *.moc *.o | ||||
| $(RM) resources.*.cpp | $(RM) resources.*.cpp | ||||
| $(RM) ../../bin/carla-bridge-* | |||||
| $(RM) ../../bin/carla-bridge-lv2-* ../../bin/carla-bridge-vst-* | |||||
| debug: | debug: | ||||
| $(MAKE) DEBUG=true | $(MAKE) DEBUG=true | ||||