Browse Source

Rework and cleanup makefiles, add WASM var

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.0
falkTX 2 years ago
parent
commit
b23293efeb
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
27 changed files with 315 additions and 239 deletions
  1. +203
    -163
      source/Makefile.deps.mk
  2. +30
    -29
      source/Makefile.mk
  3. +4
    -0
      source/backend/Makefile
  4. +5
    -1
      source/backend/engine/Makefile
  5. +5
    -1
      source/backend/plugin/Makefile
  6. +6
    -2
      source/bridges-plugin/Makefile
  7. +2
    -2
      source/bridges-ui/Makefile
  8. +2
    -8
      source/discovery/Makefile
  9. +1
    -1
      source/jackbridge/Makefile
  10. +1
    -1
      source/modules/carla_juce/Makefile
  11. +2
    -2
      source/modules/juce_audio_basics/Makefile
  12. +2
    -2
      source/modules/juce_audio_devices/Makefile
  13. +2
    -2
      source/modules/juce_audio_processors/Makefile
  14. +2
    -2
      source/modules/juce_core/Makefile
  15. +1
    -1
      source/modules/juce_data_structures/Makefile
  16. +2
    -2
      source/modules/juce_events/Makefile
  17. +2
    -2
      source/modules/juce_graphics/Makefile
  18. +2
    -2
      source/modules/juce_gui_basics/Makefile
  19. +1
    -1
      source/modules/juce_gui_extra/Makefile
  20. +1
    -1
      source/modules/rtaudio/Makefile
  21. +4
    -0
      source/modules/sfzero/Makefile
  22. +4
    -0
      source/modules/water/Makefile
  23. +17
    -8
      source/modules/ysfx/Makefile
  24. +4
    -0
      source/native-plugins/Makefile
  25. +1
    -1
      source/native-plugins/external
  26. +8
    -4
      source/plugin/Makefile
  27. +1
    -1
      source/theme/Makefile

+ 203
- 163
source/Makefile.deps.mk View File

@@ -4,6 +4,13 @@
# Created by falkTX
#

# ---------------------------------------------------------------------------------------------------------------------
# Base environment vars

AR ?= ar
CC ?= gcc
CXX ?= g++

# ---------------------------------------------------------------------------------------------------------------------
# Auto-detect OS if not defined

@@ -14,28 +21,31 @@ ifneq ($(HAIKU),true)
ifneq ($(HURD),true)
ifneq ($(LINUX),true)
ifneq ($(MACOS),true)
ifneq ($(WIN32),true)
ifneq ($(WASM),true)
ifneq ($(WINDOWS),true)

ifneq (,$(findstring bsd,$(TARGET_MACHINE)))
BSD=true
BSD = true
else ifneq (,$(findstring haiku,$(TARGET_MACHINE)))
HAIKU=true
HAIKU = true
else ifneq (,$(findstring linux,$(TARGET_MACHINE)))
LINUX=true
LINUX = true
else ifneq (,$(findstring gnu,$(TARGET_MACHINE)))
HURD=true
HURD = true
else ifneq (,$(findstring apple,$(TARGET_MACHINE)))
MACOS=true
MACOS = true
else ifneq (,$(findstring mingw,$(TARGET_MACHINE)))
WIN32=true
ifneq (,$(findstring x86_64,$(TARGET_MACHINE)))
WIN64=true
endif
WINDOWS = true
else ifneq (,$(findstring msys,$(TARGET_MACHINE)))
WIN32=true
WINDOWS = true
else ifneq (,$(findstring wasm,$(TARGET_MACHINE)))
WASM = true
else ifneq (,$(findstring windows,$(TARGET_MACHINE)))
WINDOWS = true
endif

endif # WIN32
endif # WINDOWS
endif # WASM
endif # MACOS
endif # LINUX
endif # HURD
@@ -48,91 +58,95 @@ endif # BSD
TARGET_PROCESSOR := $(firstword $(subst -, ,$(TARGET_MACHINE)))

ifneq (,$(filter i%86,$(TARGET_PROCESSOR)))
CPU_I386=true
CPU_I386_OR_X86_64=true
CPU_I386 = true
CPU_I386_OR_X86_64 = true
endif
ifneq (,$(filter wasm32,$(TARGET_PROCESSOR)))
CPU_I386 = true
CPU_I386_OR_X86_64 = true
endif
ifneq (,$(filter x86_64,$(TARGET_PROCESSOR)))
CPU_X86_64=true
CPU_I386_OR_X86_64=true
CPU_X86_64 = true
CPU_I386_OR_X86_64 = true
endif
ifneq (,$(filter arm%,$(TARGET_PROCESSOR)))
CPU_ARM=true
CPU_ARM_OR_AARCH64=true
CPU_ARM = true
CPU_ARM_OR_AARCH64 = true
endif
ifneq (,$(filter arm64%,$(TARGET_PROCESSOR)))
CPU_ARM64=true
CPU_ARM_OR_AARCH64=true
CPU_ARM64 = true
CPU_ARM_OR_AARCH64 = true
endif
ifneq (,$(filter aarch64%,$(TARGET_PROCESSOR)))
CPU_AARCH64=true
CPU_ARM_OR_AARCH64=true
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set wherever to build static binaries (Windows only)

ifeq ($(WIN32),true)
ifneq ($(MSYSTEM),MINGW32)
ifneq ($(MSYSTEM),MINGW64)
STATIC_BINARIES = true
endif
endif
CPU_AARCH64 = true
CPU_ARM_OR_AARCH64 = true
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set PKG_CONFIG (can be overridden by environment variable)

ifeq ($(WINDOWS),true)
# Build statically on Windows by default
PKG_CONFIG ?= pkg-config --static
else
PKG_CONFIG ?= pkg-config

ifeq ($(STATIC_BINARIES),true)
PKG_CONFIG_FLAGS = --static
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set LINUX_OR_MACOS

