From 1333307417be6f3c33e7081923de9c78142ad59f Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 10 Jun 2014 12:08:50 +0100 Subject: [PATCH] Continue makefile rework --- Makefile | 210 +++++++++++------- bin/resources | 1 + bin/styles | 1 + source/Makefile.mk | 7 + .../{standalone => }/CarlaStandalone.cpp | 0 source/backend/Makefile | 27 ++- source/backend/Makefile.mk | 9 +- source/backend/engine/CarlaEngineJack.cpp | 2 +- source/backend/plugin/Makefile | 3 +- source/backend/standalone/Makefile | 5 +- source/bridges/Makefile | 137 ++++-------- source/discovery/Makefile | 77 ++----- source/modules/Makefile | 134 +---------- 13 files changed, 238 insertions(+), 375 deletions(-) create mode 120000 bin/resources create mode 120000 bin/styles rename source/backend/{standalone => }/CarlaStandalone.cpp (100%) diff --git a/Makefile b/Makefile index 0850e372c..e629afd61 100644 --- a/Makefile +++ b/Makefile @@ -26,20 +26,11 @@ endif all: BIN RES UI WIDGETS # -------------------------------------------------------------- -# C++ code (native) +# Binaries (native) -.FORCE: -.PHONY: .FORCE +BIN: libs backend bridges discovery plugin theme -ALL_LIBS += source/modules/jackbridge.a -ALL_LIBS += source/modules/native-plugins.a -ALL_LIBS += source/modules/rtaudio.a -ALL_LIBS += source/modules/rtmempool.a -ALL_LIBS += source/modules/rtmidi.a - -ifeq ($(CARLA_PLUGIN_SUPPORT),true) -ALL_LIBS += source/modules/lilv.a -endif +# -------------------------------------------------------------- ifeq ($(HAVE_AF_DEPS),true) ALL_LIBS += source/modules/audio_decoder.a @@ -49,6 +40,8 @@ ifeq ($(HAVE_DGL),true) ALL_LIBS += source/modules/dgl.a endif +ALL_LIBS += source/modules/jackbridge.a + ifeq ($(HAVE_JUCE),true) ALL_LIBS += source/modules/juce_audio_basics.a ALL_LIBS += source/modules/juce_audio_devices.a @@ -62,81 +55,137 @@ ALL_LIBS += source/modules/juce_gui_basics.a ALL_LIBS += source/modules/juce_gui_extra.a endif -BIN = \ - bin/libcarla_standalone2.$(LIB_EXT) +ifeq ($(CARLA_PLUGIN_SUPPORT),true) +ALL_LIBS += source/modules/lilv.a +endif + +ALL_LIBS += source/modules/native-plugins.a +ALL_LIBS += source/modules/rtaudio.a +ALL_LIBS += source/modules/rtmempool.a +ALL_LIBS += source/modules/rtmidi.a + +ifeq ($(HAVE_QT4),true) +ALL_LIBS += source/modules/theme.qt4.a +endif + +ifeq ($(HAVE_QT5),true) +ALL_LIBS += source/modules/theme.qt5.a +endif -BIN: $(BIN) +libs: $(ALL_LIBS) source/modules/%.a: .FORCE $(MAKE) -C source/modules/$* ../$*.a -bin/libcarla_standalone2.$(LIB_EXT): .FORCE - $(MAKE) -C source/backend/standalone +source/modules/%.qt4.a: .FORCE + $(MAKE) -C source/modules/$* ../$*.qt4.a -# ifeq ($(WIN32),true) -# CXX += \ -# bin/carla-discovery-native.exe -# else -# CXX += \ -# bin/carla-discovery-native -# endif +source/modules/%.qt5.a: .FORCE + $(MAKE) -C source/modules/$* ../$*.qt5.a -# backend bridges discovery theme +# -------------------------------------------------------------- -# ifeq ($(HAVE_JUCE),true) -# CXX_TARGETS += plugin plugin_ui -# endif +backend: bin/libcarla_standalone2.$(LIB_EXT) -# backend: -# $(MAKE) -C source/backend -# -# bridges: -# $(MAKE) -C source/bridges -# -# discovery: -# $(MAKE) -C source/discovery -# -# plugin: -# $(MAKE) -C source/plugin -# -# plugin_ui: source/carla-plugin source/carla_config.py source/*.py RES UI WIDGETS -# $(LINK) $(CURDIR)/source/carla-plugin source/modules/native-plugins/resources/ -# $(LINK) $(CURDIR)/source/*.py source/modules/native-plugins/resources/ -# -# theme: -# $(MAKE) -C source/modules/theme +bin/libcarla_standalone2.$(LIB_EXT): libs .FORCE + $(MAKE) -C source/backend # -------------------------------------------------------------- -# C++ code (variants) -# posix32: -# $(MAKE) -C source/bridges posix32 -# $(MAKE) -C source/discovery posix32 -# -# posix64: -# $(MAKE) -C source/bridges posix64 -# $(MAKE) -C source/discovery posix64 -# -# win32: -# $(MAKE) -C source/bridges win32 -# $(MAKE) -C source/discovery win32 -# -# win64: -# $(MAKE) -C source/bridges win64 -# $(MAKE) -C source/discovery win64 -# -# wine32: -# $(MAKE) -C source/modules jackbridge-wine32 -# $(LINK) ../modules/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll -# -# wine64: -# $(MAKE) -C source/modules jackbridge-wine64 -# $(LINK) ../modules/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll +bridges: bin/carla-bridge-native$(APP_EXT) + +bin/carla-bridge-native$(APP_EXT): libs .FORCE + $(MAKE) -C source/bridges + +# -------------------------------------------------------------- + +discovery: bin/carla-discovery-native$(APP_EXT) + +bin/carla-discovery-native$(APP_EXT): libs .FORCE + $(MAKE) -C source/discovery + +# -------------------------------------------------------------- + +# FIXME +plugin: source/plugin/carla-native.lv2/carla-native.$(LIB_EXT) + +source/plugin/carla-native.lv2/carla-native.$(LIB_EXT): #libs .FORCE + $(MAKE) -C source/plugin + +# -------------------------------------------------------------- + +theme: bin/styles/carlastyle.$(LIB_EXT) + +bin/styles/carlastyle.$(LIB_EXT): libs .FORCE + $(MAKE) -C source/modules/theme + +# -------------------------------------------------------------- +# Binaries (variants) + +posix32: + $(MAKE) -C source/bridges posix32 + $(MAKE) -C source/discovery posix32 + +posix64: + $(MAKE) -C source/bridges posix64 + $(MAKE) -C source/discovery posix64 + +win32: + $(MAKE) -C source/bridges win32 + $(MAKE) -C source/discovery win32 + +win64: + $(MAKE) -C source/bridges win64 + $(MAKE) -C source/discovery win64 + +wine32: + $(MAKE) -C source/modules jackbridge-wine32 + $(LINK) source/modules/jackbridge-win32.dll.so source/bridges/jackbridge-win32.dll + +wine64: + $(MAKE) -C source/modules jackbridge-wine64 + $(LINK) source/modules/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll # -------------------------------------------------------------- # Resources RES = \ + bin/resources/carla-plugin \ + bin/resources/carla_backend.py \ + bin/resources/carla_config.py \ + bin/resources/carla_database.py \ + bin/resources/carla_host.py \ + bin/resources/carla_rack.py \ + bin/resources/carla_settings.py \ + bin/resources/carla_skin.py \ + bin/resources/carla_shared.py \ + bin/resources/carla_style.py \ + bin/resources/carla_widgets.py \ + bin/resources/canvaspreviewframe.py \ + bin/resources/digitalpeakmeter.py \ + bin/resources/externalui.py \ + bin/resources/ledbutton.py \ + bin/resources/paramspinbox.py \ + bin/resources/patchcanvas.py \ + bin/resources/patchcanvas_theme.py \ + bin/resources/pixmapbutton.py \ + bin/resources/pixmapdial.py \ + bin/resources/pixmapkeyboard.py \ + bin/resources/resources_rc.py \ + bin/resources/ui_carla_about.py \ + bin/resources/ui_carla_database.py \ + bin/resources/ui_carla_edit.py \ + bin/resources/ui_carla_host.py \ + bin/resources/ui_carla_parameter.py \ + bin/resources/ui_carla_plugin_basic_fx.py \ + bin/resources/ui_carla_plugin_calf.py \ + bin/resources/ui_carla_plugin_default.py \ + bin/resources/ui_carla_plugin_zita.py \ + bin/resources/ui_carla_plugin_zynfx.py \ + bin/resources/ui_carla_refresh.py \ + bin/resources/ui_carla_settings.py \ + bin/resources/ui_carla_settings_driver.py \ + bin/resources/ui_inputdialog_value.py \ source/carla_config.py \ source/resources_rc.py @@ -153,6 +202,12 @@ endif source/resources_rc.py: resources/resources.qrc resources/*/*.png resources/*/*.svg $(PYRCC) $< -o $@ +bin/resources/carla-plugin: source/carla-plugin + $(LINK) $(CURDIR)/source/carla-plugin bin/resources/ + +bin/resources/%.py: source/%.py + $(LINK) $(CURDIR)/source/$*.py bin/resources/ + # -------------------------------------------------------------- # UI code @@ -199,11 +254,11 @@ source/%.py: source/widgets/%.py # -------------------------------------------------------------- clean: -# $(MAKE) clean -C source/backend -# $(MAKE) clean -C source/bridges -# $(MAKE) clean -C source/discovery -# $(MAKE) clean -C source/modules -# $(MAKE) clean -C source/plugin + $(MAKE) clean -C source/backend + $(MAKE) clean -C source/bridges + $(MAKE) clean -C source/discovery + $(MAKE) clean -C source/modules + $(MAKE) clean -C source/plugin rm -f $(RES) rm -f $(UIs) rm -f $(WIDGETS) @@ -572,3 +627,8 @@ else endif # -------------------------------------------------------------- + +.FORCE: +.PHONY: .FORCE + +# -------------------------------------------------------------- diff --git a/bin/resources b/bin/resources new file mode 120000 index 000000000..cfdc59523 --- /dev/null +++ b/bin/resources @@ -0,0 +1 @@ +../source/modules/native-plugins/resources/ \ No newline at end of file diff --git a/bin/styles b/bin/styles new file mode 120000 index 000000000..9bd365900 --- /dev/null +++ b/bin/styles @@ -0,0 +1 @@ +../source/modules/theme/styles/ \ No newline at end of file diff --git a/source/Makefile.mk b/source/Makefile.mk index af1ec9053..6b2f9106c 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -441,6 +441,13 @@ endif endif endif +# -------------------------------------------------------------- +# Set app extension + +ifeq ($(WIN32),true) +APP_EXT = .exe +endif + # -------------------------------------------------------------- # Set shared lib extension diff --git a/source/backend/standalone/CarlaStandalone.cpp b/source/backend/CarlaStandalone.cpp similarity index 100% rename from source/backend/standalone/CarlaStandalone.cpp rename to source/backend/CarlaStandalone.cpp diff --git a/source/backend/Makefile b/source/backend/Makefile index 5522a3661..e646aae96 100644 --- a/source/backend/Makefile +++ b/source/backend/Makefile @@ -4,7 +4,8 @@ # Created by falkTX # -include ../Makefile.mk +CWD=.. +include Makefile.mk # -------------------------------------------------------------- @@ -54,6 +55,10 @@ STANDALONE_FLAGS += $(RTAUDIO_LIBS) STANDALONE_FLAGS += $(RTMEMPOOL_LIBS) STANDALONE_FLAGS += $(RTMIDI_LIBS) +ifeq ($(CARLA_PLUGIN_SUPPORT),true) +STANDALONE_FLAGS += $(LILV_LIBS) +endif + ifeq ($(HAVE_CSOUND),true) STANDALONE_FLAGS += $(CSOUND_LIBS) endif @@ -66,10 +71,6 @@ ifeq ($(HAVE_LINUXSAMPLER),true) STANDALONE_FLAGS += $(LINUXSAMPLER_LIBS) endif -ifeq ($(CARLA_PLUGIN_SUPPORT),true) -STANDALONE_FLAGS += $(LILV_LIBS) -endif - ifeq ($(HAVE_JUCE),true) STANDALONE_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) STANDALONE_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS) @@ -85,6 +86,9 @@ endif # -------------------------------------------------------------- +OBJS = \ + CarlaStandalone.cpp.o + TARGETS = \ ../../bin/libcarla_standalone.$(LIB_EXT) @@ -95,10 +99,10 @@ all: $(TARGETS) # -------------------------------------------------------------- clean: - $(MAKE) clean -C control + $(RM) $(OBJS) + $(RM) $(TARGETS) $(MAKE) clean -C engine $(MAKE) clean -C plugin - $(MAKE) clean -C standalone debug: $(MAKE) DEBUG=true @@ -108,8 +112,13 @@ doxygen: CarlaBackend.doxygen # -------------------------------------------------------------- -../../bin/libcarla_standalone.$(LIB_EXT): standalone/CarlaStandalone.cpp.o $(STANDALONE_LIBS) - $(CXX) standalone/CarlaStandalone.cpp.o $(LIBS_START) $(STANDALONE_LIBS) $(LIBS_END) $(LINK_FLAGS) $(STANDALONE_FLAGS) $(SHARED) -o $@ +CarlaStandalone.cpp.o: CarlaStandalone.cpp $(CARLA_STANDALONE_CPP_DEPS) + $(CXX) $< $(BUILD_CXX_FLAGS) $(QTCORE_FLAGS) -c -o $@ + +# -------------------------------------------------------------- + +../../bin/libcarla_standalone.$(LIB_EXT): $(OBJS) $(STANDALONE_LIBS) + $(CXX) $< $(LIBS_START) $(STANDALONE_LIBS) $(LIBS_END) $(LINK_FLAGS) $(STANDALONE_FLAGS) $(SHARED) -o $@ # -------------------------------------------------------------- diff --git a/source/backend/Makefile.mk b/source/backend/Makefile.mk index 8631a4c15..d30297275 100644 --- a/source/backend/Makefile.mk +++ b/source/backend/Makefile.mk @@ -4,13 +4,16 @@ # Created by falkTX # +ifeq ($(CWD),) CWD=../.. -include ../../Makefile.deps -include ../../Makefile.mk +endif + +include $(CWD)/Makefile.deps +include $(CWD)/Makefile.mk # ---------------------------------------------------------------------------------------------------------------------------- -BUILD_CXX_FLAGS += -I. -I.. -I../../includes -I../../utils -isystem ../../modules +BUILD_CXX_FLAGS += -I. -I.. -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules BUILD_CXX_FLAGS += $(LIBLO_FLAGS) # ---------------------------------------------------------------------------------------------------------------------------- diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp index c65f86771..7b0cdade4 100644 --- a/source/backend/engine/CarlaEngineJack.cpp +++ b/source/backend/engine/CarlaEngineJack.cpp @@ -1975,7 +1975,6 @@ private: jackbridge_free(ports); } } -#endif void addPatchbayJackPort(const uint groupId, const jack_port_t* const jackPort, const char* const shortPortName, const char* const fullPortName, const int jackPortFlags) { @@ -2016,6 +2015,7 @@ private: return; // unused (void)portIsOSC; } +#endif // ------------------------------------------------------------------- diff --git a/source/backend/plugin/Makefile b/source/backend/plugin/Makefile index f524ecdea..c7212f9ec 100644 --- a/source/backend/plugin/Makefile +++ b/source/backend/plugin/Makefile @@ -37,7 +37,8 @@ all: $(TARGETS) # -------------------------------------------------------------- clean: - $(RM) $(OBJS) $(TARGETS) + $(RM) $(OBJS) + $(RM) $(TARGETS) debug: $(MAKE) DEBUG=true diff --git a/source/backend/standalone/Makefile b/source/backend/standalone/Makefile index d1df28aab..28b059af4 100644 --- a/source/backend/standalone/Makefile +++ b/source/backend/standalone/Makefile @@ -8,9 +8,6 @@ include ../Makefile.mk # -------------------------------------------------------------- -OBJS = \ - CarlaStandalone.cpp.o - TARGETS = \ ../carla_standalone.a @@ -36,6 +33,6 @@ debug: # -------------------------------------------------------------- CarlaStandalone.cpp.o: CarlaStandalone.cpp $(CARLA_STANDALONE_CPP_DEPS) - $(CXX) $< $(BUILD_CXX_FLAGS) $(QTCORE_FLAGS) $(LIBLO_FLAGS) -c -o $@ + $(CXX) $< $(BUILD_CXX_FLAGS) $(QTCORE_FLAGS) -c -o $@ # -------------------------------------------------------------- diff --git a/source/bridges/Makefile b/source/bridges/Makefile index 407941723..534134c3d 100644 --- a/source/bridges/Makefile +++ b/source/bridges/Makefile @@ -210,19 +210,19 @@ endif # CARLA_PLUGIN_SUPPORT all: $(TARGETS) -ui_lv2-gtk2: carla-bridge-lv2-gtk2 -ui_lv2-gtk3: carla-bridge-lv2-gtk3 -ui_lv2-qt4: carla-bridge-lv2-qt4 -ui_lv2-qt5: carla-bridge-lv2-qt5 +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-cocoa: carla-bridge-lv2-cocoa -ui_lv2-windows: carla-bridge-lv2-windows.exe -ui_lv2-x11: carla-bridge-lv2-x11 +ui_lv2-cocoa: ../../bin/carla-bridge-lv2-cocoa +ui_lv2-windows: ../../bin/carla-bridge-lv2-windows.exe +ui_lv2-x11: ../../bin/carla-bridge-lv2-x11 -ui_vst-carbon: carla-bridge-vst-carbon -ui_vst-cocoa: carla-bridge-vst-cocoa -ui_vst-hwnd: carla-bridge-vst-hwnd.exe -ui_vst-x11: carla-bridge-vst-x11 +ui_vst-carbon: ../../bin/carla-bridge-vst-carbon +ui_vst-cocoa: ../../bin/carla-bridge-vst-cocoa +ui_vst-hwnd: ../../bin/carla-bridge-vst-hwnd.exe +ui_vst-x11: ../../bin/carla-bridge-vst-x11 # -------------------------------------------------------------- @@ -230,11 +230,11 @@ jackplugin: jackplugin/libjack.so.0 # -------------------------------------------------------------- -native: carla-bridge-native -posix32: carla-bridge-posix32 -posix64: carla-bridge-posix64 -win32: carla-bridge-win32.exe -win64: carla-bridge-win64.exe +native: ../../bin/carla-bridge-native$(APP_EXT) +posix32: ../../bin/carla-bridge-posix32 +posix64: ../../bin/carla-bridge-posix64 +win32: ../../bin/carla-bridge-win32.exe +win64: ../../bin/carla-bridge-win64.exe # -------------------------------------------------------------- # UI common @@ -269,7 +269,7 @@ OBJS_UI_LV2_GTK2 = CarlaBridgeUI-LV2__lv2-gtk2.o \ CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk2.o -carla-bridge-lv2-gtk2: $(OBJS_UI_LV2_GTK2) $(OBJS_UI_LV2_LIBS) +../../bin/carla-bridge-lv2-gtk2: $(OBJS_UI_LV2_GTK2) $(OBJS_UI_LV2_LIBS) $(CXX) $^ $(LINK_UI_LV2_GTK2_FLAGS) -o $@ %__lv2-gtk2.o: %.cpp @@ -282,7 +282,7 @@ OBJS_UI_LV2_GTK3 = CarlaBridgeUI-LV2__lv2-gtk3.o \ CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk3.o -carla-bridge-lv2-gtk3: $(OBJS_UI_LV2_GTK3) $(OBJS_UI_LV2_LIBS) +../../bin/carla-bridge-lv2-gtk3: $(OBJS_UI_LV2_GTK3) $(OBJS_UI_LV2_LIBS) $(CXX) $^ $(LINK_UI_LV2_GTK3_FLAGS) -o $@ %__lv2-gtk3.o: %.cpp @@ -295,7 +295,7 @@ OBJS_UI_LV2_QT4 = CarlaBridgeUI-LV2__lv2-qt4.o \ CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt4.o -carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt4.a +../../bin/carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt4.a $(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@ %__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt4.moc resources.qt4.cpp @@ -308,7 +308,7 @@ OBJS_UI_LV2_QT5 = CarlaBridgeUI-LV2__lv2-qt5.o \ CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt5.o -carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt5.a +../../bin/carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt5.a $(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@ %__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt5.moc resources.qt5.cpp @@ -321,7 +321,7 @@ carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-cocoa.o # -# carla-bridge-lv2-cocoa: $(OBJS_UI_LV2_COCOA) $(OBJS_UI_LV2_LIBS) +# ../../bin/carla-bridge-lv2-cocoa: $(OBJS_UI_LV2_COCOA) $(OBJS_UI_LV2_LIBS) # $(CXX) $^ $(LINK_UI_LV2_COCOA_FLAGS) -o $@ # # %__lv2-cocoa.o: %.cpp @@ -334,7 +334,7 @@ carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-windows.o # -# carla-bridge-lv2-windows.exe: $(OBJS_UI_LV2_WIN32) $(OBJS_UI_LV2_LIBS) +# ../../bin/carla-bridge-lv2-windows.exe: $(OBJS_UI_LV2_WIN32) $(OBJS_UI_LV2_LIBS) # $(CXX) $^ $(LINK_UI_LV2_WIN32_FLAGS) -o $@ # # %__lv2-windows.o: %.cpp @@ -347,7 +347,7 @@ carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \ # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-x11.o # -# carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS) +# ../../bin/carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS) # $(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@ # # %__lv2-x11.o: %.cpp @@ -360,7 +360,7 @@ carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \ # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-mac.o # -# carla-bridge-vst-mac: $(OBJS_UI_VST_MAC) $(OBJS_UI_VST_LIBS) ../modules/theme.a +# ../../bin/carla-bridge-vst-mac: $(OBJS_UI_VST_MAC) $(OBJS_UI_VST_LIBS) ../modules/theme.a # $(CXX) $^ $(LINK_UI_VST_MAC_FLAGS) -o $@ # # %__vst-mac.o: %.cpp @@ -373,7 +373,7 @@ carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \ # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-hwnd.o # -# carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) $(OBJS_UI_VST_LIBS) ../modules/theme.a +# ../../bin/carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) $(OBJS_UI_VST_LIBS) ../modules/theme.a # $(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@ # # %__vst-hwnd.o: %.cpp @@ -386,7 +386,7 @@ carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \ # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-x11.o # -# carla-bridge-vst-x11: $(OBJS_UI_VST_X11) $(OBJS_UI_VST_LIBS) ../modules/theme.a +# ../../bin/carla-bridge-vst-x11: $(OBJS_UI_VST_X11) $(OBJS_UI_VST_LIBS) ../modules/theme.a # $(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@ # # %__vst-x11.o: %.cpp @@ -421,7 +421,7 @@ OBJS_PLUGIN = \ ../backend/plugin/JucePlugin__native.o \ ../backend/plugin/FluidSynthPlugin__native.o \ ../backend/plugin/LinuxSamplerPlugin__native.o \ - ../backend/standalone/CarlaStandalone__native.o + ../standalone/CarlaStandalone__native.o LIBS_PLUGIN = \ ../modules/jackbridge.a \ @@ -489,7 +489,7 @@ OBJS_NATIVE += \ # carla-standalone OBJS_NATIVE += \ - ../backend/standalone/CarlaStandalone__native.o + ../backend/CarlaStandalone__native.o # libs LIBS_NATIVE = \ @@ -525,12 +525,8 @@ LIBS_NATIVE += \ ../modules/lilv.a endif -carla-bridge-native: $(OBJS_NATIVE) $(LIBS_NATIVE) -ifeq ($(MACOS),true) - $(CXX) $(OBJS_NATIVE) $(LIBS_NATIVE) $(NATIVE_LINK_FLAGS) -o $@ -else +../../bin/carla-bridge-native: $(OBJS_NATIVE) $(LIBS_NATIVE) $(CXX) $(OBJS_NATIVE) -Wl,--start-group $(LIBS_NATIVE) -Wl,--end-group $(NATIVE_LINK_FLAGS) -o $@ -endif %__native.o: %.cpp $(CXX) $< $(NATIVE_BUILD_FLAGS) -c -o $@ @@ -571,7 +567,7 @@ OBJS_POSIX32 += \ # carla-standalone OBJS_POSIX32 += \ - ../backend/standalone/CarlaStandalone__posix32.o + ../standalone/CarlaStandalone__posix32.o # libs LIBS_POSIX32 = \ @@ -589,7 +585,7 @@ LIBS_POSIX32 += \ ../modules/juce_gui_basics.posix32.a endif -carla-bridge-posix32: $(OBJS_POSIX32) $(LIBS_POSIX32) +../../bin/carla-bridge-posix32: $(OBJS_POSIX32) $(LIBS_POSIX32) $(CXX) $(OBJS_POSIX32) -Wl,--start-group $(LIBS_POSIX32) -Wl,--end-group $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@ %__posix32.o: %.cpp @@ -631,7 +627,7 @@ OBJS_POSIX64 += \ # carla-standalone OBJS_POSIX64 += \ - ../backend/standalone/CarlaStandalone__posix64.o + ../standalone/CarlaStandalone__posix64.o # libs LIBS_POSIX64 = \ @@ -649,7 +645,7 @@ LIBS_POSIX64 += \ ../modules/juce_gui_basics.posix64.a endif -carla-bridge-posix64: $(OBJS_POSIX64) $(LIBS_POSIX64) +../../bin/carla-bridge-posix64: $(OBJS_POSIX64) $(LIBS_POSIX64) $(CXX) $(OBJS_POSIX64) -Wl,--start-group $(LIBS_POSIX64) -Wl,--end-group $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@ %__posix64.o: %.cpp @@ -691,7 +687,7 @@ OBJS_WIN32 += \ # carla-standalone OBJS_WIN32 += \ - ../backend/standalone/CarlaStandalone__win32.o + ../standalone/CarlaStandalone__win32.o # libs LIBS_WIN32 = \ @@ -709,7 +705,7 @@ LIBS_WIN32 += \ ../modules/juce_gui_basics.win32.a endif -carla-bridge-win32.exe: $(OBJS_WIN32) $(LIBS_WIN32) ../modules/jackbridge-win32.dll +../../bin/carla-bridge-win32.exe: $(OBJS_WIN32) $(LIBS_WIN32) ../modules/jackbridge-win32.dll $(CXX) $(OBJS_WIN32) -Wl,--start-group $(LIBS_WIN32) -Wl,--end-group $(WIN_LINK_FLAGS) $(WIN_32BIT_FLAGS) -ljackbridge-win32 -o $@ %__win32.o: %.cpp @@ -751,7 +747,7 @@ OBJS_WIN64 += \ # carla-standalone OBJS_WIN64 += \ - ../backend/standalone/CarlaStandalone__win64.o + ../standalone/CarlaStandalone__win64.o # libs LIBS_WIN64 = \ @@ -769,7 +765,7 @@ LIBS_WIN64 += \ ../modules/juce_gui_basics.win64.a endif -carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64) ../modules/jackbridge-win64.dll +../../bin/carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64) ../modules/jackbridge-win64.dll $(CXX) $(OBJS_WIN64) -Wl,--start-group $(LIBS_WIN64) -Wl,--end-group $(WIN_LINK_FLAGS) $(WIN_64BIT_FLAGS) -ljackbridge-win64 -o $@ %__win64.o: %.cpp @@ -778,16 +774,14 @@ carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64) ../modules/jackbridge-win64. # -------------------------------------------------------------- clean: - rm -f *.moc *.o *.dll *.dylib *.so *.exe - rm -f resources.*.cpp - rm -f carla-bridge-lv2-gtk2 carla-bridge-lv2-gtk3 carla-bridge-lv2-qt4 carla-bridge-lv2-qt5 carla-bridge-lv2-cocoa carla-bridge-lv2-x11 - rm -f carla-bridge-vst-carbon carla-bridge-vst-cocoa carla-bridge-vst-x11 - rm -f carla-bridge-native carla-bridge-posix32 carla-bridge-posix64 - rm -f $(OBJS_NATIVE) - rm -f $(OBJS_POSIX32) - rm -f $(OBJS_POSIX64) - rm -f $(OBJS_WIN32) - rm -f $(OBJS_WIN64) + $(RM) *.moc *.o *.dll *.dylib *.so *.exe + $(RM) resources.*.cpp + $(RM) ../../bin/carla-bridge-* + $(RM) $(OBJS_NATIVE) + $(RM) $(OBJS_POSIX32) + $(RM) $(OBJS_POSIX64) + $(RM) $(OBJS_WIN32) + $(RM) $(OBJS_WIN64) debug: $(MAKE) DEBUG=true @@ -796,44 +790,3 @@ doxygen: carla_bridge.doxygen doxygen $< # -------------------------------------------------------------- - -.FORCE: -.PHONY: .FORCE - -../modules/jackbridge-%.dll: .FORCE - $(MAKE) -C ../modules jackbridge-$*e - -../modules/juce_audio_basics.%.a: .FORCE - $(MAKE) -C ../modules juce_audio_basics_$* - -../modules/juce_audio_processors.%.a: .FORCE - $(MAKE) -C ../modules juce_audio_processors_$* - -../modules/juce_core.%.a: .FORCE - $(MAKE) -C ../modules juce_core_$* - -../modules/juce_data_structures.%.a: .FORCE - $(MAKE) -C ../modules juce_data_structures_$* - -../modules/juce_events.%.a: .FORCE - $(MAKE) -C ../modules juce_events_$* - -../modules/juce_graphics.%.a: .FORCE - $(MAKE) -C ../modules juce_graphics_$* - -../modules/juce_gui_basics.%.a: .FORCE - $(MAKE) -C ../modules juce_gui_basics_$* - -../modules/lilv.%.a: .FORCE - $(MAKE) -C ../modules lilv_$* - -../modules/rtmempool.%.a: .FORCE - $(MAKE) -C ../modules rtmempool_$* - -../modules/%.a: .FORCE - $(MAKE) -C ../modules $* - -../modules/%.dll: - $(MAKE) -C ../modules $* - -# -------------------------------------------------------------- diff --git a/source/discovery/Makefile b/source/discovery/Makefile index f16624f62..6af87a22e 100644 --- a/source/discovery/Makefile +++ b/source/discovery/Makefile @@ -147,79 +147,38 @@ OBJS = carla-discovery.cpp # -------------------------------------------------------------- -ifeq ($(WIN32),true) -all: ../../../bin/carla-discovery-native.exe -else -all: ../../../bin/carla-discovery-native -endif - -posix32: carla-discovery-posix32 -posix64: carla-discovery-posix64 -win32: carla-discovery-win32.exe -win64: carla-discovery-win64.exe +all: ../../bin/carla-discovery-native$(APP_EXT) +posix32: ../../carla-discovery-posix32 +posix64: ../../carla-discovery-posix64 +win32: ../../carla-discovery-win32.exe +win64: ../../carla-discovery-win64.exe # -------------------------------------------------------------- -../../../bin/carla-discovery-native: $(OBJS) $(DEPS) $(LIBS) -ifeq ($(MACOS),true) - $(CXX) $< $(LIBS) $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@ -else - $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@ -endif +../../bin/carla-discovery-native: $(OBJS) $(DEPS) $(LIBS) + $(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@ -carla-discovery-native.exe: $(OBJS) $(DEPS) $(LIBS) - $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(WIN_BUILD_FLAGS) $(NATIVE_FLAGS) $(WIN_LINK_FLAGS) -o $@ +../../bin/carla-discovery-native.exe: $(OBJS) $(DEPS) $(LIBS) + $(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(WIN_BUILD_FLAGS) $(NATIVE_FLAGS) $(WIN_LINK_FLAGS) -o $@ -carla-discovery-posix32: $(OBJS) $(DEPS) $(LIBS_posix32) - $(CXX) $< -Wl,--start-group $(LIBS_posix32) -Wl,--end-group $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@ +../../carla-discovery-posix32: $(OBJS) $(DEPS) $(LIBS_posix32) + $(CXX) $< $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@ -carla-discovery-posix64: $(OBJS) $(DEPS) $(LIBS_posix64) - $(CXX) $< -Wl,--start-group $(LIBS_posix64) -Wl,--end-group $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@ +../../carla-discovery-posix64: $(OBJS) $(DEPS) $(LIBS_posix64) + $(CXX) $< $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@ -carla-discovery-win32.exe: $(OBJS) $(DEPS) $(LIBS_win32) - $(CXX) $< -Wl,--start-group $(LIBS_win32) -Wl,--end-group $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@ +../../carla-discovery-win32.exe: $(OBJS) $(DEPS) $(LIBS_win32) + $(CXX) $< $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@ -carla-discovery-win64.exe: $(OBJS) $(DEPS) $(LIBS_win64) - $(CXX) $< -Wl,--start-group $(LIBS_win64) -Wl,--end-group $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@ +../../carla-discovery-win64.exe: $(OBJS) $(DEPS) $(LIBS_win64) + $(CXX) $< $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@ # -------------------------------------------------------------- clean: - rm -f carla-discovery-* + $(RM) ../../bin/carla-discovery-* debug: $(MAKE) DEBUG=true # -------------------------------------------------------------- - -.FORCE: -.PHONY: .FORCE - -../modules/juce_audio_basics.%.a: .FORCE - $(MAKE) -C ../modules juce_audio_basics_$* - -../modules/juce_audio_processors.%.a: .FORCE - $(MAKE) -C ../modules juce_audio_processors_$* - -../modules/juce_core.%.a: .FORCE - $(MAKE) -C ../modules juce_core_$* - -../modules/juce_data_structures.%.a: .FORCE - $(MAKE) -C ../modules juce_data_structures_$* - -../modules/juce_events.%.a: .FORCE - $(MAKE) -C ../modules juce_events_$* - -../modules/juce_graphics.%.a: .FORCE - $(MAKE) -C ../modules juce_graphics_$* - -../modules/juce_gui_basics.%.a: .FORCE - $(MAKE) -C ../modules juce_gui_basics_$* - -../modules/lilv.%.a: .FORCE - $(MAKE) -C ../modules lilv_$* - -../modules/%.a: .FORCE - $(MAKE) -C ../modules $* - -# -------------------------------------------------------------- diff --git a/source/modules/Makefile b/source/modules/Makefile index 5f3ccb61d..a0ef008c3 100644 --- a/source/modules/Makefile +++ b/source/modules/Makefile @@ -8,123 +8,6 @@ all: # -------------------------------------------------------------- -juce_audio_basics: - $(MAKE) -C juce_audio_basics - -juce_audio_basics_%: - $(MAKE) -C juce_audio_basics $* - -# -------------------------------------------------------------- - -juce_audio_devices: - $(MAKE) -C juce_audio_devices - -juce_audio_devices_%: - $(MAKE) -C juce_audio_devices $* - -# -------------------------------------------------------------- - -juce_audio_formats: - $(MAKE) -C juce_audio_formats - -juce_audio_formats_%: - $(MAKE) -C juce_audio_formats $* - -# -------------------------------------------------------------- - -juce_audio_processors: - $(MAKE) -C juce_audio_processors - -juce_audio_processors_%: - $(MAKE) -C juce_audio_processors $* - -# -------------------------------------------------------------- - -juce_core: - $(MAKE) -C juce_core - -juce_core_%: - $(MAKE) -C juce_core $* - -# -------------------------------------------------------------- - -juce_data_structures: - $(MAKE) -C juce_data_structures - -juce_data_structures_%: - $(MAKE) -C juce_data_structures $* - -# -------------------------------------------------------------- - -juce_events: - $(MAKE) -C juce_events - -juce_events_%: - $(MAKE) -C juce_events $* - -# -------------------------------------------------------------- - -juce_graphics: - $(MAKE) -C juce_graphics - -juce_graphics_%: - $(MAKE) -C juce_graphics $* - -# -------------------------------------------------------------- - -juce_gui_basics: - $(MAKE) -C juce_gui_basics - -juce_gui_basics_%: - $(MAKE) -C juce_gui_basics $* - -# -------------------------------------------------------------- - -juce_gui_extra: - $(MAKE) -C juce_gui_extra - -juce_gui_extra_%: - $(MAKE) -C juce_gui_extra $* - -# -------------------------------------------------------------- - -lilv: - $(MAKE) -C lilv - -lilv_%: - $(MAKE) -C lilv $* - -# -------------------------------------------------------------- - -native-plugins: - $(MAKE) -C native-plugins - -# -------------------------------------------------------------- - -rtaudio: - $(MAKE) -C rtaudio - -rtmidi: - $(MAKE) -C rtmidi - -# -------------------------------------------------------------- - -rtmempool: - $(MAKE) -C rtmempool - -rtmempool_%: - $(MAKE) -C rtmempool $* - -# -------------------------------------------------------------- - -stk: - $(MAKE) -C stk - -stk_%: - $(MAKE) -C stk $* - -# -------------------------------------------------------------- - theme: $(MAKE) -C theme @@ -175,21 +58,9 @@ jackbridge-wine64: # -------------------------------------------------------------- -lib%.dll: - $(MAKE) -C $* ../lib$*.dll - -lib%.dylib: - $(MAKE) -C $* ../lib$*.dylib - -lib%.so: - $(MAKE) -C $* ../lib$*.so - -# -------------------------------------------------------------- - clean: rm -f *.a *.def *.dll *.dylib *.so $(MAKE) clean -C audio_decoder - $(MAKE) clean -C native-plugins $(MAKE) clean -C dgl $(MAKE) clean -C jackbridge $(MAKE) clean -C juce_audio_basics @@ -203,16 +74,17 @@ clean: $(MAKE) clean -C juce_gui_basics $(MAKE) clean -C juce_gui_extra $(MAKE) clean -C lilv + $(MAKE) clean -C native-plugins $(MAKE) clean -C rtaudio - $(MAKE) clean -C rtmidi $(MAKE) clean -C rtmempool + $(MAKE) clean -C rtmidi $(MAKE) clean -C stk $(MAKE) clean -C theme # -------------------------------------------------------------- .PHONY: \ - audio_decoder dgl jackbridge lilv native-plugins rtaudio rtmidi rtmempool stk theme \ + audio_decoder dgl jackbridge lilv native-plugins rtaudio rtmempool rtmidi stk theme \ juce_audio_basics juce_audio_devices juce_audio_formats juce_audio_processors juce_core juce_data_structures juce_events juce_graphics juce_gui_basics juce_gui_extra # --------------------------------------------------------------