From 8959c85f264d384ab047103206d1230d460572a2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Aug 2013 16:46:06 +0100 Subject: [PATCH] More misc work and moving files again --- source/Makefile.mk | 2 +- source/backend/Makefile | 6 +-- source/discovery/Makefile | 5 --- .../modules/{carla_native => }/CarlaNative.h | 0 .../{carla_native => }/CarlaNative.hpp | 0 source/modules/JuceHeader.h | 41 ------------------- source/modules/carla_native/Makefile | 20 ++++----- source/modules/carla_native/audio-base.hpp | 8 ++-- .../distrho/DistrhoPluginCarla.cpp | 5 +-- source/modules/carla_native/vex/cADSR.h | 2 +- source/modules/carla_native/vex/cArp.h | 2 +- source/modules/carla_native/vex/cChorus.h | 2 +- source/modules/carla_native/vex/cDelay.h | 2 +- source/modules/carla_native/vex/cReverb.h | 2 +- source/modules/carla_native/vex/cSyntModule.h | 2 +- source/modules/carla_native/vex/cVoice.h | 2 +- .../modules/carla_native/vex/cWaveRenderer.h | 2 +- source/modules/juce_audio_basics.h | 26 ++++++++++++ source/modules/juce_audio_basics/Makefile | 2 +- source/modules/juce_core.h | 24 +++++++++++ source/modules/juce_core/Makefile | 2 +- source/modules/lilv/Makefile | 2 +- source/modules/rtmempool/Makefile | 2 +- source/modules/theme/Makefile | 2 +- source/modules/widgets/Makefile | 2 +- source/utils/CarlaJuceUtils.hpp | 2 +- source/utils/CarlaPipeUtils.hpp | 3 +- 27 files changed, 87 insertions(+), 83 deletions(-) rename source/modules/{carla_native => }/CarlaNative.h (100%) rename source/modules/{carla_native => }/CarlaNative.hpp (100%) delete mode 100755 source/modules/JuceHeader.h create mode 100644 source/modules/juce_audio_basics.h create mode 100644 source/modules/juce_core.h diff --git a/source/Makefile.mk b/source/Makefile.mk index b50449540..20ce89d67 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -32,7 +32,7 @@ CXX ?= g++ # -------------------------------------------------------------- BASE_FLAGS = -Wall -Wextra -fPIC -DPIC -pipe -BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections +BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections LINK_OPTS = -Wl,--gc-sections ifeq ($(RASPPI),true) diff --git a/source/backend/Makefile b/source/backend/Makefile index 7b30c901a..66fbb8acb 100644 --- a/source/backend/Makefile +++ b/source/backend/Makefile @@ -1,5 +1,5 @@ #!/usr/bin/make -f -# Makefile for carla backend # +# Makefile for carla-backend # # -------------------------- # # Created by falkTX # @@ -9,7 +9,7 @@ include ../Makefile.mk # -------------------------------------------------------------- all: -# $(MAKE) -C control + $(MAKE) -C control $(MAKE) -C engine $(MAKE) -C plugin $(MAKE) -C standalone @@ -17,7 +17,7 @@ all: # -------------------------------------------------------------- clean: -# $(MAKE) clean -C control + $(MAKE) clean -C control $(MAKE) clean -C engine $(MAKE) clean -C plugin $(MAKE) clean -C standalone diff --git a/source/discovery/Makefile b/source/discovery/Makefile index 37fec3215..8c50a499c 100644 --- a/source/discovery/Makefile +++ b/source/discovery/Makefile @@ -32,11 +32,6 @@ POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu POSIX_LINK_FLAGS = $(LINK_FLAGS) -ldl -ifeq ($(MACOS),true) -POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -endif - WIN_BUILD_FLAGS = $(BUILD_CXX_FLAGS) WIN_32BIT_FLAGS = $(32BIT_FLAGS) WIN_64BIT_FLAGS = $(64BIT_FLAGS) diff --git a/source/modules/carla_native/CarlaNative.h b/source/modules/CarlaNative.h similarity index 100% rename from source/modules/carla_native/CarlaNative.h rename to source/modules/CarlaNative.h diff --git a/source/modules/carla_native/CarlaNative.hpp b/source/modules/CarlaNative.hpp similarity index 100% rename from source/modules/carla_native/CarlaNative.hpp rename to source/modules/CarlaNative.hpp diff --git a/source/modules/JuceHeader.h b/source/modules/JuceHeader.h deleted file mode 100755 index 7445d2355..000000000 --- a/source/modules/JuceHeader.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Carla Juce setup - * Copyright (C) 2013 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. - */ - -#ifndef CARLA_JUCE_HEADER_H_INCLUDED -#define CARLA_JUCE_HEADER_H_INCLUDED - -// TODO - merge single file -#include "juce_core/AppConfig.h" -#include "juce_audio_basics/AppConfig.h" -// #include "juce_audio_formats/AppConfig.h" -// #include "juce_audio_devices/AppConfig.h" -// #include "juce_events/AppConfig.h" - -#include "juce_audio_basics/juce_audio_basics.h" -// #include "juce_audio_devices/juce_audio_devices.h" -// #include "juce_audio_formats/juce_audio_formats.h" -// #include "juce_audio_processors/juce_audio_processors.h" -#include "juce_core/juce_core.h" -// #include "juce_data_structures/juce_data_structures.h" -// #include "juce_events/juce_events.h" -// #include "juce_graphics/juce_graphics.h" -// #include "juce_gui_basics/juce_gui_basics.h" - -//#include "modules/juce_audio_utils/juce_audio_utils.h" -//#include "modules/juce_gui_extra/juce_gui_extra.h" - -#endif // CARLA_JUCE_HEADER_H_INCLUDED diff --git a/source/modules/carla_native/Makefile b/source/modules/carla_native/Makefile index 6f702d61f..8d731f415 100644 --- a/source/modules/carla_native/Makefile +++ b/source/modules/carla_native/Makefile @@ -8,8 +8,8 @@ include ../../Makefile.mk # -------------------------------------------------------------- -BUILD_C_FLAGS += -I. -I../../includes -BUILD_CXX_FLAGS += -I. -I.. -I../distrho -I../../includes -I../../utils +BUILD_C_FLAGS += -I. -I.. -I../../includes +BUILD_CXX_FLAGS += -I. -I.. -I../../includes -I../../utils -I../distrho # -------------------------------------------------------------- @@ -165,8 +165,8 @@ moc_%.cpp: %.hpp # -------------------------------------------------------------- -CDEPS = CarlaNative.h -CXXDEPS = CarlaNative.h CarlaNative.hpp +CDEPS = ../CarlaNative.h +CXXDEPS = ../CarlaNative.h ../CarlaNative.hpp audio_decoder/%.c.o: audio_decoder/%.c $(CC) $< $(AF_C_FLAGS) -c -o $@ @@ -174,19 +174,19 @@ audio_decoder/%.c.o: audio_decoder/%.c audio-file.cpp.o: audio-file.cpp audio-base.hpp $(CXXDEPS) $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ -distrho-3bandeq.cpp.o: distrho-3bandeq.cpp #3bandeq/*.cpp 3bandeq/*.h 3bandeq/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) +distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/*.cpp 3bandeq/*.h 3bandeq/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) $(CXX) $< $(GL_CXX_FLAGS) -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@ -distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp #3bandsplitter/*.cpp 3bandsplitter/*.h 3bandsplitter/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) +distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/*.cpp 3bandsplitter/*.h 3bandsplitter/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) $(CXX) $< $(GL_CXX_FLAGS) -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@ -distrho-nekobi.cpp.o: distrho-nekobi.cpp nekobi/*.cpp #nekobi/*.h nekobi/*.hpp nekobi/nekobee-src/*.c nekobi/nekobee-src/*.h distrho/DistrhoPluginCarla.cpp $(CXXDEPS) +distrho-nekobi.cpp.o: distrho-nekobi.cpp nekobi/*.cpp nekobi/*.h nekobi/*.hpp nekobi/nekobee-src/*.c nekobi/nekobee-src/*.h distrho/DistrhoPluginCarla.cpp $(CXXDEPS) $(CXX) $< $(GL_CXX_FLAGS) -Inekobi -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -c -o $@ -distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp #pingpongpan/*.cpp pingpongpan/*.h pingpongpan/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) +distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/*.cpp pingpongpan/*.h pingpongpan/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) $(CXX) $< $(GL_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@ -distrho-stereoenhancer.cpp.o: distrho-stereoenhancer.cpp #stereoenhancer/*.cpp stereoenhancer/*.h stereoenhancer/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) +distrho-stereoenhancer.cpp.o: distrho-stereoenhancer.cpp stereoenhancer/*.cpp stereoenhancer/*.h stereoenhancer/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) $(CXX) $< $(GL_CXX_FLAGS) -Istereoenhancer -DDISTRHO_NAMESPACE=DISTRHO_StereoEnhancer -c -o $@ distrho-notes.cpp.o: distrho-notes.cpp notes/*.cpp notes/*.h notes/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS) @@ -219,7 +219,7 @@ zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl # -------------------------------------------------------------- clean: - rm -f $(OBJS) ../carla_native.* + rm -f $(OBJS) ../carla_native*.a rm -f $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP) debug: diff --git a/source/modules/carla_native/audio-base.hpp b/source/modules/carla_native/audio-base.hpp index d61b5fd2b..526c413cd 100644 --- a/source/modules/carla_native/audio-base.hpp +++ b/source/modules/carla_native/audio-base.hpp @@ -20,7 +20,9 @@ #include "CarlaMutex.hpp" -#include "JuceHeader.h" +#include "juce_core.h" + +using juce::Thread; extern "C" { #include "audio_decoder/ad.h" @@ -109,11 +111,11 @@ public: virtual uint32_t getLastFrame() const = 0; }; -class AudioFileThread : public juce::Thread +class AudioFileThread : public Thread { public: AudioFileThread(AbstractAudioPlayer* const player, const double sampleRate) - : juce::Thread("AudioFileThread"), + : Thread("AudioFileThread"), kPlayer(player), fNeedsRead(false), fFilePtr(nullptr) diff --git a/source/modules/carla_native/distrho/DistrhoPluginCarla.cpp b/source/modules/carla_native/distrho/DistrhoPluginCarla.cpp index 204401903..f7d5726e9 100644 --- a/source/modules/carla_native/distrho/DistrhoPluginCarla.cpp +++ b/source/modules/carla_native/distrho/DistrhoPluginCarla.cpp @@ -23,9 +23,6 @@ #include "DistrhoPluginMain.cpp" -#define DISTRHO_PLUGIN_HAS_UI 1 -#define DISTRHO_UI_EXTERNAL - #if DISTRHO_PLUGIN_HAS_UI # include "DistrhoUIMain.cpp" # ifdef DISTRHO_UI_OPENGL @@ -205,7 +202,7 @@ public: void carla_setUiTitle(const char* const uiTitle) { #ifdef DISTRHO_UI_OPENGL - glWindow.setWindowTitle(uiName); + glWindow.setWindowTitle(uiTitle); #else writeMsg("uiTitle\n", 8); writeAndFixMsg(uiTitle); diff --git a/source/modules/carla_native/vex/cADSR.h b/source/modules/carla_native/vex/cADSR.h index aa7fefd05..c9eb8adb0 100644 --- a/source/modules/carla_native/vex/cADSR.h +++ b/source/modules/carla_native/vex/cADSR.h @@ -35,7 +35,7 @@ #define __JUCETICE_VEXCADSR_HEADER__ #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #else #include "../StandardHeader.h" #endif diff --git a/source/modules/carla_native/vex/cArp.h b/source/modules/carla_native/vex/cArp.h index b684366c7..76de20885 100644 --- a/source/modules/carla_native/vex/cArp.h +++ b/source/modules/carla_native/vex/cArp.h @@ -37,7 +37,7 @@ #include "cArpSettings.h" #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #else #include "../StandardHeader.h" #endif diff --git a/source/modules/carla_native/vex/cChorus.h b/source/modules/carla_native/vex/cChorus.h index 99ccd2584..853de434b 100644 --- a/source/modules/carla_native/vex/cChorus.h +++ b/source/modules/carla_native/vex/cChorus.h @@ -35,7 +35,7 @@ #define __JUCETICE_VEXCCHORUS_HEADER__ #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #else #include "../StandardHeader.h" #endif diff --git a/source/modules/carla_native/vex/cDelay.h b/source/modules/carla_native/vex/cDelay.h index aed9996bf..6a62cb02c 100644 --- a/source/modules/carla_native/vex/cDelay.h +++ b/source/modules/carla_native/vex/cDelay.h @@ -35,7 +35,7 @@ #define __JUCETICE_VEXCDELAY_HEADER__ #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #else #include "../StandardHeader.h" #endif diff --git a/source/modules/carla_native/vex/cReverb.h b/source/modules/carla_native/vex/cReverb.h index c5f6118f0..da9d1aef2 100644 --- a/source/modules/carla_native/vex/cReverb.h +++ b/source/modules/carla_native/vex/cReverb.h @@ -35,7 +35,7 @@ #define __JUCETICE_VEXCREVERB_HEADER__ #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #else #include "../StandardHeader.h" #endif diff --git a/source/modules/carla_native/vex/cSyntModule.h b/source/modules/carla_native/vex/cSyntModule.h index b4cd36c17..362834dd5 100644 --- a/source/modules/carla_native/vex/cSyntModule.h +++ b/source/modules/carla_native/vex/cSyntModule.h @@ -35,7 +35,7 @@ #define __JUCETICE_VEXCSYNTMODULE_HEADER__ #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #else #include "../StandardHeader.h" #endif diff --git a/source/modules/carla_native/vex/cVoice.h b/source/modules/carla_native/vex/cVoice.h index 4bc9923b7..075da0fa8 100644 --- a/source/modules/carla_native/vex/cVoice.h +++ b/source/modules/carla_native/vex/cVoice.h @@ -35,7 +35,7 @@ #define __JUCETICE_VEXCVOICE_HEADER__ #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #else #include "../StandardHeader.h" #endif diff --git a/source/modules/carla_native/vex/cWaveRenderer.h b/source/modules/carla_native/vex/cWaveRenderer.h index ce34f5a6f..0494ef658 100644 --- a/source/modules/carla_native/vex/cWaveRenderer.h +++ b/source/modules/carla_native/vex/cWaveRenderer.h @@ -35,7 +35,7 @@ #define __JUCETICE_VEXCWAVERENDERER_HEADER__ #ifdef CARLA_EXPORT - #include "JuceHeader.h" + #include "juce_audio_basics.h" #include "ResourceFile.h" #else #include "../StandardHeader.h" diff --git a/source/modules/juce_audio_basics.h b/source/modules/juce_audio_basics.h new file mode 100644 index 000000000..a0fb3f23b --- /dev/null +++ b/source/modules/juce_audio_basics.h @@ -0,0 +1,26 @@ +/* + * Carla Juce setup + * Copyright (C) 2013 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. + */ + +#ifndef CARLA_JUCE_AUDIO_BASICS_H_INCLUDED +#define CARLA_JUCE_AUDIO_BASICS_H_INCLUDED + +#include "juce_core.h" + +#include "juce_audio_basics/AppConfig.h" +#include "juce_audio_basics/juce_audio_basics.h" + +#endif // CARLA_JUCE_AUDIO_BASICS_H_INCLUDED diff --git a/source/modules/juce_audio_basics/Makefile b/source/modules/juce_audio_basics/Makefile index 73e5525d1..0f5a96bd9 100644 --- a/source/modules/juce_audio_basics/Makefile +++ b/source/modules/juce_audio_basics/Makefile @@ -82,7 +82,7 @@ win64: ../juce_audio_basics.win64.a # -------------------------------------------------------------- clean: - rm -f *.o ../juce_audio_basics.* + rm -f *.o ../juce_audio_basics*.a debug: $(MAKE) DEBUG=true diff --git a/source/modules/juce_core.h b/source/modules/juce_core.h new file mode 100644 index 000000000..91bf3a3bc --- /dev/null +++ b/source/modules/juce_core.h @@ -0,0 +1,24 @@ +/* + * Carla Juce setup + * Copyright (C) 2013 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. + */ + +#ifndef CARLA_JUCE_CORE_H_INCLUDED +#define CARLA_JUCE_CORE_H_INCLUDED + +#include "juce_core/AppConfig.h" +#include "juce_core/juce_core.h" + +#endif // CARLA_JUCE_CORE_H_INCLUDED diff --git a/source/modules/juce_core/Makefile b/source/modules/juce_core/Makefile index 664a442bd..558e87a2b 100644 --- a/source/modules/juce_core/Makefile +++ b/source/modules/juce_core/Makefile @@ -82,7 +82,7 @@ win64: ../juce_core.win64.a # -------------------------------------------------------------- clean: - rm -f *.o ../juce_core.* + rm -f *.o ../juce_core*.a debug: $(MAKE) DEBUG=true diff --git a/source/modules/lilv/Makefile b/source/modules/lilv/Makefile index 852c1ddc2..11acf0a7a 100644 --- a/source/modules/lilv/Makefile +++ b/source/modules/lilv/Makefile @@ -102,7 +102,7 @@ lilv.c.%64.o: lilv.c # -------------------------------------------------------------- clean: - rm -f *.o ../lilv.* + rm -f *.o ../lilv*.a debug: $(MAKE) DEBUG=true diff --git a/source/modules/rtmempool/Makefile b/source/modules/rtmempool/Makefile index e4134ed8c..ba618fa92 100644 --- a/source/modules/rtmempool/Makefile +++ b/source/modules/rtmempool/Makefile @@ -77,7 +77,7 @@ win64: ../rtmempool.win64.a # -------------------------------------------------------------- clean: - rm -f *.o ../rtmempool.* + rm -f *.o ../rtmempool*.a debug: $(MAKE) DEBUG=true diff --git a/source/modules/theme/Makefile b/source/modules/theme/Makefile index 13abdd513..3e84c09dc 100644 --- a/source/modules/theme/Makefile +++ b/source/modules/theme/Makefile @@ -147,7 +147,7 @@ install: ../carlastyle.so install -m 644 $< $(QT_STYLES_DIR) clean: - rm -f *.o ../theme.* $(FILES) + rm -f *.o ../theme*.a $(FILES) debug: $(MAKE) DEBUG=true diff --git a/source/modules/widgets/Makefile b/source/modules/widgets/Makefile index 0a6391be5..db2ae6042 100644 --- a/source/modules/widgets/Makefile +++ b/source/modules/widgets/Makefile @@ -58,7 +58,7 @@ moc_%.cpp: %.hpp # -------------------------------------------------------------- clean: - rm -f *.o ../widgets.* $(FILES) + rm -f *.o ../widgets*.a $(FILES) debug: $(MAKE) DEBUG=true diff --git a/source/utils/CarlaJuceUtils.hpp b/source/utils/CarlaJuceUtils.hpp index cee916151..57b084d9e 100644 --- a/source/utils/CarlaJuceUtils.hpp +++ b/source/utils/CarlaJuceUtils.hpp @@ -20,7 +20,7 @@ #include "CarlaUtils.hpp" -#include "JuceHeader.h" +#include "juce_core.h" #define CARLA_PREVENT_HEAP_ALLOCATION \ JUCE_PREVENT_HEAP_ALLOCATION diff --git a/source/utils/CarlaPipeUtils.hpp b/source/utils/CarlaPipeUtils.hpp index 7aa584119..75593d063 100644 --- a/source/utils/CarlaPipeUtils.hpp +++ b/source/utils/CarlaPipeUtils.hpp @@ -1,5 +1,6 @@ /* - * Carla Pipe utils + * Carla Pipe utils based on lv2fil UI code + * Copyright (C) 2009 Nedko Arnaudov * Copyright (C) 2013 Filipe Coelho * * This program is free software; you can redistribute it and/or