ifeq ($(LINUX),true)
LINUX_OR_MACOS=true
LINUX_OR_MACOS = true
endif

ifeq ($(MACOS),true)
LINUX_OR_MACOS=true
LINUX_OR_MACOS = true
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set MACOS_OR_WIN32 and HAIKU_OR_MACOS_OR_WINDOWS
# Set HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS, HAIKU_OR_MACOS_OR_WINDOWS, MACOS_OR_WASM_OR_WINDOWS and MACOS_OR_WINDOWS

ifeq ($(HAIKU),true)
HAIKU_OR_MACOS_OR_WIN32=true
HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS = true
HAIKU_OR_MACOS_OR_WINDOWS = true
endif

ifeq ($(MACOS),true)
MACOS_OR_WIN32=true
HAIKU_OR_MACOS_OR_WIN32=true
HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS = true
HAIKU_OR_MACOS_OR_WINDOWS = true
MACOS_OR_WASM_OR_WINDOWS = true
MACOS_OR_WINDOWS = true
endif

ifeq ($(WASM),true)
HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS = true
MACOS_OR_WASM_OR_WINDOWS = true
endif

ifeq ($(WIN32),true)
MACOS_OR_WIN32=true
HAIKU_OR_MACOS_OR_WIN32=true
ifeq ($(WINDOWS),true)
HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS = true
HAIKU_OR_MACOS_OR_WINDOWS = true
MACOS_OR_WASM_OR_WINDOWS = true
MACOS_OR_WINDOWS = true
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set UNIX

ifeq ($(BSD),true)
UNIX=true
UNIX = true
endif

ifeq ($(HURD),true)
UNIX=true
UNIX = true
endif

ifeq ($(LINUX),true)
UNIX=true
UNIX = true
endif

ifeq ($(MACOS),true)
UNIX=true
UNIX = true
endif

# ---------------------------------------------------------------------------------------------------------------------
@@ -141,19 +155,13 @@ endif
ifeq ($(LINUX),true)
HAVE_ALSA = $(shell $(PKG_CONFIG) --exists alsa && echo true)
HAVE_HYLIA = true
endif

ifeq ($(MACOS),true)
ifneq ($(MACOS_OLD),true)
else ifeq ($(MACOS),true)
HAVE_HYLIA = true
endif
endif

ifeq ($(WIN32),true)
else ifeq ($(WINDOWS),true)
HAVE_HYLIA = true
endif

ifeq ($(MACOS_OR_WIN32),true)
ifeq ($(MACOS_OR_WASM_OR_WINDOWS),true)
HAVE_DGL = true
HAVE_YSFXGUI = true
else
@@ -162,6 +170,11 @@ HAVE_YSFXGUI = $(shell $(PKG_CONFIG) --exists freetype2 fontconfig gl x11 && ech
HAVE_X11 = $(shell $(PKG_CONFIG) --exists x11 && echo true)
endif

# FIXME update to DGL with wasm compat
ifeq ($(WASM),true)
HAVE_DGL = false
endif

# NOTE not yet implemented, disabled for now
HAVE_YSFXGUI = false

@@ -176,7 +189,6 @@ HAVE_FFMPEG = $(shell $(PKG_CONFIG) --max-version=56.60.100 libavcodec && \
$(PKG_CONFIG) --max-version=56.40.101 libavformat && \
$(PKG_CONFIG) --max-version=54.31.100 libavutil && echo true)
HAVE_FLUIDSYNTH = $(shell $(PKG_CONFIG) --atleast-version=1.1.7 fluidsynth && echo true)
HAVE_JACK = $(shell $(PKG_CONFIG) --exists jack && echo true)
HAVE_LIBLO = $(shell $(PKG_CONFIG) --exists liblo && echo true)
HAVE_QT4 = $(shell $(PKG_CONFIG) --exists QtCore QtGui && echo true)
HAVE_QT5 = $(shell $(PKG_CONFIG) --exists Qt5Core Qt5Gui Qt5Widgets && \
@@ -189,6 +201,14 @@ HAVE_FLUIDSYNTH_INSTPATCH = $(shell $(PKG_CONFIG) --atleast-version=2.1.0 fluids
$(PKG_CONFIG) --atleast-version=1.1.4 libinstpatch-1.0 && echo true)
endif

ifeq ($(JACKBRIDGE_DIRECT),true)
HAVE_JACK = $(shell $(PKG_CONFIG) --exists jack && echo true)
HAVE_JACKLIB = $(HAVE_JACK)
else
HAVE_JACK = true
HAVE_JACKLIB = false
endif

ifeq ($(LINUX),true)
# juce only supports the most common architectures
ifneq (,$(findstring arm,$(TARGET_MACHINE)))
@@ -217,7 +237,8 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# Check for optional libs (special non-pkgconfig tests)

ifneq ($(WIN32),true)
ifneq ($(WASM),true)
ifneq ($(WINDOWS),true)

ifeq ($(shell $(PKG_CONFIG) --exists libmagic && echo true),true)
HAVE_LIBMAGIC = true
@@ -228,6 +249,7 @@ CFLAGS_WITHOUT_ARCH = $(subst -arch arm64,,$(CFLAGS))
HAVE_LIBMAGIC = $(shell echo '\#include <magic.h>' | $(CC) $(CFLAGS_WITHOUT_ARCH) -x c -w -c - -o /dev/null 2>/dev/null && echo true)
endif

endif
endif

# ---------------------------------------------------------------------------------------------------------------------
@@ -236,12 +258,11 @@ endif
ifeq ($(HAVE_QT4),true)
MOC_QT4 ?= $(shell $(PKG_CONFIG) --variable=moc_location QtCore)
RCC_QT4 ?= $(shell $(PKG_CONFIG) --variable=rcc_location QtCore)
UIC_QT4 ?= $(shell $(PKG_CONFIG) --variable=uic_location QtCore)
ifeq (,$(wildcard $(MOC_QT4)))
HAVE_QT4=false
HAVE_QT4 = false
endif
ifeq (,$(wildcard $(RCC_QT4)))
HAVE_QT4=false
HAVE_QT4 = false
endif
endif

@@ -249,23 +270,22 @@ ifeq ($(HAVE_QT5),true)
QT5_HOSTBINS = $(shell $(PKG_CONFIG) --variable=host_bins Qt5Core)
MOC_QT5 ?= $(QT5_HOSTBINS)/moc
RCC_QT5 ?= $(QT5_HOSTBINS)/rcc
UIC_QT5 ?= $(QT5_HOSTBINS)/uic
ifeq (,$(wildcard $(MOC_QT5)))
HAVE_QT5=false
HAVE_QT5 = false
endif
ifeq (,$(wildcard $(RCC_QT5)))
HAVE_QT5=false
HAVE_QT5 = false
endif
endif

ifeq ($(HAVE_QT4),true)
HAVE_QT=true
HAVE_QT = true
endif
ifeq ($(HAVE_QT5),true)
HAVE_QT=true
HAVE_QT = true
endif
ifeq ($(WIN32),true)
HAVE_QT=true
ifeq ($(WINDOWS),true)
HAVE_QT = true
endif

# ---------------------------------------------------------------------------------------------------------------------
@@ -288,27 +308,16 @@ PYUIC ?= $(PYUIC5)

ifeq ($(HAVE_QT5),true)
HAVE_THEME = true
# else
# ifeq ($(MACOS),true)
# ifneq ($(MACOS_OLD),true)
# ifeq ($(HAVE_PYQT),true)
# HAVE_THEME = true
# MOC_QT5 ?= moc
# RCC_QT5 ?= rcc
# UIC_QT5 ?= uic
# endif
# endif
# endif
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set USING_JUCE

ifeq ($(MACOS_OR_WIN32),true)
ifneq ($(MACOS_OLD),true)
ifeq ($(MACOS_OR_WINDOWS),true)
USING_JUCE = true
USING_JUCE_AUDIO_DEVICES = true
endif
else ifeq ($(HAVE_JUCE_LINUX_DEPS),true)
USING_JUCE = true
endif

# ---------------------------------------------------------------------------------------------------------------------
@@ -326,6 +335,7 @@ endif
ifeq ($(STATIC_PLUGIN_TARGET),true)
HAVE_ALSA = false
HAVE_JACK = false
HAVE_JACKLIB = false
HAVE_HYLIA = false
HAVE_LIBLO = false
HAVE_PULSEAUDIO = false
@@ -341,81 +351,101 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# Set libs stuff (part 1)

ifneq ($(HAIKU_OR_MACOS_OR_WIN32),true)
ifneq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
LIBDL_LIBS = -ldl
endif

ifeq ($(HAVE_DGL),true)
ifeq ($(MACOS),true)
DGL_LIBS = -framework OpenGL -framework Cocoa
endif
ifeq ($(WIN32),true)
DGL_LIBS = -lopengl32 -lgdi32
endif
ifneq ($(MACOS_OR_WIN32),true)
DGL_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags gl x11)
DGL_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs gl x11)
endif
endif

