Browse Source

OSX related fixes; Add 'MACOS_OLD=true' if using apple-gcc4.2

pull/6/head
falkTX 8 years ago
parent
commit
1e83d2a9ce
3 changed files with 14 additions and 16 deletions
  1. +12
    -14
      dgl/Makefile.mk
  2. +1
    -1
      dgl/src/Window.cpp
  3. +1
    -1
      distrho/DistrhoUtils.hpp

+ 12
- 14
dgl/Makefile.mk View File

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

BASE_FLAGS = -Wall -Wextra -pipe -MD -MP
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections
BASE_OPTS = -O2 -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
endif

@@ -40,19 +40,13 @@ endif

ifeq ($(RASPPI),true)
# 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
endif

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

ifneq ($(WIN32),true)
@@ -68,14 +62,18 @@ BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
CXXFLAGS += -fvisibility-inlines-hidden
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)

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

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

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


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

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

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

#undef PUGL_HAVE_CAIRO
#undef PUGL_HAVE_GL


+ 1
- 1
distrho/DistrhoUtils.hpp View File

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

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


Loading…
Cancel
Save