Browse Source

OSX related fixes, import into DPF later please

tags/v1.0
falkTX 9 years ago
parent
commit
c7bc2e81d8
4 changed files with 21 additions and 30 deletions
  1. +8
    -10
      Makefile.mk
  2. +11
    -18
      dpf/dgl/Makefile.mk
  3. +1
    -1
      dpf/dgl/src/Window.cpp
  4. +1
    -1
      dpf/distrho/DistrhoUtils.hpp

+ 8
- 10
Makefile.mk View File

@@ -25,8 +25,8 @@ endif
BASE_FLAGS = -Wall -Wextra -pipe BASE_FLAGS = -Wall -Wextra -pipe
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections


ifneq ($(MACOS),true)
# MacOS doesn't support this
ifneq ($(MACOS_OLD),true)
# Old MacOS doesn't support this
BASE_OPTS += -mfpmath=sse BASE_OPTS += -mfpmath=sse
endif endif


@@ -44,12 +44,6 @@ BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif endif


ifeq ($(PANDORA),true)
# OpenPandora optimization flags
BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif

ifeq ($(NOOPT),true) ifeq ($(NOOPT),true)
# No optimization flags # No optimization flags
BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
@@ -69,13 +63,17 @@ CXXFLAGS += -fvisibility-inlines-hidden
endif endif


BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -std=gnu99 $(CFLAGS) BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x -std=gnu++0x $(CXXFLAGS) $(CPPFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++11 $(CXXFLAGS) $(CPPFLAGS)
LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS) LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS)


ifeq ($(MACOS),true) ifeq ($(MACOS),true)
# 'no-undefined' is always enabled
LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif

ifeq ($(MACOS_OLD),true)
# No C++11 support # No C++11 support
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) $(CPPFLAGS)
LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif endif


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


+ 11
- 18
dpf/dgl/Makefile.mk View File

@@ -23,12 +23,7 @@ endif
# Set build and link flags # Set build and link flags


BASE_FLAGS = -Wall -Wextra -pipe -MD -MP BASE_FLAGS = -Wall -Wextra -pipe -MD -MP
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections

ifneq ($(MACOS),true)
# MacOS doesn't support this
BASE_OPTS += -mfpmath=sse
endif
BASE_OPTS = -O2 -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections


ifeq ($(MACOS),true) ifeq ($(MACOS),true)
# MacOS linker flags # MacOS linker flags
@@ -40,19 +35,13 @@ endif


ifeq ($(RASPPI),true) ifeq ($(RASPPI),true)
# Raspberry-Pi optimization flags # Raspberry-Pi optimization flags
BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif

ifeq ($(PANDORA),true)
# OpenPandora optimization flags
BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
BASE_OPTS = -O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif endif


ifneq ($(NOOPT),true)
ifeq ($(NOOPT),true)
# No optimization flags # No optimization flags
BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
BASE_OPTS = -O2 -fdata-sections -ffunction-sections
endif endif


ifneq ($(WIN32),true) ifneq ($(WIN32),true)
@@ -68,14 +57,18 @@ BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
CXXFLAGS += -fvisibility-inlines-hidden CXXFLAGS += -fvisibility-inlines-hidden
endif endif


BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x -std=gnu++0x $(CXXFLAGS) $(CPPFLAGS)
BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++11 $(CXXFLAGS) $(CPPFLAGS)
LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS) LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS)


ifeq ($(MACOS),true) ifeq ($(MACOS),true)
# 'no-undefined' is always enabled
LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif

ifeq ($(MACOS_OLD),true)
# No C++11 support # No C++11 support
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) $(CPPFLAGS)
LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif endif


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


+ 1
- 1
dpf/dgl/src/Window.cpp View File

@@ -17,7 +17,7 @@
// we need this for now // we need this for now
//#define PUGL_GRAB_FOCUS 1 //#define PUGL_GRAB_FOCUS 1


#include "../../distrho/src/DistrhoDefines.h"
#include "../Base.hpp"


#undef PUGL_HAVE_CAIRO #undef PUGL_HAVE_CAIRO
#undef PUGL_HAVE_GL #undef PUGL_HAVE_GL


+ 1
- 1
dpf/distrho/DistrhoUtils.hpp View File

@@ -33,7 +33,7 @@
# include <stdint.h> # include <stdint.h>
#endif #endif


#if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC)
#if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! defined(__clang__)
namespace std { namespace std {
inline float fmin(float __x, float __y) inline float fmin(float __x, float __y)
{ return __builtin_fminf(__x, __y); } { return __builtin_fminf(__x, __y); }


Loading…
Cancel
Save