ifeq ($(HAVE_LIBLO),true)
LIBLO_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags liblo)
LIBLO_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs liblo)
endif

ifeq ($(HAVE_LIBMAGICPKG),true)
MAGIC_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags libmagic)
# this is missing in upstream pkg-config
MAGIC_FLAGS += -I$(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --variable=includedir libmagic)
MAGIC_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs libmagic)
else ifeq ($(HAVE_LIBMAGIC),true)
MAGIC_LIBS += -lmagic
ifeq ($(LINUX_OR_MACOS),true)
MAGIC_LIBS += -lz
endif
LIBLO_FLAGS = $(shell $(PKG_CONFIG) --cflags liblo)
LIBLO_LIBS = $(shell $(PKG_CONFIG) --libs liblo)
endif

ifeq ($(HAVE_FFMPEG),true)
FFMPEG_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags libavcodec libavformat libavutil)
FFMPEG_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs libavcodec libavformat libavutil)
FFMPEG_FLAGS = $(shell $(PKG_CONFIG) --cflags libavcodec libavformat libavutil)
FFMPEG_LIBS = $(shell $(PKG_CONFIG) --libs libavcodec libavformat libavutil)
endif

ifeq ($(HAVE_FLUIDSYNTH),true)
FLUIDSYNTH_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags fluidsynth)
FLUIDSYNTH_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs fluidsynth)
FLUIDSYNTH_FLAGS = $(shell $(PKG_CONFIG) --cflags fluidsynth)
FLUIDSYNTH_LIBS = $(shell $(PKG_CONFIG) --libs fluidsynth)
endif

ifeq ($(HAVE_JACK),true)
JACK_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags jack)
JACK_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs jack)
ifeq ($(HAVE_JACKLIB),true)
JACK_FLAGS = $(shell $(PKG_CONFIG) --cflags jack)
JACK_LIBS = $(shell $(PKG_CONFIG) --libs jack)
JACK_LIBDIR = $(shell $(PKG_CONFIG) --variable=libdir jack)/jack
endif

ifeq ($(HAVE_QT5),true)
QT5_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags Qt5Core Qt5Gui Qt5Widgets)
QT5_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs Qt5Core Qt5Gui Qt5Widgets)
QT5_FLAGS = $(shell $(PKG_CONFIG) --cflags Qt5Core Qt5Gui Qt5Widgets)
QT5_LIBS = $(shell $(PKG_CONFIG) --libs Qt5Core Qt5Gui Qt5Widgets)
endif

