Browse Source

some MacOS build fixes

tags/1.9.4
falkTX 11 years ago
parent
commit
916daae559
6 changed files with 19 additions and 5 deletions
  1. +5
    -1
      source/Makefile.mk
  2. +6
    -0
      source/modules/carla_native/vex-synth.cpp
  3. +4
    -0
      source/modules/jackbridge/JackBridge2.cpp
  4. +1
    -0
      source/modules/lilv/lilv.c
  5. +1
    -1
      source/modules/theme/Makefile
  6. +2
    -3
      source/utils/CarlaUtils.hpp

+ 5
- 1
source/Makefile.mk View File

@@ -41,12 +41,16 @@ endif
# -------------------------------------------------------------- # --------------------------------------------------------------
# Common build and link flags # Common build and link flags


BASE_FLAGS = -Wall -Wextra -Wcast-qual -Wconversion -Wlogical-op -Werror -fPIC -DPIC -pipe -DREAL_BUILD
BASE_FLAGS = -Wall -Wextra -Wcast-qual -Wconversion -fPIC -DPIC -pipe -DREAL_BUILD
BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections


# -Waggregate-return -Wsign-conversion # -Waggregate-return -Wsign-conversion


ifneq ($(MACOS),true)
BASE_FLAGS += -Wlogical-op -Werror
endif

ifeq ($(RASPPI),true) ifeq ($(RASPPI),true)
# Raspberry-Pi optimization flags # Raspberry-Pi optimization flags
BASE_OPTS = -O3 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard BASE_OPTS = -O3 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard


+ 6
- 0
source/modules/carla_native/vex-synth.cpp View File

@@ -741,7 +741,13 @@ protected:
break; break;
} }


#ifndef CARLA_OS_MAC
tmpName[4] = '0' + ((index-1+24) / 24); tmpName[4] = '0' + ((index-1+24) / 24);
#else
// MacOS has a problem with this
char* tmpBuf(const_cast<char*>(tmpName.getBuffer()));
tmpBuf[4] = '0' + ((index-1+24) / 24);
#endif


paramInfo.name = (const char*)tmpName; paramInfo.name = (const char*)tmpName;
paramInfo.hints = static_cast<NativeParameterHints>(hints); paramInfo.hints = static_cast<NativeParameterHints>(hints);


+ 4
- 0
source/modules/jackbridge/JackBridge2.cpp View File

@@ -18,6 +18,10 @@


#include "JackBridge.hpp" #include "JackBridge.hpp"


#ifdef CARLA_OS_MAC
# include <unistd.h>
#endif

#ifndef JACKBRIDGE_HPP_INCLUDED #ifndef JACKBRIDGE_HPP_INCLUDED
// don't include the whole JACK API in this file // don't include the whole JACK API in this file
CARLA_EXPORT bool jackbridge_sem_init(void* sem); CARLA_EXPORT bool jackbridge_sem_init(void* sem);


+ 1
- 0
source/modules/lilv/lilv.c View File

@@ -19,6 +19,7 @@
#include "src/lib.c" #include "src/lib.c"
#include "src/node.c" #include "src/node.c"
#include "src/plugin.c" #include "src/plugin.c"
#undef USTR
#include "src/pluginclass.c" #include "src/pluginclass.c"
#include "src/port.c" #include "src/port.c"
#include "src/query.c" #include "src/query.c"


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

@@ -110,7 +110,7 @@ qt5: ../theme.qt5.a
styles/carlastyle.dll: $(FILES_shared) $(OBJS_shared) styles/carlastyle.dll: $(FILES_shared) $(OBJS_shared)
$(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -shared -o $@ $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -shared -o $@


styles/carlastyle.dynlib: $(FILES_shared) $(OBJS_shared)
styles/carlastyle.dylib: $(FILES_shared) $(OBJS_shared)
$(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -dynamiclib -o $@ $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -dynamiclib -o $@


styles/carlastyle.so: $(FILES_shared) $(OBJS_shared) styles/carlastyle.so: $(FILES_shared) $(OBJS_shared)


+ 2
- 3
source/utils/CarlaUtils.hpp View File

@@ -411,14 +411,13 @@ inline float
/* /*
* Clear a char array. * Clear a char array.
*/ */
template<typename C = char>
static inline static inline
void carla_zeroChar(C* const data, const size_t numChars) noexcept
void carla_zeroChar(char* const data, const size_t numChars) noexcept
{ {
CARLA_SAFE_ASSERT_RETURN(data != nullptr,); CARLA_SAFE_ASSERT_RETURN(data != nullptr,);
CARLA_SAFE_ASSERT_RETURN(numChars > 0,); CARLA_SAFE_ASSERT_RETURN(numChars > 0,);


std::memset(data, 0, numChars*sizeof(C));
std::memset(data, 0, numChars*sizeof(char));
} }


/* /*


Loading…
Cancel
Save