diff --git a/source/Makefile.mk b/source/Makefile.mk index 4aaeb273e..d8926a76b 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -170,6 +170,11 @@ endif LIBLO_FLAGS = $(shell pkg-config --cflags liblo) LIBLO_LIBS = $(shell pkg-config --libs liblo) +QTCORE_FLAGS = $(shell pkg-config --cflags QtCore) +QTCORE_LIBS = $(shell pkg-config --libs QtCore) +QTXML_FLAGS = $(shell pkg-config --cflags QtXml) +QTXML_LIBS = $(shell pkg-config --libs QtXml) + ifeq ($(HAVE_CSOUND),true) CSOUND_FLAGS = $(shell pkg-config --cflags sndfile) -DUSE_DOUBLE=1 CSOUND_LIBS = $(shell pkg-config --libs sndfile) -lcsound64 @@ -219,10 +224,6 @@ JUCE_GUI_BASICS_FLAGS = $(shell pkg-config --cflags x11 xinerama xext xcursor JUCE_GUI_BASICS_LIBS = $(shell pkg-config --libs x11 xinerama xext xcursor) -ldl endif LILV_LIBS = -ldl -lm -lrt -QTCORE_FLAGS = $(shell pkg-config --cflags QtCore) -QTCORE_LIBS = $(shell pkg-config --libs QtCore) -QTXML_FLAGS = $(shell pkg-config --cflags QtXml) -QTXML_LIBS = $(shell pkg-config --libs QtXml) ifeq ($(HAVE_ALSA),true) RTAUDIO_FLAGS += $(shell pkg-config --cflags alsa) -D__LINUX_ALSA__ RTAUDIO_LIBS += $(shell pkg-config --libs alsa) -lpthread @@ -245,8 +246,6 @@ JUCE_CORE_LIBS = -framework Cocoa -framework IOKit JUCE_GRAPHICS_LIBS = -framework Cocoa -framework QuartzCore JUCE_GUI_BASICS_LIBS = -framework Cocoa -framework Carbon -framework QuartzCore LILV_LIBS = -ldl -lm -QTCORE_LIBS = -framework QtCore -QTXML_LIBS = -framework QtXml RTAUDIO_FLAGS += -D__MACOSX_CORE__ RTAUDIO_LIBS += -lpthread RTMIDI_FLAGS += -D__MACOSX_CORE__ @@ -261,10 +260,6 @@ JUCE_EVENTS_LIBS = -lole32 JUCE_GRAPHICS_LIBS = -lgdi32 JUCE_GUI_BASICS_LIBS = -lgdi32 -limm32 -lcomdlg32 -lole32 LILV_LIBS = -lm -QTCORE_FLAGS = $(shell pkg-config --cflags QtCore) -QTCORE_LIBS = $(shell pkg-config --libs QtCore) -QTXML_FLAGS = $(shell pkg-config --cflags QtXml) -QTXML_LIBS = $(shell pkg-config --libs QtXml) RTAUDIO_FLAGS += -D__WINDOWS_ASIO__ -D__WINDOWS_DS__ RTAUDIO_LIBS += -lpthread RTMIDI_FLAGS += -D__WINDOWS_MM__ diff --git a/source/discovery/Makefile b/source/discovery/Makefile index b5ae97f49..227db00da 100644 --- a/source/discovery/Makefile +++ b/source/discovery/Makefile @@ -74,7 +74,11 @@ WIN_32BIT_FLAGS = $(32BIT_FLAGS) WIN_64BIT_FLAGS = $(64BIT_FLAGS) WIN_LINK_FLAGS = $(LINK_FLAGS) +ifeq ($(MACOS),true) +OBJS = carla-discovery.mm.o +else OBJS = carla-discovery.cpp +endif # -------------------------------------------------------------- @@ -91,6 +95,9 @@ win64: carla-discovery-win64.exe # -------------------------------------------------------------- +carla-discovery.mm.o: carla-discovery.mm carla-discovery.cpp + $(CXX) $< $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) -objc++ -c -o $@ + carla-discovery-native: $(OBJS) $(LIBS) $(CXX) $^ $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@ diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index c0a4a4d87..90c7bc525 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -1476,15 +1476,15 @@ void do_juce_check(const char* const filename, const char* const stype, const bo if (stype == nullptr) return; -#if JUCE_PLUGINHOST_AU && JUCE_MAC +#if JUCE_PLUGINHOST_AU && JUCE_MAC && 0 // FIXME later else if (std::strcmp(stype, "au") == 0) pluginFormat = new AudioUnitPluginFormat(); #endif -#if JUCE_PLUGINHOST_LADSPA && JUCE_LINUX +#if JUCE_PLUGINHOST_LADSPA && JUCE_LINUX && 0 // FIXME later else if (std::strcmp(stype, "ladspa") == 0) pluginFormat = new LADSPAPluginFormat(); #endif -#if JUCE_PLUGINHOST_VST +#if JUCE_PLUGINHOST_VST && 0 // FIXME later else if (std::strcmp(stype, "vst") == 0) pluginFormat = new VSTPluginFormat(); #endif @@ -1498,11 +1498,11 @@ void do_juce_check(const char* const filename, const char* const stype, const bo OwnedArray results; pluginFormat->findAllTypesForFile(results, filename); - for (auto it = results.begin(), end = results.end(); it != end; ++it) + for (PluginDescription **it = results.begin(), **end = results.end(); it != end; ++it) { static int iv=0; carla_stderr2("LOOKING FOR PLUGIN %i", iv++); - PluginDescription* desc(*it); + PluginDescription* const desc(*it); int hints = 0x0; int audioIns = desc->numInputChannels; @@ -1955,9 +1955,12 @@ bool arrayContainsPlugin(const OwnedArray& list, const Plugin #include "juce_audio_processors/format/juce_AudioPluginFormat.cpp" #include "juce_audio_processors/processors/juce_AudioProcessor.cpp" #include "juce_audio_processors/processors/juce_PluginDescription.cpp" -#include "juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm" -#include "juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp" -#include "juce_audio_processors/format_types/juce_VSTPluginFormat.cpp" + +#ifndef CARLA_OS_MAC // FIXME later +# include "juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm" +# include "juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp" +# include "juce_audio_processors/format_types/juce_VSTPluginFormat.cpp" +#endif } #endif diff --git a/source/discovery/carla-discovery.mm b/source/discovery/carla-discovery.mm new file mode 100644 index 000000000..9da02f7c1 --- /dev/null +++ b/source/discovery/carla-discovery.mm @@ -0,0 +1,18 @@ +/* + * Carla Plugin discovery, MacOS objc++ file + * Copyright (C) 2014 Filipe Coelho + * + * 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 "carla-discovery.cpp"