ifeq ($(HAVE_SNDFILE),true)
SNDFILE_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags sndfile)
SNDFILE_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs sndfile)
SNDFILE_FLAGS = $(shell $(PKG_CONFIG) --cflags sndfile)
SNDFILE_LIBS = $(shell $(PKG_CONFIG) --libs sndfile)
endif

ifeq ($(HAVE_YSFXGUI),true)
ifeq ($(MACOS),true)
YSFX_LIBS = -framework Cocoa -framework Carbon -framework Metal -framework Foundation
else ifeq ($(WIN32),true)
# TODO
YSFX_LIBS =
# ifeq ($(HAVE_YSFXGUI),true)
# ifeq ($(MACOS),true)
# YSFX_LIBS = -framework Cocoa -framework Carbon -framework Metal -framework Foundation
# else ifeq ($(WASM),true)
# # TODO
# YSFX_LIBS =
# else
# YSFX_FLAGS = $(shell $(PKG_CONFIG) --cflags freetype2 fontconfig)
# YSFX_LIBS = $(shell $(PKG_CONFIG) --libs freetype2 fontconfig gl x11)
# endif
# endif

ifeq ($(HAVE_X11),true)
X11_FLAGS = $(shell $(PKG_CONFIG) --cflags x11)
X11_LIBS = $(shell $(PKG_CONFIG) --libs x11)
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set libs stuff (dgl)

ifeq ($(HAVE_DGL),true)

ifeq ($(HAIKU),true)
DGL_FLAGS = $(shell $(PKG_CONFIG) --cflags gl)
DGL_LIBS = $(shell $(PKG_CONFIG) --libs gl)
else ifeq ($(MACOS),true)
DGL_FLAGS = -DGL_SILENCE_DEPRECATION=1 -Wno-deprecated-declarations
DGL_LIBS = -framework OpenGL -framework Cocoa
else ifeq ($(WASM),true)
ifneq ($(USE_GLES2),true)
ifneq ($(USE_GLES3),true)
DGL_LIBS = -sLEGACY_GL_EMULATION -sGL_UNSAFE_OPTS=0
endif
endif
else ifeq ($(WINDOWS),true)
DGL_LIBS = -lopengl32 -lgdi32
else
YSFX_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags freetype2 fontconfig)
YSFX_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs freetype2 fontconfig gl x11)
DGL_FLAGS = $(shell $(PKG_CONFIG) --cflags gl x11)
DGL_LIBS = $(shell $(PKG_CONFIG) --libs gl x11)
endif

endif

# ---------------------------------------------------------------------------------------------------------------------
# Set libs stuff (libmagic)

ifeq ($(HAVE_LIBMAGICPKG),true)

MAGIC_FLAGS = $(shell $(PKG_CONFIG) --cflags libmagic)
# this is missing in upstream pkg-config
MAGIC_FLAGS += -I$(shell $(PKG_CONFIG) --variable=includedir libmagic)
MAGIC_LIBS = $(shell $(PKG_CONFIG) --libs libmagic)

else ifeq ($(HAVE_LIBMAGIC),true)

MAGIC_LIBS += -lmagic
ifeq ($(LINUX_OR_MACOS),true)
MAGIC_LIBS += -lz
endif

ifeq ($(HAVE_X11),true)
X11_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags x11)
X11_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs x11)
endif

# ---------------------------------------------------------------------------------------------------------------------
@@ -425,17 +455,15 @@ ifeq ($(USING_JUCE),true)

ifeq ($(LINUX),true)
JUCE_AUDIO_BASICS_LIBS =
JUCE_AUDIO_DEVICES_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs alsa)
JUCE_AUDIO_DEVICES_LIBS = $(shell $(PKG_CONFIG) --libs alsa)
JUCE_AUDIO_FORMATS_LIBS =
JUCE_AUDIO_PROCESSORS_LIBS =
JUCE_CORE_LIBS = -ldl -pthread -lrt
JUCE_EVENTS_LIBS =
JUCE_GRAPHICS_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs freetype2)
JUCE_GRAPHICS_LIBS = $(shell $(PKG_CONFIG) --libs freetype2)
JUCE_GUI_BASICS_LIBS =
JUCE_GUI_EXTRA_LIBS =
endif

ifeq ($(MACOS),true)
else ifeq ($(MACOS),true)
JUCE_AUDIO_BASICS_LIBS = -framework Accelerate
JUCE_AUDIO_DEVICES_LIBS = -framework AppKit -framework AudioToolbox -framework CoreAudio -framework CoreMIDI
JUCE_AUDIO_FORMATS_LIBS = -framework AudioToolbox -framework CoreFoundation
@@ -445,9 +473,7 @@ JUCE_EVENTS_LIBS = -framework AppKit
JUCE_GRAPHICS_LIBS = -framework Cocoa -framework QuartzCore
JUCE_GUI_BASICS_LIBS = -framework Cocoa
JUCE_GUI_EXTRA_LIBS = -framework IOKit
endif

ifeq ($(WIN32),true)
else ifeq ($(WINDOWS),true)
JUCE_AUDIO_BASICS_LIBS =
JUCE_AUDIO_DEVICES_LIBS = -lwinmm -lole32
JUCE_AUDIO_FORMATS_LIBS =
@@ -459,7 +485,7 @@ JUCE_GUI_BASICS_LIBS = -lgdi32 -limm32 -lcomdlg32 -lole32
JUCE_GUI_EXTRA_LIBS =
endif

endif # USING_JUCE
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set libs stuff (rtaudio)
@@ -474,37 +500,37 @@ RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__
RTMIDI_FLAGS += -D__RTMIDI_DEBUG__
endif

