@@ -21,6 +21,10 @@ | |||
*.msi | |||
*.so | |||
# Binary dir | |||
bin/styles/ | |||
build/ | |||
# Project files | |||
*.carxp | |||
*.carxs | |||
@@ -70,9 +74,9 @@ carla-bridge-lv2-gtk3 | |||
carla-bridge-lv2-qt4 | |||
carla-bridge-lv2-qt5 | |||
carla-bridge-lv2-x11 | |||
carla-bridge-vst-carbon | |||
carla-bridge-vst-cocoa | |||
carla-bridge-vst-x11 | |||
carla-bridge-vst2-carbon | |||
carla-bridge-vst2-cocoa | |||
carla-bridge-vst2-x11 | |||
carla-discovery-qtcreator | |||
carla-discovery-native | |||
@@ -161,8 +165,6 @@ source/modules/native-plugins/zynaddsubfx/UI/VirKeyboard.cpp | |||
source/modules/native-plugins/zynaddsubfx/UI/VirKeyboard.h | |||
# Other | |||
bin/styles/ | |||
source/includes/asio/ | |||
source/includes/rewire/ | |||
source/includes/vst/ | |||
@@ -40,8 +40,8 @@ all: BIN RES UI WIDGETS | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Binaries (native) | |||
BIN: backend bridges-plugin theme | |||
# bridges-ui discovery interposer plugin | |||
BIN: backend discovery bridges-plugin bridges-ui plugin theme | |||
# interposer | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
@@ -140,7 +140,7 @@ discovery: libs | |||
interposer: libs | |||
@$(MAKE) -C source/interposer | |||
plugin: libs | |||
plugin: backend bridges-plugin bridges-ui discovery | |||
@$(MAKE) -C source/plugin | |||
ifeq ($(HAVE_QT),true) | |||
@@ -150,10 +150,6 @@ else | |||
theme: | |||
endif | |||
# $(BINDIR)/carla.lv2/manifest.ttl: plugin_build bridges-plugin bridges-ui discovery | |||
# cd bin && ./carla-lv2-export$(APP_EXT); cd .. | |||
# cd $(BINDIR)/carla.lv2 && $(LINK) ../*bridge-* ../carla-discovery-* .; cd .. | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Binaries (posix32) | |||
@@ -90,7 +90,7 @@ STANDALONE_LINK_FLAGS += -lmagic | |||
endif | |||
UTILS_LINK_FLAGS = $(JUCE_CORE_LIBS) | |||
ifneq ($(HAIKU),true) | |||
ifeq ($(UNIX),true) | |||
UTILS_LINK_FLAGS += -lpthread | |||
endif | |||
@@ -24,7 +24,7 @@ endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -I. -I.. -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||
BUILD_CXX_FLAGS += -I. -I.. -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||
BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
@@ -1,11 +1,12 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for carla-bridges # | |||
# -------------------------- # | |||
# Makefile for carla-bridges-plugin # | |||
# --------------------------------- # | |||
# Created by falkTX | |||
# | |||
CWD=.. | |||
include ../Makefile.mk | |||
MODULENAME=carla-bridge | |||
include $(CWD)/Makefile.mk | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
@@ -20,27 +21,96 @@ MODULEDIR := $(CWD)/../build/modules/Release | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Plugin bridges (Common) | |||
BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I../backend -I../backend/engine -I../backend/plugin -I../includes -I../utils -isystem ../modules | |||
BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||
BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin | |||
BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | |||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||
endif | |||
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | |||
LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS) | |||
LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
32BIT_FLAGS += -DBRIDGE_PLUGIN | |||
64BIT_FLAGS += -DBRIDGE_PLUGIN | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
LIBS_native = $(MODULEDIR)/jackbridge.a | |||
LIBS_posix32 = $(MODULEDIR)/jackbridge.posix32.a | |||
LIBS_posix64 = $(MODULEDIR)/jackbridge.posix64.a | |||
LIBS_win32 = $(MODULEDIR)/jackbridge.win32e.a | |||
LIBS_win64 = $(MODULEDIR)/jackbridge.win364e.a | |||
LINK_FLAGS += $(JACKBRIDGE_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_audio_basics.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_audio_basics.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_audio_basics.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_audio_basics.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_audio_basics.win64.a | |||
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_core.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_core.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_core.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_core.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_core.win64.a | |||
LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
LIBS_native += $(MODULEDIR)/lilv.a | |||
LIBS_posix32 += $(MODULEDIR)/lilv.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/lilv.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/lilv.win32.a | |||
LIBS_win64 += $(MODULEDIR)/lilv.win64.a | |||
LINK_FLAGS += $(LILV_LIBS) | |||
LIBS_native += $(MODULEDIR)/rtmempool.a | |||
LIBS_posix32 += $(MODULEDIR)/rtmempool.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/rtmempool.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/rtmempool.win32.a | |||
LIBS_win64 += $(MODULEDIR)/rtmempool.win64.a | |||
LINK_FLAGS += $(RTMEMPOOL_LIBS) | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | |||
LINK_FLAGS += $(JUCE_EVENTS_LIBS) | |||
LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | |||
LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_audio_processors.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_audio_processors.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_audio_processors.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_audio_processors.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_audio_processors.win64.a | |||
LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_data_structures.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_data_structures.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_data_structures.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_data_structures.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_data_structures.win64.a | |||
LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_events.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_events.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_events.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_events.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_events.win64.a | |||
LINK_FLAGS += $(JUCE_EVENTS_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_graphics.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_graphics.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_graphics.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_graphics.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_graphics.win64.a | |||
LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_gui_basics.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_gui_basics.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_gui_basics.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_gui_basics.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_gui_basics.win64.a | |||
LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | |||
ifeq ($(MACOS),true) | |||
LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) | |||
LIBS_native += $(MODULEDIR)/juce_gui_extra.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_gui_extra.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_gui_extra.posix64.a | |||
LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) | |||
endif | |||
endif | |||
@@ -50,41 +120,14 @@ ifeq ($(HAVE_X11),true) | |||
LINK_FLAGS += $(X11_LIBS) | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Plugin bridges (POSIX) | |||
POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS) | |||
POSIX_32BIT_FLAGS = $(32BIT_FLAGS) | |||
POSIX_64BIT_FLAGS = $(64BIT_FLAGS) | |||
POSIX_LINK_FLAGS = $(LINK_FLAGS) | |||
ifneq ($(HAIKU),true) | |||
POSIX_LINK_FLAGS += -ldl -lpthread | |||
endif | |||
ifeq ($(LINUX),true) | |||
POSIX_32BIT_FLAGS += -L/usr/lib32 -L/usr/lib/i386-linux-gnu | |||
POSIX_64BIT_FLAGS += -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu | |||
ifeq ($(UNIX),true) | |||
LINK_FLAGS += -ldl -lpthread | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Plugin bridges (Windows) | |||
WIN_BUILD_FLAGS = $(BUILD_CXX_FLAGS) | |||
WIN_32BIT_FLAGS = $(32BIT_FLAGS) | |||
WIN_64BIT_FLAGS = $(64BIT_FLAGS) | |||
WIN_LINK_FLAGS = $(LINK_FLAGS) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Plugin bridges (Native) | |||
ifeq ($(WIN32),true) | |||
NATIVE_BUILD_FLAGS = $(WIN_BUILD_FLAGS) | |||
NATIVE_LINK_FLAGS = $(WIN_LINK_FLAGS) | |||
else | |||
NATIVE_BUILD_FLAGS = $(POSIX_BUILD_FLAGS) | |||
NATIVE_LINK_FLAGS = $(POSIX_LINK_FLAGS) | |||
endif | |||
NATIVE_BUILD_FLAGS = "" | |||
NATIVE_LINK_FLAGS = "" | |||
ifeq ($(HAVE_FLUIDSYNTH),true) | |||
NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | |||
@@ -103,37 +146,15 @@ NATIVE_BUILD_FLAGS += -DWANT_ZYNADDSUBFX_UI | |||
endif | |||
endif | |||
NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
all: native | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
clean: | |||
rm -f $(OBJDIR)/CarlaBridgePlugin*.o $(BINDIR)/carla-bridge-* | |||
rm -f $(OBJS_NATIVE) | |||
rm -f $(OBJS_POSIX32) | |||
rm -f $(OBJS_POSIX64) | |||
rm -f $(OBJS_WIN32) | |||
rm -f $(OBJS_WIN64) | |||
debug: | |||
$(MAKE) DEBUG=true | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
LIBS_native += $(MODULEDIR)/juce_audio_formats.a | |||
NATIVE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS) | |||
native: $(BINDIR)/carla-bridge-native$(APP_EXT) | |||
posix32: $(BINDIR)/carla-bridge-posix32 | |||
posix64: $(BINDIR)/carla-bridge-posix64 | |||
win32: $(BINDIR)/carla-bridge-win32.exe | |||
win64: $(BINDIR)/carla-bridge-win64.exe | |||
LIBS_native += $(MODULEDIR)/native-plugins.a | |||
NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# native | |||
OBJS_NATIVE = \ | |||
OBJS_native = \ | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.o \ | |||
$(OBJDIR)/CarlaEngine.cpp.o \ | |||
$(OBJDIR)/CarlaEngineClient.cpp.o \ | |||
@@ -160,292 +181,204 @@ OBJS_NATIVE = \ | |||
$(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \ | |||
$(OBJDIR)/CarlaStandalone.cpp.o | |||
# libs | |||
LIBS_NATIVE = \ | |||
$(MODULEDIR)/jackbridge.a \ | |||
$(MODULEDIR)/juce_audio_basics.a \ | |||
$(MODULEDIR)/juce_audio_formats.a \ | |||
$(MODULEDIR)/juce_core.a \ | |||
$(MODULEDIR)/lilv.a \ | |||
$(MODULEDIR)/native-plugins.a \ | |||
$(MODULEDIR)/rtmempool.a | |||
OBJS_arch = \ | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngine.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineClient.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineData.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineInternal.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineOsc.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineOscSend.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEnginePorts.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineThread.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineJack.cpp.arch.o \ | |||
$(OBJDIR)/CarlaEngineBridge.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPlugin.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginInternal.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginThread.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginLADSPA.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginDSSI.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginLV2.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginVST2.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginVST3.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginAU.cpp.arch.o \ | |||
$(OBJDIR)/CarlaPluginJuce.cpp.arch.o \ | |||
$(OBJDIR)/CarlaStandalone.cpp.arch.o | |||
OBJS_posix32 = $(OBJS_arch:%.arch.o=%.posix32.o) | |||
OBJS_posix64 = $(OBJS_arch:%.arch.o=%.posix64.o) | |||
OBJS_win32 = $(OBJS_arch:%.arch.o=%.win32.o) | |||
OBJS_win64 = $(OBJS_arch:%.arch.o=%.win64.o) | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
LIBS_NATIVE += \ | |||
$(MODULEDIR)/juce_audio_processors.a \ | |||
$(MODULEDIR)/juce_data_structures.a \ | |||
$(MODULEDIR)/juce_events.a \ | |||
$(MODULEDIR)/juce_graphics.a \ | |||
$(MODULEDIR)/juce_gui_basics.a | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
ifeq ($(MACOS),true) | |||
LIBS_NATIVE += \ | |||
$(MODULEDIR)/juce_gui_extra.a | |||
endif | |||
endif | |||
all: native | |||
$(BINDIR)/carla-bridge-native$(APP_EXT): $(OBJS_NATIVE) $(LIBS_NATIVE) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
clean: | |||
rm -f $(OBJDIR)/*.o $(BINDIR)/$(MODULENAME)-* | |||
debug: | |||
$(MAKE) DEBUG=true | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT) | |||
posix32: $(BINDIR)/$(MODULENAME)-posix32 | |||
posix64: $(BINDIR)/$(MODULENAME)-posix64 | |||
win32: $(BINDIR)/$(MODULENAME)-win32.exe | |||
win64: $(BINDIR)/$(MODULENAME)-win64.exe | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# linking | |||
$(BINDIR)/$(MODULENAME)-native$(APP_EXT): $(OBJS_native) $(LIBS_native) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-native$(APP_EXT)" | |||
@$(CXX) $(OBJS_native) $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-posix32" | |||
@$(CXX) $(OBJS_posix32) $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-posix64: $(OBJS_posix64) $(LIBS_posix64) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-posix64" | |||
@$(CXX) $(OBJS_posix64) $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-win32.exe: $(OBJS_win32) $(LIBS_win32) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-win32.exe" | |||
@$(CXX) $(OBJS_win32) $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-win64.exe: $(OBJS_win64) $(LIBS_win64) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking carla-bridge-native$(APP_EXT)" | |||
@$(CXX) $(OBJS_NATIVE) $(LIBS_START) $(LIBS_NATIVE) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $@ | |||
@echo "Linking $(MODULENAME)-win64.exe" | |||
@$(CXX) $(OBJS_win64) $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# native | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (bridge)" | |||
@$(CXX) $< $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
@echo "Compiling $<" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaEng%.cpp.o: ../backend/engine/CarlaEng%.cpp | |||
$(OBJDIR)/CarlaEng%.cpp.o: $(CWD)/backend/engine/CarlaEng%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaEng$*.cpp (bridge)" | |||
@$(CXX) $< $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaPlug%.cpp.o: ../backend/plugin/CarlaPlug%.cpp | |||
$(OBJDIR)/CarlaPlug%.cpp.o: $(CWD)/backend/plugin/CarlaPlug%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPlug$*.cpp (bridge)" | |||
@$(CXX) $< $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/%Plugin.cpp.o: ../backend/plugin/%Plugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $*Plugin.cpp (bridge)" | |||
@$(CXX) $< $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaStandalone.cpp.o: ../backend/CarlaStandalone.cpp | |||
$(OBJDIR)/CarlaStandalone.cpp.o: $(CWD)/backend/CarlaStandalone.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaStandalone.cpp (bridge)" | |||
@$(CXX) $< $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# posix32 | |||
OBJS_POSIX32 = CarlaBridgePlugin.cpp.posix32.o | |||
# carla-engine | |||
OBJS_POSIX32 += \ | |||
$(OBJDIR)/CarlaEngine.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineClient.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineData.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineInternal.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineOsc.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineOscSend.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEnginePorts.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineThread.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineJack.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaEngineBridge.cpp.posix32.o | |||
# carla-plugin | |||
OBJS_POSIX32 += \ | |||
$(OBJDIR)/CarlaPlugin.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaPluginInternal.cpp.posix32.o \ | |||
$(OBJDIR)/CarlaPluginThread.cpp.posix32.o \ | |||
$(OBJDIR)/LadspaPlugin.cpp.posix32.o \ | |||
$(OBJDIR)/DssiPlugin.cpp.posix32.o \ | |||
$(OBJDIR)/Lv2Plugin.cpp.posix32.o \ | |||
$(OBJDIR)/VstPlugin.cpp.posix32.o \ | |||
$(OBJDIR)/Vst3Plugin.cpp.posix32.o \ | |||
$(OBJDIR)/AuPlugin.cpp.posix32.o \ | |||
$(OBJDIR)/JucePlugin.cpp.posix32.o | |||
# carla-standalone | |||
OBJS_POSIX32 += \ | |||
$(OBJDIR)/CarlaStandalone.cpp.posix32.o | |||
# libs | |||
LIBS_POSIX32 = \ | |||
$(MODULEDIR)/jackbridge.posix32.a \ | |||
$(MODULEDIR)/juce_audio_basics.posix32.a \ | |||
$(MODULEDIR)/juce_core.posix32.a \ | |||
$(MODULEDIR)/lilv.posix32.a \ | |||
$(MODULEDIR)/rtmempool.posix32.a | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.posix32.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (posix32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
ifeq ($(MACOS),true) | |||
LIBS_POSIX32 += \ | |||
$(MODULEDIR)/juce_audio_processors.posix32.a \ | |||
$(MODULEDIR)/juce_data_structures.posix32.a \ | |||
$(MODULEDIR)/juce_events.posix32.a \ | |||
$(MODULEDIR)/juce_graphics.posix32.a \ | |||
$(MODULEDIR)/juce_gui_basics.posix32.a \ | |||
$(MODULEDIR)/juce_gui_extra.posix32.a | |||
endif | |||
$(OBJDIR)/CarlaEng%.cpp.posix32.o: $(CWD)/backend/engine/CarlaEng%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaEng$*.cpp (posix32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
$(BINDIR)/carla-bridge-posix32: $(OBJS_POSIX32) $(LIBS_POSIX32) | |||
$(CXX) $(OBJS_POSIX32) $(LIBS_START) $(LIBS_POSIX32) $(LIBS_END) $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@ | |||
$(OBJDIR)/CarlaPlug%.cpp.posix32.o: $(CWD)/backend/plugin/CarlaPlug%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPlug$*.cpp (posix32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/%.cpp.posix32.o: %.cpp | |||
$(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@ | |||
$(OBJDIR)/CarlaStandalone.cpp.posix32.o: $(CWD)/backend/CarlaStandalone.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaStandalone.cpp (posix32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# posix64 | |||
OBJS_POSIX64 = CarlaBridgePlugin.cpp.posix64.o | |||
# carla-engine | |||
OBJS_POSIX64 += \ | |||
$(OBJDIR)/CarlaEngine.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineClient.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineData.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineInternal.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineOsc.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineOscSend.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEnginePorts.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineThread.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineJack.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaEngineBridge.cpp.posix64.o | |||
# carla-plugin | |||
OBJS_POSIX64 += \ | |||
$(OBJDIR)/CarlaPlugin.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaPluginInternal.cpp.posix64.o \ | |||
$(OBJDIR)/CarlaPluginThread.cpp.posix64.o \ | |||
$(OBJDIR)/LadspaPlugin.cpp.posix64.o \ | |||
$(OBJDIR)/DssiPlugin.cpp.posix64.o \ | |||
$(OBJDIR)/Lv2Plugin.cpp.posix64.o \ | |||
$(OBJDIR)/VstPlugin.cpp.posix64.o \ | |||
$(OBJDIR)/Vst3Plugin.cpp.posix64.o \ | |||
$(OBJDIR)/AuPlugin.cpp.posix64.o \ | |||
$(OBJDIR)/JucePlugin.cpp.posix64.o | |||
# carla-standalone | |||
OBJS_POSIX64 += \ | |||
$(OBJDIR)/CarlaStandalone.cpp.posix64.o | |||
# libs | |||
LIBS_POSIX64 = \ | |||
$(MODULEDIR)/jackbridge.posix64.a \ | |||
$(MODULEDIR)/juce_audio_basics.posix64.a \ | |||
$(MODULEDIR)/juce_core.posix64.a \ | |||
$(MODULEDIR)/lilv.posix64.a \ | |||
$(MODULEDIR)/rtmempool.posix64.a | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.posix64.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (posix64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
ifeq ($(MACOS),true) | |||
LIBS_POSIX64 += \ | |||
$(MODULEDIR)/juce_audio_processors.posix64.a \ | |||
$(MODULEDIR)/juce_data_structures.posix64.a \ | |||
$(MODULEDIR)/juce_events.posix64.a \ | |||
$(MODULEDIR)/juce_graphics.posix64.a \ | |||
$(MODULEDIR)/juce_gui_basics.posix64.a \ | |||
$(MODULEDIR)/juce_gui_extra.posix64.a | |||
endif | |||
$(OBJDIR)/CarlaEng%.cpp.posix64.o: $(CWD)/backend/engine/CarlaEng%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaEng$*.cpp (posix64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
$(BINDIR)/carla-bridge-posix64: $(OBJS_POSIX64) $(LIBS_POSIX64) | |||
$(CXX) $(OBJS_POSIX64) $(LIBS_START) $(LIBS_POSIX64) $(LIBS_END) $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@ | |||
$(OBJDIR)/CarlaPlug%.cpp.posix64.o: $(CWD)/backend/plugin/CarlaPlug%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPlug$*.cpp (posix64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/%.cpp.posix64.o: %.cpp | |||
$(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@ | |||
$(OBJDIR)/CarlaStandalone.cpp.posix64.o: $(CWD)/backend/CarlaStandalone.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaStandalone.cpp (posix64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# win32 | |||
OBJS_WIN32 = CarlaBridgePlugin.cpp.win32.o | |||
# carla-engine | |||
OBJS_WIN32 += \ | |||
$(OBJDIR)/CarlaEngine.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineClient.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineData.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineInternal.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineOsc.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineOscSend.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEnginePorts.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineThread.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineBridge.cpp.win32.o \ | |||
$(OBJDIR)/CarlaEngineJack.cpp.win32.o | |||
# carla-plugin | |||
OBJS_WIN32 += \ | |||
$(OBJDIR)/CarlaPlugin.cpp.win32.o \ | |||
$(OBJDIR)/CarlaPluginInternal.cpp.win32.o \ | |||
$(OBJDIR)/CarlaPluginThread.cpp.win32.o \ | |||
$(OBJDIR)/LadspaPlugin.cpp.win32.o \ | |||
$(OBJDIR)/DssiPlugin.cpp.win32.o \ | |||
$(OBJDIR)/Lv2Plugin.cpp.win32.o \ | |||
$(OBJDIR)/VstPlugin.cpp.win32.o \ | |||
$(OBJDIR)/Vst3Plugin.cpp.win32.o \ | |||
$(OBJDIR)/AuPlugin.cpp.win32.o \ | |||
$(OBJDIR)/JucePlugin.cpp.win32.o | |||
# carla-standalone | |||
OBJS_WIN32 += \ | |||
$(OBJDIR)/CarlaStandalone.cpp.win32.o | |||
# libs | |||
LIBS_WIN32 = \ | |||
$(MODULEDIR)/jackbridge.win32e.a \ | |||
$(MODULEDIR)/lilv.win32.a \ | |||
$(MODULEDIR)/rtmempool.win32.a | |||
LIBS_WIN32 += \ | |||
$(MODULEDIR)/juce_audio_basics.win32.a \ | |||
$(MODULEDIR)/juce_audio_processors.win32.a \ | |||
$(MODULEDIR)/juce_core.win32.a \ | |||
$(MODULEDIR)/juce_data_structures.win32.a \ | |||
$(MODULEDIR)/juce_events.win32.a \ | |||
$(MODULEDIR)/juce_graphics.win32.a \ | |||
$(MODULEDIR)/juce_gui_basics.win32.a | |||
$(BINDIR)/carla-bridge-win32.exe: $(OBJS_WIN32) $(LIBS_WIN32) | |||
$(CXX) $(OBJS_WIN32) $(LIBS_START) $(LIBS_WIN32) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_32BIT_FLAGS) -o $@ | |||
$(OBJDIR)/%.cpp.win32.o: %.cpp | |||
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@ | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.win32.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (win32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaEng%.cpp.win32.o: $(CWD)/backend/engine/CarlaEng%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaEng$*.cpp (win32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaPlug%.cpp.win32.o: $(CWD)/backend/plugin/CarlaPlug%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPlug$*.cpp (win32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaStandalone.cpp.win32.o: $(CWD)/backend/CarlaStandalone.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaStandalone.cpp (win32 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# win64 | |||
OBJS_WIN64 = CarlaBridgePlugin.cpp.win64.o | |||
# carla-engine | |||
OBJS_WIN64 += \ | |||
$(OBJDIR)/CarlaEngine.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineClient.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineData.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineInternal.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineOsc.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineOscSend.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEnginePorts.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineThread.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineBridge.cpp.win64.o \ | |||
$(OBJDIR)/CarlaEngineJack.cpp.win64.o | |||
# carla-plugin | |||
OBJS_WIN64 += \ | |||
$(OBJDIR)/CarlaPlugin.cpp.win64.o \ | |||
$(OBJDIR)/CarlaPluginInternal.cpp.win64.o \ | |||
$(OBJDIR)/CarlaPluginThread.cpp.win64.o \ | |||
$(OBJDIR)/LadspaPlugin.cpp.win64.o \ | |||
$(OBJDIR)/DssiPlugin.cpp.win64.o \ | |||
$(OBJDIR)/Lv2Plugin.cpp.win64.o \ | |||
$(OBJDIR)/VstPlugin.cpp.win64.o \ | |||
$(OBJDIR)/Vst3Plugin.cpp.win64.o \ | |||
$(OBJDIR)/AuPlugin.cpp.win64.o \ | |||
$(OBJDIR)/JucePlugin.cpp.win64.o | |||
# carla-standalone | |||
OBJS_WIN64 += \ | |||
$(OBJDIR)/CarlaStandalone.cpp.win64.o | |||
# libs | |||
LIBS_WIN64 = \ | |||
$(MODULEDIR)/jackbridge.win64e.a \ | |||
$(MODULEDIR)/lilv.win64.a \ | |||
$(MODULEDIR)/rtmempool.win64.a | |||
LIBS_WIN64 += \ | |||
$(MODULEDIR)/juce_audio_basics.win64.a \ | |||
$(MODULEDIR)/juce_audio_processors.win64.a \ | |||
$(MODULEDIR)/juce_core.win64.a \ | |||
$(MODULEDIR)/juce_data_structures.win64.a \ | |||
$(MODULEDIR)/juce_events.win64.a \ | |||
$(MODULEDIR)/juce_graphics.win64.a \ | |||
$(MODULEDIR)/juce_gui_basics.win64.a | |||
$(BINDIR)/carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64) | |||
$(CXX) $(OBJS_WIN64) $(LIBS_START) $(LIBS_WIN64) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_64BIT_FLAGS) -o $@ | |||
$(OBJDIR)/%.cpp.win64.o: %.cpp | |||
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@ | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.win64.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (win64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaEng%.cpp.win64.o: $(CWD)/backend/engine/CarlaEng%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaEng$*.cpp (win64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaPlug%.cpp.win64.o: $(CWD)/backend/plugin/CarlaPlug%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPlug$*.cpp (win64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaStandalone.cpp.win64.o: $(CWD)/backend/CarlaStandalone.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaStandalone.cpp (win64 bridge)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
-include $(OBJS:%.o=%.d) | |||
-include $(OBJS_native:%.o=%.d) | |||
-include $(OBJS_posix32:%.o=%.d) | |||
-include $(OBJS_posix64:%.o=%.d) | |||
-include $(OBJS_win32:%.o=%.d) | |||
-include $(OBJS_win64:%.o=%.d) | |||
# ---------------------------------------------------------------------------------------------------------------------------- |
@@ -1,30 +1,41 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for carla-bridges # | |||
# -------------------------- # | |||
# Makefile for carla-bridges-ui # | |||
# ----------------------------- # | |||
# Created by falkTX | |||
# | |||
# TODO: $(LIBS_START) + $(LIBS_END) | |||
CWD=.. | |||
MODULENAME=carla-bridge | |||
include $(CWD)/Makefile.mk | |||
include ../Makefile.mk | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# -------------------------------------------------------------- | |||
BINDIR := $(CWD)/../bin | |||
BUILD_CXX_FLAGS += -DBUILD_BRIDGE | |||
BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules | |||
BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | |||
ifeq ($(DEBUG),true) | |||
OBJDIR := $(CWD)/../build/bridges-plugin/Debug | |||
MODULEDIR := $(CWD)/../build/modules/Debug | |||
else | |||
OBJDIR := $(CWD)/../build/bridges-plugin/Release | |||
MODULEDIR := $(CWD)/../build/modules/Release | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||
BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | |||
BUILD_LV2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_LV2 | |||
BUILD_VST_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_VST | |||
BUILD_LV2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_LV2 | |||
BUILD_VST2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_VST2 | |||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
BUILD_VST_FLAGS += -DVESTIGE_HEADER | |||
BUILD_VST2_FLAGS += -DVESTIGE_HEADER | |||
endif | |||
LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
LINK_FLAGS += $(LIBLO_LIBS) | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_LV2_GTK2_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0) | |||
LINK_LV2_GTK2_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-2.0) -ldl | |||
@@ -32,25 +43,30 @@ LINK_LV2_GTK2_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-2.0) -ldl | |||
BUILD_LV2_GTK3_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0) | |||
LINK_LV2_GTK3_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-3.0) -ldl | |||
BUILD_LV2_QT4_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui) | |||
BUILD_LV2_QT4_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui) -I$(OBJDIR) -I$(CWD)/modules/theme | |||
LINK_LV2_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl | |||
BUILD_LV2_QT5_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) | |||
BUILD_LV2_QT5_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) -I$(OBJDIR) -I$(CWD)/modules/theme | |||
LINK_LV2_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl | |||
BUILD_LV2_X11_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 $(X11_FLAGS) | |||
LINK_LV2_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) -ldl | |||
BUILD_LV2_COCOA_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA | |||
BUILD_LV2_COCOA_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA -ObjC++ | |||
LINK_LV2_COCOA_FLAGS = $(LINK_FLAGS) -framework Cocoa -framework IOKit -framework QuartzCore -ldl | |||
BUILD_LV2_WINDOWS_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND | |||
LINK_LV2_WINDOWS_FLAGS = $(LINK_FLAGS) -static -mwindows | |||
BUILD_VST_X11_FLAGS = $(BUILD_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11 $(X11_FLAGS) | |||
LINK_VST_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) -ldl | |||
BUILD_VST2_X11_FLAGS = $(BUILD_VST2_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST2_X11 $(X11_FLAGS) | |||
LINK_VST2_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) -ldl | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
HAVE_QT4 = false | |||
HAVE_QT5 = false | |||
endif | |||
ifeq ($(HAVE_GTK2),true) | |||
TARGETS += ui_lv2-gtk2 | |||
@@ -70,7 +86,7 @@ endif | |||
ifeq ($(HAVE_X11),true) | |||
TARGETS += ui_lv2-x11 | |||
TARGETS += ui_vst-x11 | |||
TARGETS += ui_vst2-x11 | |||
endif | |||
ifeq ($(MACOS),true) | |||
@@ -81,190 +97,254 @@ ifeq ($(WIN32),true) | |||
TARGETS += ui_lv2-windows | |||
endif | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
all: $(TARGETS) | |||
ui_lv2-gtk2: ../../bin/carla-bridge-lv2-gtk2 | |||
ui_lv2-gtk3: ../../bin/carla-bridge-lv2-gtk3 | |||
ui_lv2-qt4: ../../bin/carla-bridge-lv2-qt4 | |||
ui_lv2-qt5: ../../bin/carla-bridge-lv2-qt5 | |||
ui_lv2-x11: ../../bin/carla-bridge-lv2-x11 | |||
ui_lv2-cocoa: ../../bin/carla-bridge-lv2-cocoa | |||
ui_lv2-windows: ../../bin/carla-bridge-lv2-windows.exe | |||
ui_vst-x11: ../../bin/carla-bridge-vst-x11 | |||
# -------------------------------------------------------------- | |||
# UI common | |||
OBJS_LV2_LIBS = \ | |||
../modules/juce_core.a \ | |||
../modules/lilv.a | |||
OBJS_LV2_LIBS_JUCE_UI = \ | |||
$(OBJS_LV2_LIBS) \ | |||
../modules/juce_data_structures.a \ | |||
../modules/juce_events.a \ | |||
../modules/juce_graphics.a \ | |||
../modules/juce_gui_basics.a | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
ifeq ($(MACOS),true) | |||
OBJS_LV2_LIBS_JUCE_UI += \ | |||
../modules/juce_gui_extra.a | |||
endif | |||
clean: | |||
rm -f $(OBJDIR)/*.cpp $(OBJDIR)/*.moc $(OBJDIR)/*.o | |||
rm -f $(BINDIR)/$(MODULENAME)-lv2-* $(BINDIR)/$(MODULENAME)-vst2-* | |||
debug: | |||
$(MAKE) DEBUG=true | |||
doxygen: carla_bridge.doxygen | |||
doxygen $< | |||
OBJS_VST_LIBS = \ | |||
../modules/juce_core.a | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
%__lv2.o: %.cpp | |||
$(CXX) $< $(BUILD_LV2_FLAGS) -c -o $@ | |||
ui_lv2-gtk2: $(BINDIR)/$(MODULENAME)-lv2-gtk2 | |||
ui_lv2-gtk3: $(BINDIR)/$(MODULENAME)-lv2-gtk3 | |||
ui_lv2-qt4: $(BINDIR)/$(MODULENAME)-lv2-qt4 | |||
ui_lv2-qt5: $(BINDIR)/$(MODULENAME)-lv2-qt5 | |||
ui_lv2-x11: $(BINDIR)/$(MODULENAME)-lv2-x11 | |||
ui_lv2-cocoa: $(BINDIR)/$(MODULENAME)-lv2-cocoa | |||
ui_lv2-windows: $(BINDIR)/$(MODULENAME)-lv2-windows.exe | |||
ui_vst2-x11: $(BINDIR)/$(MODULENAME)-vst2-x11 | |||
%__vst.o: %.cpp | |||
$(CXX) $< $(BUILD_VST_FLAGS) -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Common libs | |||
LIBS_LV2 = \ | |||
$(MODULEDIR)/juce_core.a \ | |||
$(MODULEDIR)/lilv.a | |||
LIBS_LV2_JUCE = \ | |||
$(LIBS_LV2) \ | |||
$(MODULEDIR)/juce_data_structures.a \ | |||
$(MODULEDIR)/juce_events.a \ | |||
$(MODULEDIR)/juce_graphics.a \ | |||
$(MODULEDIR)/juce_gui_basics.a | |||
ifeq ($(MACOS),true) | |||
LIBS_LV2_JUCE += \ | |||
$(MODULEDIR)/juce_gui_extra.a | |||
endif | |||
resources.qt4.cpp: ../../resources/resources-theme.qrc | |||
$(RCC_QT4) $< -o $@ | |||
LIBS_VST2 = \ | |||
$(MODULEDIR)/juce_core.a | |||
resources.qt5.cpp: ../../resources/resources-theme.qrc | |||
$(RCC_QT5) $< -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Common objects | |||
CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp | |||
$(MOC_QT4) $< -DMOC_PARSING -o $@ | |||
$(OBJDIR)/%.cpp.lv2.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2)" | |||
@$(CXX) $< $(BUILD_LV2_FLAGS) -MMD -c -o $@ | |||
CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp | |||
$(MOC_QT5) $< -DMOC_PARSING -o $@ | |||
$(OBJDIR)/%.cpp.vst2.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (VST2)" | |||
@$(CXX) $< $(BUILD_VST2_FLAGS) -MMD -c -o $@ | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_lv2-gtk2 | |||
OBJS_LV2_GTK2 = \ | |||
CarlaBridgeClient__lv2.o \ | |||
CarlaBridgeOsc__lv2.o \ | |||
CarlaBridgeToolkitGtk__lv2-gtk2.o \ | |||
CarlaBridgeUI-LV2__lv2-gtk2.o | |||
$(OBJDIR)/CarlaBridgeClient.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitGtk.cpp.lv2-gtk2.o \ | |||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-gtk2.o | |||
$(BINDIR)/$(MODULENAME)-lv2-gtk2: $(OBJS_LV2_GTK2) $(LIBS_LV2) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-lv2-gtk2" | |||
@$(CXX) $(OBJS_LV2_GTK2) $(LIBS_START) $(LIBS_LV2) $(LIBS_END) $(LINK_LV2_GTK2_FLAGS) -o $@ | |||
../../bin/carla-bridge-lv2-gtk2: $(OBJS_LV2_GTK2) $(OBJS_LV2_LIBS) | |||
$(CXX) $^ $(LINK_LV2_GTK2_FLAGS) -o $@ | |||
$(OBJDIR)/%.cpp.lv2-gtk2.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2-GTK2)" | |||
@$(CXX) $< $(BUILD_LV2_GTK2_FLAGS) -MMD -c -o $@ | |||
%__lv2-gtk2.o: %.cpp | |||
$(CXX) $< $(BUILD_LV2_GTK2_FLAGS) -c -o $@ | |||
-include $(OBJS_LV2_GTK2:%.o=%.d) | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_lv2-gtk3 | |||
OBJS_LV2_GTK3 = \ | |||
CarlaBridgeClient__lv2.o \ | |||
CarlaBridgeOsc__lv2.o \ | |||
CarlaBridgeToolkitGtk__lv2-gtk3.o \ | |||
CarlaBridgeUI-LV2__lv2-gtk3.o | |||
$(OBJDIR)/CarlaBridgeClient.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitGtk.cpp.lv2-gtk3.o \ | |||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-gtk3.o | |||
$(BINDIR)/$(MODULENAME)-lv2-gtk3: $(OBJS_LV2_GTK3) $(LIBS_LV2) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-lv2-gtk3" | |||
@$(CXX) $(OBJS_LV2_GTK3) $(LIBS_START) $(LIBS_LV2) $(LIBS_END) $(LINK_LV2_GTK3_FLAGS) -o $@ | |||
../../bin/carla-bridge-lv2-gtk3: $(OBJS_LV2_GTK3) $(OBJS_LV2_LIBS) | |||
$(CXX) $^ $(LINK_LV2_GTK3_FLAGS) -o $@ | |||
$(OBJDIR)/%.cpp.lv2-gtk3.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2-GTK3)" | |||
@$(CXX) $< $(BUILD_LV2_GTK3_FLAGS) -MMD -c -o $@ | |||
%__lv2-gtk3.o: %.cpp | |||
$(CXX) $< $(BUILD_LV2_GTK3_FLAGS) -c -o $@ | |||
-include $(OBJS_LV2_GTK3:%.o=%.d) | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_lv2-qt4 | |||
OBJS_LV2_QT4 = \ | |||
CarlaBridgeClient__lv2.o \ | |||
CarlaBridgeOsc__lv2.o \ | |||
CarlaBridgeToolkitQt__lv2-qt4.o \ | |||
CarlaBridgeUI-LV2__lv2-qt4.o | |||
../../bin/carla-bridge-lv2-qt4: $(OBJS_LV2_QT4) $(OBJS_LV2_LIBS) ../modules/theme.qt4.a | |||
$(CXX) $^ $(LINK_LV2_QT4_FLAGS) -o $@ | |||
%__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt4.moc resources.qt4.cpp | |||
$(CXX) $< $(BUILD_LV2_QT4_FLAGS) -I../modules/theme -c -o $@ | |||
# -------------------------------------------------------------- | |||
$(OBJDIR)/CarlaBridgeClient.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitQt.cpp.lv2-qt4.o \ | |||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-qt4.o | |||
$(BINDIR)/$(MODULENAME)-lv2-qt4: $(OBJS_LV2_QT4) $(LIBS_LV2) $(MODULEDIR)/theme.qt4.a | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-lv2-qt4" | |||
@$(CXX) $(OBJS_LV2_QT4) $(LIBS_START) $(LIBS_LV2) $(MODULEDIR)/theme.qt4.a $(LIBS_END) $(LINK_LV2_QT4_FLAGS) -o $@ | |||
$(OBJDIR)/%.cpp.lv2-qt4.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt4.moc $(OBJDIR)/resources.qt4.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2-QT4)" | |||
@$(CXX) $< $(BUILD_LV2_QT4_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Generating CarlaBridgeToolkitQt4.moc" | |||
@$(MOC_QT4) $< -DMOC_PARSING -o $@ | |||
$(OBJDIR)/resources.qt4.cpp: ../../resources/resources-theme.qrc | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Generating resources.qt4.cpp" | |||
@$(RCC_QT4) $< -o $@ | |||
-include $(OBJS_LV2_QT4:%.o=%.d) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_lv2-qt5 | |||
OBJS_LV2_QT5 = \ | |||
CarlaBridgeClient__lv2.o \ | |||
CarlaBridgeOsc__lv2.o \ | |||
CarlaBridgeToolkitQt__lv2-qt5.o \ | |||
CarlaBridgeUI-LV2__lv2-qt5.o | |||
../../bin/carla-bridge-lv2-qt5: $(OBJS_LV2_QT5) $(OBJS_LV2_LIBS) ../modules/theme.qt5.a | |||
$(CXX) $^ $(LINK_LV2_QT5_FLAGS) -o $@ | |||
%__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt5.moc resources.qt5.cpp | |||
$(CXX) $< $(BUILD_LV2_QT5_FLAGS) -I../modules/theme -c -o $@ | |||
# -------------------------------------------------------------- | |||
$(OBJDIR)/CarlaBridgeClient.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitQt.cpp.lv2-qt5.o \ | |||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-qt5.o | |||
$(BINDIR)/$(MODULENAME)-lv2-qt5: $(OBJS_LV2_QT5) $(LIBS_LV2) $(MODULEDIR)/theme.qt5.a | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-lv2-qt5" | |||
@$(CXX) $(OBJS_LV2_QT5) $(LIBS_START) $(LIBS_LV2) $(MODULEDIR)/theme.qt5.a $(LIBS_END) $(LINK_LV2_QT5_FLAGS) -o $@ | |||
$(OBJDIR)/%.cpp.lv2-qt5.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt5.moc $(OBJDIR)/resources.qt5.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2-QT5)" | |||
@$(CXX) $< $(BUILD_LV2_QT5_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Generating CarlaBridgeToolkitQt5.moc" | |||
@$(MOC_QT5) $< -DMOC_PARSING -o $@ | |||
$(OBJDIR)/resources.qt5.cpp: ../../resources/resources-theme.qrc | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Generating resources.qt5.cpp" | |||
@$(RCC_QT5) $< -o $@ | |||
-include $(OBJS_LV2_QT5:%.o=%.d) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_lv2-x11 | |||
OBJS_LV2_X11 = \ | |||
CarlaBridgeClient__lv2.o \ | |||
CarlaBridgeOsc__lv2.o \ | |||
CarlaBridgeToolkitPlugin__lv2-x11.o \ | |||
CarlaBridgeUI-LV2__lv2-x11.o | |||
$(OBJDIR)/CarlaBridgeClient.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.lv2-x11.o \ | |||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-x11.o | |||
../../bin/carla-bridge-lv2-x11: $(OBJS_LV2_X11) $(OBJS_LV2_LIBS) | |||
$(CXX) $^ $(LINK_LV2_X11_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-lv2-x11: $(OBJS_LV2_X11) $(LIBS_LV2) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-lv2-x11" | |||
@$(CXX) $(OBJS_LV2_X11) $(LIBS_START) $(LIBS_LV2) $(LIBS_END) $(LINK_LV2_X11_FLAGS) -o $@ | |||
%__lv2-x11.o: %.cpp | |||
$(CXX) $< $(BUILD_LV2_X11_FLAGS) -c -o $@ | |||
$(OBJDIR)/%.cpp.lv2-x11.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2-X11)" | |||
@$(CXX) $< $(BUILD_LV2_X11_FLAGS) -MMD -c -o $@ | |||
# -------------------------------------------------------------- | |||
-include $(OBJS_LV2_X11:%.o=%.d) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_lv2-cocoa | |||
OBJS_LV2_COCOA = \ | |||
CarlaBridgeClient__lv2.o \ | |||
CarlaBridgeOsc__lv2.o \ | |||
CarlaBridgeToolkitPlugin__lv2-cocoa.o \ | |||
CarlaBridgeUI-LV2__lv2-cocoa.o | |||
$(OBJDIR)/CarlaBridgeClient.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.lv2-cocoa.o \ | |||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-cocoa.o | |||
$(BINDIR)/$(MODULENAME)-lv2-cocoa: $(OBJS_LV2_COCOA) $(LIBS_LV2_JUCE) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-lv2-cocoa" | |||
@$(CXX) $(OBJS_LV2_COCOA) $(LIBS_START) $(LIBS_LV2_JUCE) $(LIBS_END) $(LINK_LV2_COCOA_FLAGS) -o $@ | |||
../../bin/carla-bridge-lv2-cocoa: $(OBJS_LV2_COCOA) $(OBJS_LV2_LIBS_JUCE_UI) | |||
$(CXX) $^ $(LINK_LV2_COCOA_FLAGS) -o $@ | |||
$(OBJDIR)/%.cpp.lv2-cocoa.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2-Cocoa)" | |||
@$(CXX) $< $(BUILD_LV2_COCOA_FLAGS) -MMD -c -o $@ | |||
%__lv2-cocoa.o: %.cpp | |||
$(CXX) $< $(BUILD_LV2_COCOA_FLAGS) -ObjC++ -c -o $@ | |||
-include $(OBJS_LV2_COCOA:%.o=%.d) | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_lv2-windows | |||
OBJS_LV2_WINDOWS = \ | |||
CarlaBridgeClient__lv2.o \ | |||
CarlaBridgeOsc__lv2.o \ | |||
CarlaBridgeToolkitPlugin__lv2-windows.o \ | |||
CarlaBridgeUI-LV2__lv2-windows.o | |||
$(OBJDIR)/CarlaBridgeClient.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.lv2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.lv2-windows.o \ | |||
$(OBJDIR)/CarlaBridgeUI-LV2.cpp.lv2-windows.o | |||
../../bin/carla-bridge-lv2-windows.exe: $(OBJS_LV2_WINDOWS) $(OBJS_LV2_LIBS_JUCE_UI) | |||
$(CXX) $(OBJS_LV2_WINDOWS) $(LIBS_START) $(OBJS_LV2_LIBS_JUCE_UI) $(LIBS_END) $(LINK_LV2_WINDOWS_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-lv2-windows.exe: $(OBJS_LV2_WINDOWS) $(LIBS_LV2_JUCE) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-lv2-windows.exe" | |||
@$(CXX) $(OBJS_LV2_WINDOWS) $(LIBS_START) $(LIBS_LV2_JUCE) $(LIBS_END) $(LINK_LV2_WINDOWS_FLAGS) -o $@ | |||
%__lv2-windows.o: %.cpp | |||
$(CXX) $< $(BUILD_LV2_WINDOWS_FLAGS) -c -o $@ | |||
$(OBJDIR)/%.cpp.lv2-windows.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (LV2-Windows)" | |||
@$(CXX) $< $(BUILD_LV2_WINDOWS_FLAGS) -MMD -c -o $@ | |||
# -------------------------------------------------------------- | |||
# ui_vst-x11 | |||
-include $(OBJS_LV2_WINDOWS:%.o=%.d) | |||
OBJS_VST_X11 = \ | |||
CarlaBridgeClient__vst.o \ | |||
CarlaBridgeOsc__vst.o \ | |||
CarlaBridgeToolkitPlugin__vst-x11.o \ | |||
CarlaBridgeUI-VST__vst-x11.o \ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# ui_vst2-x11 | |||
../../bin/carla-bridge-vst-x11: $(OBJS_VST_X11) $(OBJS_VST_LIBS) | |||
$(CXX) $^ $(LINK_VST_X11_FLAGS) -o $@ | |||
OBJS_VST2_X11 = \ | |||
$(OBJDIR)/CarlaBridgeClient.cpp.vst2.o \ | |||
$(OBJDIR)/CarlaBridgeOsc.cpp.vst2.o \ | |||
$(OBJDIR)/CarlaBridgeToolkitPlugin.cpp.vst2-x11.o \ | |||
$(OBJDIR)/CarlaBridgeUI-VST2.cpp.vst2-x11.o | |||
%__vst-x11.o: %.cpp | |||
$(CXX) $< $(BUILD_VST_X11_FLAGS) -c -o $@ | |||
$(BINDIR)/$(MODULENAME)-vst2-x11: $(OBJS_VST2_X11) $(LIBS_VST2) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-vst2-x11" | |||
@$(CXX) $(OBJS_VST2_X11) $(LIBS_START) $(LIBS_VST2) $(LIBS_END) $(LINK_VST2_X11_FLAGS) -o $@ | |||
# -------------------------------------------------------------- | |||
$(OBJDIR)/%.cpp.vst2-x11.o: %.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (VST2-X11)" | |||
@$(CXX) $< $(BUILD_VST2_X11_FLAGS) -MMD -c -o $@ | |||
clean: | |||
$(RM) *.moc *.o | |||
$(RM) resources.*.cpp | |||
$(RM) ../../bin/carla-bridge-lv2-* ../../bin/carla-bridge-vst-* | |||
debug: | |||
$(MAKE) DEBUG=true | |||
doxygen: carla_bridge.doxygen | |||
doxygen $< | |||
-include $(OBJS_VST2_X11:%.o=%.d) | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- |
@@ -4,23 +4,37 @@ | |||
# Created by falkTX | |||
# | |||
include ../Makefile.mk | |||
# -------------------------------------------------------------- | |||
ifeq ($(WIN64),true) | |||
winv=64 | |||
else | |||
winv=32 | |||
endif | |||
# -------------------------------------------------------------- | |||
CWD=.. | |||
MODULENAME=carla-discovery | |||
include $(CWD)/Makefile.mk | |||
BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules | |||
BUILD_CXX_FLAGS += -I../includes/vst | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
BUILD_CXX_FLAGS += -I../includes/vst3 | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BINDIR := $(CWD)/../bin | |||
ifeq ($(DEBUG),true) | |||
OBJDIR := $(CWD)/../build/discovery/Debug | |||
MODULEDIR := $(CWD)/../build/modules/Debug | |||
else | |||
OBJDIR := $(CWD)/../build/discovery/Release | |||
MODULEDIR := $(CWD)/../build/modules/Release | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||
BUILD_CXX_FLAGS += -I$(CWD)/includes/vst2 -I$(CWD)/includes/vst3 | |||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||
endif | |||
ifeq ($(MACOS),true) | |||
BUILD_CXX_FLAGS += -ObjC++ | |||
endif | |||
@@ -28,13 +42,10 @@ endif | |||
32BIT_FLAGS += -DBUILD_BRIDGE | |||
64BIT_FLAGS += -DBUILD_BRIDGE | |||
# -------------------------------------------------------------- | |||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# -------------------------------------------------------------- | |||
NATIVE_BUILD_FLAGS = "" | |||
NATIVE_LINK_FLAGS = "" | |||
ifeq ($(HAVE_FLUIDSYNTH),true) | |||
NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | |||
@@ -46,57 +57,57 @@ NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS) | |||
NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS) | |||
endif | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
LIBS = ../modules/lilv.a | |||
LIBS_posix32 = ../modules/lilv.posix32.a | |||
LIBS_posix64 = ../modules/lilv.posix64.a | |||
LIBS_win32 = ../modules/lilv.win32.a | |||
LIBS_win64 = ../modules/lilv.win64.a | |||
LINK_FLAGS += $(LILV_LIBS) | |||
LIBS += ../modules/juce_core.a | |||
LIBS_posix32 += ../modules/juce_core.posix32.a | |||
LIBS_posix64 += ../modules/juce_core.posix64.a | |||
LIBS_win32 += ../modules/juce_core.win32.a | |||
LIBS_win64 += ../modules/juce_core.win64.a | |||
LIBS_native = $(MODULEDIR)/juce_core.a | |||
LIBS_posix32 = $(MODULEDIR)/juce_core.posix32.a | |||
LIBS_posix64 = $(MODULEDIR)/juce_core.posix64.a | |||
LIBS_win32 = $(MODULEDIR)/juce_core.win32.a | |||
LIBS_win64 = $(MODULEDIR)/juce_core.win64.a | |||
LINK_FLAGS += $(JUCE_CORE_LIBS) | |||
LIBS_native += $(MODULEDIR)/lilv.a | |||
LIBS_posix32 += $(MODULEDIR)/lilv.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/lilv.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/lilv.win32.a | |||
LIBS_win64 += $(MODULEDIR)/lilv.win64.a | |||
LINK_FLAGS += $(LILV_LIBS) | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
LIBS += ../modules/juce_audio_basics.a | |||
LIBS_posix32 += ../modules/juce_audio_basics.posix32.a | |||
LIBS_posix64 += ../modules/juce_audio_basics.posix64.a | |||
LIBS_win32 += ../modules/juce_audio_basics.win32.a | |||
LIBS_win64 += ../modules/juce_audio_basics.win64.a | |||
LIBS += ../modules/juce_audio_processors.a | |||
LIBS_posix32 += ../modules/juce_audio_processors.posix32.a | |||
LIBS_posix64 += ../modules/juce_audio_processors.posix64.a | |||
LIBS_win32 += ../modules/juce_audio_processors.win32.a | |||
LIBS_win64 += ../modules/juce_audio_processors.win64.a | |||
LIBS += ../modules/juce_data_structures.a | |||
LIBS_posix32 += ../modules/juce_data_structures.posix32.a | |||
LIBS_posix64 += ../modules/juce_data_structures.posix64.a | |||
LIBS_win32 += ../modules/juce_data_structures.win32.a | |||
LIBS_win64 += ../modules/juce_data_structures.win64.a | |||
LIBS += ../modules/juce_events.a | |||
LIBS_posix32 += ../modules/juce_events.posix32.a | |||
LIBS_posix64 += ../modules/juce_events.posix64.a | |||
LIBS_win32 += ../modules/juce_events.win32.a | |||
LIBS_win64 += ../modules/juce_events.win64.a | |||
LIBS += ../modules/juce_graphics.a | |||
LIBS_posix32 += ../modules/juce_graphics.posix32.a | |||
LIBS_posix64 += ../modules/juce_graphics.posix64.a | |||
LIBS_win32 += ../modules/juce_graphics.win32.a | |||
LIBS_win64 += ../modules/juce_graphics.win64.a | |||
LIBS += ../modules/juce_gui_basics.a | |||
LIBS_posix32 += ../modules/juce_gui_basics.posix32.a | |||
LIBS_posix64 += ../modules/juce_gui_basics.posix64.a | |||
LIBS_win32 += ../modules/juce_gui_basics.win32.a | |||
LIBS_win64 += ../modules/juce_gui_basics.win64.a | |||
LIBS_native += $(MODULEDIR)/juce_audio_basics.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_audio_basics.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_audio_basics.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_audio_basics.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_audio_basics.win64.a | |||
LIBS_native += $(MODULEDIR)/juce_audio_processors.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_audio_processors.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_audio_processors.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_audio_processors.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_audio_processors.win64.a | |||
LIBS_native += $(MODULEDIR)/juce_data_structures.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_data_structures.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_data_structures.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_data_structures.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_data_structures.win64.a | |||
LIBS_native += $(MODULEDIR)/juce_events.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_events.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_events.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_events.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_events.win64.a | |||
LIBS_native += $(MODULEDIR)/juce_graphics.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_graphics.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_graphics.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_graphics.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_graphics.win64.a | |||
LIBS_native += $(MODULEDIR)/juce_gui_basics.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_gui_basics.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_gui_basics.posix64.a | |||
LIBS_win32 += $(MODULEDIR)/juce_gui_basics.win32.a | |||
LIBS_win64 += $(MODULEDIR)/juce_gui_basics.win64.a | |||
ifeq ($(MACOS),true) | |||
LIBS += ../modules/juce_gui_extra.a | |||
LIBS_posix32 += ../modules/juce_gui_extra.posix32.a | |||
LIBS_posix64 += ../modules/juce_gui_extra.posix64.a | |||
LIBS_native += $(MODULEDIR)/juce_gui_extra.a | |||
LIBS_posix32 += $(MODULEDIR)/juce_gui_extra.posix32.a | |||
LIBS_posix64 += $(MODULEDIR)/juce_gui_extra.posix64.a | |||
endif | |||
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | |||
LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) | |||
@@ -113,62 +124,92 @@ ifeq ($(UNIX),true) | |||
LINK_FLAGS += -ldl | |||
endif | |||
# -------------------------------------------------------------- | |||
OBJS = carla-discovery.cpp | |||
# -------------------------------------------------------------- | |||
all: ../../bin/carla-discovery-native$(APP_EXT) | |||
posix32: ../../bin/carla-discovery-posix32 | |||
posix64: ../../bin/carla-discovery-posix64 | |||
win32: ../../bin/carla-discovery-win32.exe | |||
win64: ../../bin/carla-discovery-win64.exe | |||
# -------------------------------------------------------------- | |||
carla-discovery.cpp.o: carla-discovery.cpp $(DEPS) | |||
$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@ | |||
carla-discovery.cpp.posix32.o: carla-discovery.cpp $(DEPS) | |||
$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@ | |||
carla-discovery.cpp.posix64.o: carla-discovery.cpp $(DEPS) | |||
$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@ | |||
carla-discovery.cpp.win32.o: carla-discovery.cpp $(DEPS) | |||
$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@ | |||
carla-discovery.cpp.win64.o: carla-discovery.cpp $(DEPS) | |||
$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@ | |||
# -------------------------------------------------------------- | |||
../../bin/carla-discovery-native: carla-discovery.cpp.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@ | |||
../../bin/carla-discovery-native.exe: carla-discovery.cpp.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@ && \ | |||
cd ../../bin/ && ln -s carla-discovery-native.exe carla-discovery-win$(winv).exe | |||
../../bin/carla-discovery-posix32: carla-discovery.cpp.posix32.o $(LIBS_posix32) | |||
$(CXX) $< $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(32BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
../../bin/carla-discovery-posix64: carla-discovery.cpp.posix64.o $(DEPS) $(LIBS_posix64) | |||
$(CXX) $< $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(64BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
OBJS_native = $(OBJDIR)/$(MODULENAME).cpp.o | |||
OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o | |||
OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o | |||
OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o | |||
OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o | |||
../../bin/carla-discovery-win32.exe: carla-discovery.cpp.win32.o $(DEPS) $(LIBS_win32) | |||
$(CXX) $< $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(32BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
../../bin/carla-discovery-win64.exe: carla-discovery.cpp.win64.o $(DEPS) $(LIBS_win64) | |||
$(CXX) $< $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(64BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
all: native | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
clean: | |||
$(RM) *.o ../../bin/carla-discovery-* | |||
rm -f $(OBJDIR)/*.o $(BINDIR)/$(MODULENAME)-* | |||
debug: | |||
$(MAKE) DEBUG=true | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT) | |||
posix32: $(BINDIR)/$(MODULENAME)-posix32 | |||
posix64: $(BINDIR)/$(MODULENAME)-posix64 | |||
win32: $(BINDIR)/$(MODULENAME)-win32.exe | |||
win64: $(BINDIR)/$(MODULENAME)-win64.exe | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
$(BINDIR)/$(MODULENAME)-native: $(OBJS_native) $(LIBS_native) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-native" | |||
@$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-native.exe: $(OBJS_native) $(LIBS_native) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-native.exe" | |||
@$(CXX) $< $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@ | |||
@echo "Symlinking $(MODULENAME)-win$(winv).exe" | |||
@rm -f $(BINDIR)/$(MODULENAME)-win$(winv).exe | |||
@ln -s $(BINDIR)/$(MODULENAME)-native.exe $(BINDIR)/$(MODULENAME)-win$(winv).exe | |||
$(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-posix32" | |||
@$(CXX) $< $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(32BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-posix64: $(OBJS_posix64) $(LIBS_posix64) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-posix64" | |||
@$(CXX) $< $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(64BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-win32.exe: $(OBJS_win32) $(LIBS_win32) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-win32.exe" | |||
@$(CXX) $< $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(32BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
$(BINDIR)/$(MODULENAME)-win64.exe: $(OBJS_win64) $(LIBS_win64) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking $(MODULENAME)-win64.exe" | |||
@$(CXX) $< $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(64BIT_FLAGS) $(LINK_FLAGS) -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
$(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $<" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (32bit)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (64bit)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -MMD -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
-include $(OBJS_native:%.o=%.d) | |||
-include $(OBJS_posix32:%.o=%.d) | |||
-include $(OBJS_posix64:%.o=%.d) | |||
-include $(OBJS_win32:%.o=%.d) | |||
-include $(OBJS_win64:%.o=%.d) | |||
# ---------------------------------------------------------------------------------------------------------------------------- |
@@ -9,7 +9,7 @@ include ../Makefile.mk | |||
# -------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -I../includes -I../utils -isystem ../modules | |||
BUILD_CXX_FLAGS += -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||
# -------------------------------------------------------------- | |||
@@ -10,7 +10,7 @@ include ../Makefile.mk | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += $(JUCE_AUDIO_PROCESSORS_FLAGS) -I. -I../../includes/ladspa -I../../includes/vst -I../../includes/vst3 -w | |||
BUILD_CXX_FLAGS += $(JUCE_AUDIO_PROCESSORS_FLAGS) -I$(CWD)/includes/ladspa -I$(CWD)/includes/vst2 -I$(CWD)/includes/vst3 -w | |||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||
BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||
@@ -10,8 +10,8 @@ include ../Makefile.mk | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_C_FLAGS += -isystem .. | |||
BUILD_CXX_FLAGS += -I../distrho -isystem .. | |||
BUILD_C_FLAGS += -I.. | |||
BUILD_CXX_FLAGS += -I.. -I../distrho | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Flags for _all.c | |||
@@ -1,18 +1,52 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for carla plugin # | |||
# Makefile for carla-plugin # | |||
# ------------------------- # | |||
# Created by falkTX | |||
# | |||
CWD=.. | |||
include ../Makefile.mk | |||
include $(CWD)/Makefile.mk | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules | |||
BINDIR := $(CWD)/../bin | |||
ifeq ($(DEBUG),true) | |||
OBJDIR := $(CWD)/../build/plugin/Debug | |||
MODULEDIR := $(CWD)/../build/modules/Debug | |||
else | |||
OBJDIR := $(CWD)/../build/plugin/Release | |||
MODULEDIR := $(CWD)/../build/modules/Release | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||
BUILD_CXX_FLAGS += $(NATIVE_PLUGINS_FLAGS) | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Libs | |||
LIBS = $(MODULEDIR)/carla_engine_plugin.a | |||
LIBS += $(MODULEDIR)/carla_plugin.a | |||
LIBS += $(MODULEDIR)/jackbridge.a | |||
LIBS += $(MODULEDIR)/juce_audio_basics.a | |||
LIBS += $(MODULEDIR)/juce_audio_formats.a | |||
LIBS += $(MODULEDIR)/juce_core.a | |||
LIBS += $(MODULEDIR)/lilv.a | |||
LIBS += $(MODULEDIR)/native-plugins.a | |||
LIBS += $(MODULEDIR)/rtmempool.a | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
LIBS += $(MODULEDIR)/juce_audio_processors.a | |||
LIBS += $(MODULEDIR)/juce_data_structures.a | |||
LIBS += $(MODULEDIR)/juce_events.a | |||
LIBS += $(MODULEDIR)/juce_graphics.a | |||
LIBS += $(MODULEDIR)/juce_gui_basics.a | |||
LIBS += $(MODULEDIR)/juce_gui_extra.a | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
# Link flags | |||
LINK_FLAGS += $(JACKBRIDGE_LIBS) | |||
@@ -49,103 +83,119 @@ ifeq ($(UNIX),true) | |||
LINK_FLAGS += -lmagic | |||
endif | |||
# -------------------------------------------------------------- | |||
# Libs | |||
LIBS += ../backend/carla_engine_plugin.a | |||
LIBS += ../backend/carla_plugin.a | |||
LIBS += ../modules/native-plugins.a | |||
LIBS += ../modules/jackbridge.a | |||
LIBS += ../modules/juce_audio_basics.a | |||
LIBS += ../modules/juce_audio_formats.a | |||
LIBS += ../modules/juce_core.a | |||
LIBS += ../modules/lilv.a | |||
LIBS += ../modules/rtmempool.a | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
LIBS += ../modules/juce_audio_processors.a | |||
LIBS += ../modules/juce_data_structures.a | |||
LIBS += ../modules/juce_events.a | |||
LIBS += ../modules/juce_graphics.a | |||
LIBS += ../modules/juce_gui_basics.a | |||
LIBS += ../modules/juce_gui_extra.a | |||
endif | |||
# -------------------------------------------------------------- | |||
TARGETS = | |||
ifneq ($(WIN32),true) | |||
TARGETS += \ | |||
../../bin/carla.lv2/carla$(LIB_EXT) \ | |||
../../bin/carla-lv2-export$(APP_EXT) | |||
endif | |||
TARGETS = \ | |||
$(BINDIR)/carla.lv2/carla$(LIB_EXT) \ | |||
$(BINDIR)/carla.lv2/manifest.ttl | |||
ifeq ($(LINUX),true) | |||
ifeq ($(DEFAULT_QT),4) | |||
ifeq ($(HAVE_X11),true) | |||
ifeq ($(DEFAULT_QT),4) | |||
TARGETS += \ | |||
../../bin/CarlaRack$(LIB_EXT) \ | |||
../../bin/CarlaRackFX$(LIB_EXT) \ | |||
../../bin/CarlaPatchbay$(LIB_EXT) \ | |||
../../bin/CarlaPatchbayFX$(LIB_EXT) | |||
$(BINDIR)/CarlaRack$(LIB_EXT) \ | |||
$(BINDIR)/CarlaRackFX$(LIB_EXT) \ | |||
$(BINDIR)/CarlaPatchbay$(LIB_EXT) \ | |||
$(BINDIR)/CarlaPatchbayFX$(LIB_EXT) | |||
endif | |||
endif | |||
endif | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
all: $(TARGETS) | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
clean: | |||
$(RM) $(TARGETS) *.o | |||
$(RM) carla.lv2/*.* | |||
rm -f $(OBJDIR)/*.o $(TARGETS) | |||
rm -f $(BINDIR)/carla.lv2/*.* | |||
debug: | |||
$(MAKE) DEBUG=true | |||
# -------------------------------------------------------------- | |||
carla-base.cpp.o: carla-base.cpp ../modules/CarlaNative.h | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||
carla-lv2.cpp.o: carla-lv2.cpp carla-base.cpp ../modules/CarlaNative.h | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||
carla-lv2-export.cpp.o: carla-lv2-export.cpp carla-base.cpp ../modules/CarlaNative.h | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||
carla-vst.cpp.rack-fx.o: carla-vst.cpp carla-base.cpp ../modules/CarlaNative.h | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||
carla-vst.cpp.rack-syn.o: carla-vst.cpp carla-base.cpp ../modules/CarlaNative.h | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_SYNTH -c -o $@ | |||
carla-vst.cpp.patchbay-fx.o: carla-vst.cpp carla-base.cpp ../modules/CarlaNative.h | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY -c -o $@ | |||
carla-vst.cpp.patchbay-syn.o: carla-vst.cpp carla-base.cpp ../modules/CarlaNative.h | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY -DCARLA_PLUGIN_SYNTH -c -o $@ | |||
# -------------------------------------------------------------- | |||
../../bin/carla.lv2/carla$(LIB_EXT): carla-lv2.cpp.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
../../bin/carla-lv2-export$(APP_EXT): carla-lv2-export.cpp.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) -o $@ | |||
../../bin/CarlaRack$(LIB_EXT): carla-vst.cpp.rack-syn.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
../../bin/CarlaRackFX$(LIB_EXT): carla-vst.cpp.rack-fx.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
../../bin/CarlaPatchbay$(LIB_EXT): carla-vst.cpp.patchbay-syn.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
../../bin/CarlaPatchbayFX$(LIB_EXT): carla-vst.cpp.patchbay-fx.o $(LIBS) | |||
$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
# -------------------------------------------------------------- | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
$(BINDIR)/carla.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2.cpp.o $(LIBS) | |||
-@mkdir -p $(BINDIR)/carla.lv2 | |||
@echo "Linking carla.lv2/carla$(LIB_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
$(BINDIR)/CarlaRack$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.rack-syn.o $(LIBS) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking CarlaRack$(LIB_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
$(BINDIR)/CarlaRackFX$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.rack-fx.o $(LIBS) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking CarlaRackFX$(LIB_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
$(BINDIR)/CarlaPatchbay$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn.o $(LIBS) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking CarlaPatchbay$(LIB_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
$(BINDIR)/CarlaPatchbayFX$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-fx.o $(LIBS) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking CarlaPatchbayFX$(LIB_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(LINK_FLAGS) -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
$(OBJDIR)/carla-lv2.cpp.o: carla-lv2.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $<" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -c -o $@ | |||
$(OBJDIR)/carla-vst.cpp.rack-fx.o: carla-vst.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (RackFX)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -DCARLA_PLUGIN_PATCHBAY=0 -DCARLA_PLUGIN_SYNTH=0 -c -o $@ | |||
$(OBJDIR)/carla-vst.cpp.rack-syn.o: carla-vst.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (RackSynth)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -DCARLA_PLUGIN_PATCHBAY=0 -DCARLA_PLUGIN_SYNTH=1 -c -o $@ | |||
$(OBJDIR)/carla-vst.cpp.patchbay-fx.o: carla-vst.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (PatchbayFX)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=0 -c -o $@ | |||
$(OBJDIR)/carla-vst.cpp.patchbay-syn.o: carla-vst.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (PatchbaySynth)" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
$(BINDIR)/carla.lv2/manifest.ttl: $(OBJDIR)/carla-lv2-export.cpp.o $(LIBS) | |||
-@mkdir -p $(BINDIR)/carla.lv2 | |||
@echo "Linking carla-lv2-export$(APP_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) -o $(BINDIR)/carla-lv2-export$(APP_EXT) | |||
@echo "Generating LV2 ttl data" | |||
@cd $(BINDIR) && ./carla-lv2-export$(APP_EXT) | |||
@cd $(BINDIR)/carla.lv2 && ln -sf ../*bridge-* ../carla-discovery-* . | |||
$(BINDIR)/carla-lv2-export$(APP_EXT): $(OBJDIR)/carla-lv2-export.cpp.o $(LIBS) | |||
-@mkdir -p $(BINDIR) | |||
@echo "Linking carla-lv2-export$(APP_EXT)" | |||
@$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_FLAGS) -o $@ | |||
$(OBJDIR)/carla-lv2-export.cpp.o: carla-lv2-export.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $<" | |||
@$(CXX) $< $(BUILD_CXX_FLAGS) -MMD -c -o $@ | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
-include $(OBJDIR)/carla-lv2.cpp.d | |||
-include $(OBJDIR)/carla-lv2-export.cpp.d | |||
-include $(OBJDIR)/carla-vst.cpp.patchbay-fx.d | |||
-include $(OBJDIR)/carla-vst.cpp.patchbay-syn.d | |||
-include $(OBJDIR)/carla-vst.cpp.rack-fx.d | |||
-include $(OBJDIR)/carla-vst.cpp.rack-syn.d | |||
# ---------------------------------------------------------------------------------------------------------------------------- |
@@ -15,6 +15,14 @@ | |||
* For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||
*/ | |||
#ifndef CARLA_PLUGIN_PATCHBAY | |||
# error CARLA_PLUGIN_PATCHBAY undefined | |||
#endif | |||
#ifndef CARLA_PLUGIN_SYNTH | |||
# error CARLA_PLUGIN_SYNTH undefined | |||
#endif | |||
#define CARLA_NATIVE_PLUGIN_VST | |||
#include "carla-base.cpp" | |||
@@ -7,7 +7,7 @@ | |||
# -------------------------------------------------------------- | |||
BASE_FLAGS = -Wall -Wextra -Werror -pipe -DREAL_BUILD -DDEBUG -O0 -g | |||
BASE_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules | |||
BASE_FLAGS += -I. -I../backend -I../includes -I../modules -I../utils | |||
BASE_FLAGS += -Wcast-align -Wcast-qual -Wconversion -Wmissing-declarations -Wsign-conversion | |||
BASE_FLAGS += -Wformat -Wformat-security -Wredundant-decls -Wshadow -Wstrict-overflow -fstrict-overflow -Wundef -Wwrite-strings | |||
BASE_FLAGS += -Wpointer-arith -Wabi -Winit-self -Wuninitialized -Wunused-parameter | |||