Browse Source

Fix OSX build and minor things detected by clang

tags/1.9.4
falkTX 11 years ago
parent
commit
fb7017de85
10 changed files with 25 additions and 15 deletions
  1. +3
    -3
      data/macos/build.sh
  2. +7
    -4
      source/Makefile.mk
  3. +2
    -2
      source/backend/CarlaEngine.hpp
  4. +2
    -2
      source/backend/engine/CarlaEngineJack.cpp
  5. +1
    -0
      source/backend/plugin/JucePlugin.cpp
  6. +6
    -0
      source/includes/CarlaDefines.h
  7. +1
    -1
      source/modules/juce_audio_basics/Makefile
  8. +1
    -1
      source/modules/juce_audio_formats/Makefile
  9. +1
    -1
      source/modules/juce_core/system/juce_SystemStats.cpp
  10. +1
    -1
      source/modules/juce_data_structures/Makefile

+ 3
- 3
data/macos/build.sh View File

@@ -13,9 +13,9 @@ export CC=clang
export CXX=clang++
export CXFREEZE="/opt/carla/bin/cxfreeze --include-modules=re,sip,subprocess,inspect"

unset CFLAGS
unset CXXFLAGS
unset LDLAGS
export CFLAGS=-m64
export CXXFLAGS=-m64
export LDLAGS=-m64

export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=/opt/carla/lib/pkgconfig:/opt/carla64/lib/pkgconfig


+ 7
- 4
source/Makefile.mk View File

@@ -51,11 +51,14 @@ endif
# Common build and link flags

BASE_FLAGS = -Wall -Wextra -pipe -DREAL_BUILD
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections
# LINK_OPTS += -Wl,--strip-all

ifeq ($(MACOS),true)
ifneq ($(MACOS),true)
# MacOS doesn't support this
BASE_OPTS += -mfpmath=sse
else
# MacOS linker flags
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs
endif
@@ -148,8 +151,6 @@ ifneq ($(MACOS_OR_WIN32),true)
HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true)
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
ifeq ($(LINUX),true)
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
@@ -157,6 +158,8 @@ HAVE_X11 = $(shell pkg-config --exists x11 && echo true)
endif
endif

HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)



+ 2
- 2
source/backend/CarlaEngine.hpp View File

@@ -1046,9 +1046,9 @@ protected:
* Some internal classes read directly from pData.
*/
friend class EngineInternalGraph;
friend class PatchbayGraph;
friend class RackGraph;
friend class ScopedActionLock;
friend struct PatchbayGraph;
friend struct RackGraph;

// -------------------------------------------------------------------
// Internal stuff


+ 2
- 2
source/backend/engine/CarlaEngineJack.cpp View File

@@ -39,11 +39,11 @@ using juce::FloatVectorOperations;
using juce::String;
using juce::StringArray;

CARLA_BACKEND_START_NAMESPACE

class CarlaEngineJack;
class CarlaEngineJackClient;

CARLA_BACKEND_START_NAMESPACE

// -----------------------------------------------------------------------
// Fallback data



+ 1
- 0
source/backend/plugin/JucePlugin.cpp View File

@@ -21,6 +21,7 @@
#if (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))

#include "CarlaBackendUtils.hpp"
#include "CarlaMathUtils.hpp"
#include "JucePluginWindow.hpp"

#include "juce_audio_processors.h"


+ 6
- 0
source/includes/CarlaDefines.h View File

@@ -97,6 +97,12 @@
# define P_INTPTR "%i"
# define P_UINTPTR "%x"
# define P_SIZE "%u"
#elif defined(CARLA_OS_MAC) && defined(__LP64__)
# define P_INT64 "%lli"
# define P_UINT64 "%llu"
# define P_INTPTR "%li"
# define P_UINTPTR "%lx"
# define P_SIZE "%lu"
#elif defined(__WORDSIZE) && __WORDSIZE == 64
# define P_INT64 "%li"
# define P_UINT64 "%lu"


+ 1
- 1
source/modules/juce_audio_basics/Makefile View File

@@ -77,7 +77,7 @@ juce_audio_basics.cpp.%64.o: $(CPP_DEPS)

# --------------------------------------------------------------

MM_DEPS = juce_audio_basics.mm juce_audio_basics.h AppConfig.h */*.mm */*.cpp */*.h
MM_DEPS = juce_audio_basics.mm juce_audio_basics.h AppConfig.h */*.cpp */*.h

juce_audio_basics.mm.o: $(MM_DEPS)
$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@


+ 1
- 1
source/modules/juce_audio_formats/Makefile View File

@@ -77,7 +77,7 @@ juce_audio_formats.cpp.%64.o: $(CPP_DEPS)

# --------------------------------------------------------------

MM_DEPS = juce_audio_formats.mm juce_audio_formats.h AppConfig.h */*.mm */*.cpp */*.h
MM_DEPS = juce_audio_formats.mm juce_audio_formats.h AppConfig.h */*.cpp */*.h

juce_audio_formats.mm.o: $(MM_DEPS)
$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@


+ 1
- 1
source/modules/juce_core/system/juce_SystemStats.cpp View File

@@ -97,7 +97,7 @@ String SystemStats::getStackBacktrace()
{
String result;
#if JUCE_ANDROID || JUCE_MINGW || JUCE_HAIKU
#if JUCE_ANDROID || JUCE_MINGW || JUCE_HAIKU || JUCE_MAC
jassertfalse; // sorry, not implemented yet!
#elif JUCE_WINDOWS


+ 1
- 1
source/modules/juce_data_structures/Makefile View File

@@ -77,7 +77,7 @@ juce_data_structures.cpp.%64.o: $(CPP_DEPS)

# --------------------------------------------------------------

MM_DEPS = juce_data_structures.mm juce_data_structures.h AppConfig.h */*.mm */*.cpp */*.h
MM_DEPS = juce_data_structures.mm juce_data_structures.h AppConfig.h */*.cpp */*.h

juce_data_structures.mm.o: $(MM_DEPS)
$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@


Loading…
Cancel
Save