ifeq ($(LINUX),true)
ifeq ($(HAVE_ALSA),true)
RTAUDIO_FLAGS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
RTAUDIO_LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs alsa) -pthread
RTMIDI_FLAGS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
RTMIDI_LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs alsa)
RTAUDIO_FLAGS += $(shell $(PKG_CONFIG) --cflags alsa) -D__LINUX_ALSA__
RTAUDIO_LIBS += $(shell $(PKG_CONFIG) --libs alsa) -pthread
RTMIDI_FLAGS += $(shell $(PKG_CONFIG) --cflags alsa) -D__LINUX_ALSA__
RTMIDI_LIBS += $(shell $(PKG_CONFIG) --libs alsa)
endif

ifeq ($(HAVE_JACK),true)
ifeq ($(UNIX),true)
RTAUDIO_FLAGS += -D__UNIX_JACK__
endif
endif

ifeq ($(HAVE_PULSEAUDIO),true)
RTAUDIO_FLAGS += $(shell $(PKG_CONFIG) --cflags libpulse-simple) -D__UNIX_PULSE__
RTAUDIO_LIBS += $(shell $(PKG_CONFIG) --libs libpulse-simple)
endif

ifeq ($(MACOS),true)
RTAUDIO_FLAGS += -D__MACOSX_CORE__
RTAUDIO_LIBS += -framework CoreAudio
RTMIDI_FLAGS += -D__MACOSX_CORE__
RTMIDI_LIBS += -framework CoreMIDI
endif

ifeq ($(UNIX),true)
RTAUDIO_FLAGS += -D__UNIX_JACK__
ifeq ($(HAVE_PULSEAUDIO),true)
RTAUDIO_FLAGS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags libpulse-simple) -D__UNIX_PULSE__
RTAUDIO_LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs libpulse-simple)
endif
endif

ifeq ($(WIN32),true)
else ifeq ($(WINDOWS),true)
RTAUDIO_FLAGS += -D__WINDOWS_ASIO__ -D__WINDOWS_DS__ -D__WINDOWS_WASAPI__
RTAUDIO_LIBS += -ldsound -luuid -lksuser -lwinmm
RTAUDIO_LIBS += -ldsound -luuid -lksuser
RTMIDI_FLAGS += -D__WINDOWS_MM__
RTMIDI_LIBS += -lwinmm
endif

endif # USING_RTAUDIO
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set libs stuff (extra)
@@ -512,6 +538,7 @@ endif # USING_RTAUDIO
ifeq ($(BSD),true)

HYLIA_FLAGS =
HYLIA_LIBS =
JACKBRIDGE_LIBS = -pthread -lrt
LILV_LIBS = -lm -lrt
RTMEMPOOL_LIBS = -pthread
@@ -520,6 +547,7 @@ WATER_LIBS = -pthread -lrt
else ifeq ($(HAIKU),true)

HYLIA_FLAGS =
HYLIA_LIBS =
JACKBRIDGE_LIBS = -lpthread
LILV_LIBS = -lm
RTMEMPOOL_LIBS = -lpthread
@@ -528,6 +556,7 @@ WATER_LIBS = -lpthread
else ifeq ($(HURD),true)

HYLIA_FLAGS =
HYLIA_LIBS =
JACKBRIDGE_LIBS = -ldl -pthread -lrt
LILV_LIBS = -ldl -lm -lrt
RTMEMPOOL_LIBS = -pthread -lrt
@@ -536,6 +565,7 @@ WATER_LIBS = -ldl -pthread -lrt
else ifeq ($(LINUX),true)

HYLIA_FLAGS = -DLINK_PLATFORM_LINUX=1
HYLIA_LIBS =
JACKBRIDGE_LIBS = -ldl -pthread -lrt
LILV_LIBS = -ldl -lm -lrt
RTMEMPOOL_LIBS = -pthread -lrt
@@ -544,12 +574,22 @@ WATER_LIBS = -ldl -pthread -lrt
else ifeq ($(MACOS),true)

HYLIA_FLAGS = -DLINK_PLATFORM_MACOSX=1
HYLIA_LIBS =
JACKBRIDGE_LIBS = -ldl -pthread
LILV_LIBS = -ldl -lm
RTMEMPOOL_LIBS = -pthread
WATER_LIBS = -framework AppKit

else ifeq ($(WIN32),true)
else ifeq ($(WASM),true)

HYLIA_FLAGS =
HYLIA_LIBS =
JACKBRIDGE_LIBS =
LILV_LIBS =
RTMEMPOOL_LIBS = -pthread -sUSE_PTHREADS=1
WATER_LIBS = -pthread -sUSE_PTHREADS=1

else ifeq ($(WINDOWS),true)

HYLIA_FLAGS = -DLINK_PLATFORM_WINDOWS=1
HYLIA_LIBS = -liphlpapi
@@ -595,7 +635,7 @@ ifeq ($(EXTERNAL_PLUGINS),true)
ifneq ($(DEBUG),true)
ifneq ($(TESTBUILD),true)
ifeq ($(shell $(PKG_CONFIG) --exists liblo fftw3 mxml zlib && echo true),true)
STATIC_CARLA_PLUGIN_LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs liblo fftw3 mxml zlib) -pthread
STATIC_CARLA_PLUGIN_LIBS += $(shell $(PKG_CONFIG) --libs liblo fftw3 mxml zlib) -pthread
endif
endif
endif


+ 30
- 29
source/Makefile.mk View File

@@ -7,10 +7,6 @@
# ---------------------------------------------------------------------------------------------------------------------
# Base environment vars

AR ?= ar
CC ?= gcc
CXX ?= g++

WINECC ?= winegcc

# ---------------------------------------------------------------------------------------------------------------------
@@ -30,7 +26,12 @@ BASE_FLAGS = -Wall -Wextra -pipe -DBUILDING_CARLA -DREAL_BUILD -MD -MP -fno-comm
BASE_OPTS = -O3 -ffast-math -fdata-sections -ffunction-sections

ifeq ($(CPU_I386_OR_X86_64),true)
BASE_OPTS += -mtune=generic -msse -msse2 -mfpmath=sse
BASE_OPTS += -mtune=generic -msse -msse2
ifeq ($(WASM),true)
BASE_OPTS += -msse3 -msimd128
else
BASE_OPTS += -mfpmath=sse
endif
endif

ifeq ($(CPU_ARM),true)
@@ -42,16 +43,19 @@ endif
ifeq ($(MACOS),true)
# MacOS linker flags
BASE_FLAGS += -Wno-deprecated-declarations
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip,-dead_strip_dylibs
ifneq ($(SKIP_STRIPPING),true)
LINK_OPTS += -Wl,-x
endif
else
# Common linker flags
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1,--gc-sections
ifneq ($(SKIP_STRIPPING),true)
LINK_OPTS += -Wl,--strip-all
endif
ifneq ($(WASM),true)
LINK_OPTS += -Wl,--as-needed
endif
endif

ifeq ($(NOOPT),true)
@@ -59,7 +63,7 @@ ifeq ($(NOOPT),true)
BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections -DBUILDING_CARLA_NOOPT
endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
# Assume we want posix
BASE_FLAGS += -posix
# Needed for windows, see https://github.com/falkTX/Carla/issues/855
@@ -84,7 +88,7 @@ BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
CXXFLAGS += -fvisibility-inlines-hidden
endif

ifneq ($(MACOS_OR_WIN32),true)
ifneq ($(MACOS_OR_WASM_OR_WINDOWS),true)
ifneq ($(BSD),true)
BASE_FLAGS += -fno-gnu-unique
endif
@@ -103,13 +107,12 @@ BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++11 $(CXXFLAGS)
LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)

ifneq ($(MACOS),true)
ifeq ($(WASM),true)
# Special flag for emscripten
LINK_FLAGS += -sLLD_REPORT_UNDEFINED
else ifneq ($(MACOS),true)
# Not available on MacOS
LINK_FLAGS += -Wl,--no-undefined
endif

ifeq ($(MACOS_OLD),true)
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) -DHAVE_CPP11_SUPPORT=0
LINK_FLAGS += -Wl,--no-undefined
endif

ifeq ($(STATIC_BINARIES),true)
@@ -151,12 +154,6 @@ endif
ifeq ($(MACOS),true)
CXXFLAGS += -isystem /System/Library/Frameworks
endif
ifeq ($(WIN32),true)
BASE_FLAGS += -isystem /opt/mingw32/include
endif
ifeq ($(WIN64),true)
BASE_FLAGS += -isystem /opt/mingw64/include
endif
# TODO
ifeq ($(CLANG),true)
BASE_FLAGS += -Wno-double-promotion
@@ -231,7 +228,7 @@ endif
ifeq ($(USING_JUCE),true)
BASE_FLAGS += -DUSING_JUCE
BASE_FLAGS += -DJUCE_APP_CONFIG_HEADER='"AppConfig.h"'
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BASE_FLAGS += -D_WIN32_WINNT=0x0600
endif
endif
@@ -258,21 +255,23 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# Set app extension

ifeq ($(WIN32),true)
ifeq ($(WASM),true)
APP_EXT = .html
else ifeq ($(WINDOWS),true)
APP_EXT = .exe
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set shared lib extension

LIB_EXT = .so

ifeq ($(MACOS),true)
LIB_EXT = .dylib
endif
ifeq ($(WIN32),true)
else ifeq ($(WASM),true)
LIB_EXT = .wasm
else ifeq ($(WINDOWS),true)
LIB_EXT = .dll
else
LIB_EXT = .so
endif

BASE_FLAGS += -DCARLA_LIB_EXT=\"$(LIB_EXT)\"
@@ -303,6 +302,8 @@ endif

ifeq ($(MACOS),true)
SHARED = -dynamiclib
else ifeq ($(WASM),true)
SHARED = -sSIDE_MODULE=1
else
SHARED = -shared
endif
@@ -326,7 +327,7 @@ LINK := ln -sf

ifneq ($(BUILDING_FOR_WINE),true)
ifeq ($(CROSS_COMPILING),true)
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
NEEDS_WINE = true
endif
endif


+ 4
- 0
source/backend/Makefile View File

@@ -22,6 +22,10 @@ endif

BUILD_CXX_FLAGS += $(FLUIDSYNTH_FLAGS)

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

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

STANDALONE_LIBS = $(MODULEDIR)/carla_engine.a


+ 5
- 1
source/backend/engine/Makefile View File

@@ -15,13 +15,17 @@ endif
endif

ifeq ($(USING_JUCE),true)
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I$(CWD)/modules/mingw-std-threads
endif
endif

BUILD_CXX_FLAGS += $(MAGIC_FLAGS)

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

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

OBJS = \


+ 5
- 1
source/backend/plugin/Makefile View File

@@ -15,13 +15,17 @@ endif
endif

ifeq ($(USING_JUCE),true)
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I$(CWD)/modules/mingw-std-threads
endif
endif

BUILD_CXX_FLAGS += $(MAGIC_FLAGS)

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

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

OBJS = \


+ 6
- 2
source/bridges-plugin/Makefile View File

@@ -17,6 +17,10 @@ BUILD_CXX_FLAGS += -Wno-deprecated-declarations
endif
endif

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

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

BINDIR := $(CWD)/../bin
@@ -35,7 +39,7 @@ BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD) -I$(CWD)/backend -I$(CWD)/include
BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin

ifeq ($(USING_JUCE),true)
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I$(CWD)/modules/mingw-std-threads
endif
endif
@@ -182,7 +186,7 @@ LIBS_native += $(CUSTOM_DPF_PATH)/build/libdgl-opengl.a
endif
endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
EXTRA_LINK_FLAGS += -lole32 -lssp -mwindows
endif



+ 2
- 2
source/bridges-ui/Makefile View File

@@ -70,7 +70,7 @@ endif
TARGETS += ui_lv2-gtk2
TARGETS += ui_lv2-gtk3

ifneq ($(MACOS_OR_WIN32),true)
ifneq ($(MACOS_OR_WINDOWS),true)
ifeq ($(HAVE_QT4),true)
TARGETS += ui_lv2-qt4
endif
@@ -88,7 +88,7 @@ ifeq ($(MACOS),true)
TARGETS += ui_lv2-cocoa
endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
TARGETS += ui_lv2-windows
endif



+ 2
- 8
source/discovery/Makefile View File

@@ -8,12 +8,6 @@ CWD=..
MODULENAME=carla-discovery
include $(CWD)/Makefile.mk

ifeq ($(WIN64),true)
winv=64
else
winv=32
endif

# Workaround GCC bug
ifeq ($(TESTBUILD),true)
ifeq ($(USING_JUCE),true)
@@ -41,7 +35,7 @@ ifeq ($(MACOS),true)
BUILD_CXX_FLAGS += -ObjC++
endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
LINK_FLAGS += -lole32 -lssp -mwindows
endif

@@ -50,7 +44,7 @@ BUILD_CXX_FLAGS += -std=gnu++14
endif

ifeq ($(USING_JUCE),true)
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I$(CWD)/modules/mingw-std-threads
endif
endif


+ 1
- 1
source/jackbridge/Makefile View File

@@ -73,7 +73,7 @@ OBJS_win32e = $(OBJDIR)/JackBridgeExport.cpp.win32e.o
all: $(MODULEDIR)/$(MODULENAME).a
min: $(MODULEDIR)/$(MODULENAME).min.a

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
posix32:
posix64:
posix32e:


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

@@ -12,7 +12,7 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += -I.. -std=gnu++14

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



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

@@ -13,7 +13,7 @@ include ../Makefile.mk
BUILD_CXX_FLAGS += $(JUCE_AUDIO_BASICS_FLAGS) -I.. -std=gnu++14

# needed for older mingw, crashes on optimized float operations
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
ifneq (,$(findstring i686,$(TARGET_MACHINE)))
BUILD_CXX_FLAGS += -mpreferred-stack-boundary=2
else
@@ -21,7 +21,7 @@ else
endif
endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



+ 2
- 2
source/modules/juce_audio_devices/Makefile View File

@@ -12,13 +12,13 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += $(JUCE_AUDIO_DEVICES_FLAGS) -I.. -std=gnu++14

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
# BUILD_CXX_FLAGS += -Wno-missing-field-initializers
# BUILD_CXX_FLAGS += -I$(CWD)/includes/asio
BUILD_CXX_FLAGS += -I$(CWD)/modules/rtaudio/include
endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



+ 2
- 2
source/modules/juce_audio_processors/Makefile View File

@@ -20,7 +20,7 @@ BUILD_CXX_FLAGS += -DRELEASE
endif

# needed by vst3 on mingw
# ifeq ($(WIN32),true)
# ifeq ($(WINDOWS),true)
# BUILD_CXX_FLAGS += -D_NATIVE_WCHAR_T_DEFINED -D__wchar_t=wchar_t -fpermissive -Wno-unknown-pragmas
# # needed for bloated juce
# ifeq ($(DEBUG),true)
@@ -28,7 +28,7 @@ endif
# endif
# endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



+ 2
- 2
source/modules/juce_core/Makefile View File

@@ -12,11 +12,11 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += $(JUCE_CORE_FLAGS) -I.. -std=gnu++14

# ifeq ($(WIN32),true)
# ifeq ($(WINDOWS),true)
# BUILD_CXX_FLAGS += -w
# endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



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

@@ -12,7 +12,7 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += $(JUCE_DATA_STRUCTURES_FLAGS) -I.. -std=gnu++14

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



+ 2
- 2
source/modules/juce_events/Makefile View File

@@ -12,11 +12,11 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += $(JUCE_EVENTS_FLAGS) -I.. -std=gnu++14

# ifeq ($(WIN32),true)
# ifeq ($(WINDOWS),true)
# BUILD_CXX_FLAGS += -Wno-missing-field-initializers
# endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



+ 2
- 2
source/modules/juce_graphics/Makefile View File

@@ -15,11 +15,11 @@ BUILD_CXX_FLAGS += $(JUCE_GRAPHICS_FLAGS) -I.. -std=gnu++14
ifeq ($(LINUX),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags freetype2)
endif
# ifeq ($(WIN32),true)
# ifeq ($(WINDOWS),true)
# BUILD_CXX_FLAGS += -Wno-missing-field-initializers -Wno-strict-overflow
# endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



+ 2
- 2
source/modules/juce_gui_basics/Makefile View File

@@ -13,7 +13,7 @@ include ../Makefile.mk
BUILD_CXX_FLAGS += $(JUCE_GUI_BASICS_FLAGS) -I.. -std=gnu++14

# needed for mingw juce
# ifeq ($(WIN32),true)
# ifeq ($(WINDOWS),true)
# BUILD_CXX_FLAGS += -Wno-missing-field-initializers -Wno-multichar
# # needed for bloated juce
# ifeq ($(DEBUG),true)
@@ -21,7 +21,7 @@ BUILD_CXX_FLAGS += $(JUCE_GUI_BASICS_FLAGS) -I.. -std=gnu++14
# endif
# endif

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



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

@@ -12,7 +12,7 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += $(JUCE_GUI_EXTRA_FLAGS) -I.. -std=gnu++14

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -I../mingw-std-threads
endif



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

@@ -12,7 +12,7 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += $(RTAUDIO_FLAGS) -I$(CWD) -Iinclude

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
BUILD_CXX_FLAGS += -Wno-unused-function -Wno-unused-but-set-variable
endif



+ 4
- 0
source/modules/sfzero/Makefile View File

@@ -12,6 +12,10 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += -I$(CWD)/modules

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

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

OBJS = $(OBJDIR)/SFZero.cpp.o


+ 4
- 0
source/modules/water/Makefile View File

@@ -12,6 +12,10 @@ include ../Makefile.mk

BUILD_CXX_FLAGS += -I..

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

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

ifeq ($(MACOS),true)


+ 17
- 8
source/modules/ysfx/Makefile View File

@@ -38,17 +38,26 @@ ifeq ($(YSFX_FTS_LACKS_LFS_SUPPORT),true)
YSFX_FLAGS += -DYSFX_FTS_LACKS_LFS_SUPPORT
endif

ifneq ($(WIN32),true)
# NOTE: not compatible with MingGW, breaks win32_utf8
YSFX_FLAGS += -D_FILE_OFFSET_BITS=64
ifneq ($(HAIKU),true)
YSFX_FLAGS += -pthread
endif

ifeq ($(WIN32),true)
ifeq ($(WASM),true)
# FIXME
YSFX_FLAGS += -DEEL_TARGET_PORTABLE
endif

ifeq ($(WINDOWS),true)
YSFX_FLAGS += -DNOMINMAX
endif

# ifneq ($(CPU_I386),true)
# # NOTE: not compatible with MingGW, breaks win32_utf8
# YSFX_FLAGS += -D_FILE_OFFSET_BITS=64
# endif

ifeq ($(HAVE_YSFXGUI),true)
ifneq ($(MACOS_OR_WIN32),true)
ifneq ($(MACOS_OR_WINDOWS),true)
YSFX_FLAGS += -DSWELL_LICE_GDI -DSWELL_FONTCONFIG -DSWELL_FREETYPE
endif
else
@@ -83,7 +92,7 @@ OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-lextab.c.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-ram.c.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-yylex.c.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/fft.c.o
ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/win32_utf8.c.o
endif

@@ -103,7 +112,7 @@ OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_palette.cpp.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_texgen.cpp.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_text.cpp.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_textnew.cpp.o
ifneq ($(WIN32),true)
ifneq ($(WINDOWS),true)
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-ini.cpp.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell.cpp.o
ifeq ($(MACOS),true)
@@ -129,7 +138,7 @@ OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-misc-generic.cpp.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-miscdlg-generic.cpp.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-modstub-generic.cpp.o
OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-wnd-generic.cpp.o
endif # !WIN32
endif # !WINDOWS
endif
endif # HAVE_YSFXGUI



+ 4
- 0
source/native-plugins/Makefile View File

@@ -14,6 +14,10 @@ include ../modules/Makefile.mk
BUILD_C_FLAGS += -I..
BUILD_CXX_FLAGS += -I.. -I$(CWD)/modules

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set targets



+ 1
- 1
source/native-plugins/external

@@ -1 +1 @@
Subproject commit f69a9e9abdc03e9d124656215839c0fe025a783a
Subproject commit 47380b7e7e4bd32685ecc0a36e719c330bc9c1b3

+ 8
- 4
source/plugin/Makefile View File

@@ -14,6 +14,10 @@ BUILD_CXX_FLAGS += -Wno-undef
endif
endif

ifneq ($(HAIKU),true)
BUILD_CXX_FLAGS += -pthread
endif

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

BINDIR := $(CWD)/../bin
@@ -137,7 +141,7 @@ SYMBOLS_LV2 += -Wl,-exported_symbol,_lv2ui_descriptor
SYMBOLS_LV2_UI = -Wl,-exported_symbol,_lv2ui_descriptor
endif
SYMBOLS_VST = -Wl,-exported_symbol,_VSTPluginMain
else ifeq ($(WIN32),true)
else ifeq ($(WINDOWS),true)
SYMBOLS_NATIVE = symbols/carla-native-plugin.def
SYMBOLS_VST = symbols/carla-vst.def
ifeq ($(HAVE_PYQT),true)
@@ -220,7 +224,7 @@ endif # !STATIC_PLUGIN_TARGET

all: $(TARGETS)

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
wine: $(BINDIR)/CarlaVstShellBridged.dll $(BINDIR)/CarlaVstFxShellBridged.dll
else
wine: $(BINDIR)/CarlaVstShellBridged.dll.so $(BINDIR)/CarlaVstFxShellBridged.dll.so
@@ -332,7 +336,7 @@ $(BINDIR)/CarlaPatchbay$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn.o $(OBJD
$(BINDIR)/CarlaPatchbay16$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn16.o $(OBJDIR)/carla-vst-export.cpp.o
-@mkdir -p $(BINDIR)
@echo "Linking CarlaPatchbay16$(LIB_EXT)"
$(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
$(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@

$(BINDIR)/CarlaPatchbay32$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn32.o $(OBJDIR)/carla-vst-export.cpp.o
-@mkdir -p $(BINDIR)
@@ -361,7 +365,7 @@ $(BINDIR)/CarlaVstFxShell$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.shellfx.o $(OBJDIR)
@echo "Linking CarlaVstFxShell$(LIB_EXT)"
$(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
$(BINDIR)/CarlaVstShellBridged.dll: $(OBJDIR)/carla-vst-export-bridged.cpp.synth.o
-@mkdir -p $(BINDIR)
@echo "Linking CarlaVstShellBridged.dll"


+ 1
- 1
source/theme/Makefile View File

@@ -10,7 +10,7 @@ include ../modules/Makefile.mk

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

ifeq ($(WIN32),true)
ifeq ($(WINDOWS),true)
NON_STATIC_LINK_FLAGS = $(shell echo $(LINK_FLAGS) | awk 'sub(" -static","")') -static-libgcc
else
NON_STATIC_LINK_FLAGS = $(LINK_FLAGS)


Loading…
Cancel
Save