|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- #!/usr/bin/make -f
- # Makefile for carla-bridges-plugin #
- # --------------------------------- #
- # Created by falkTX
- #
-
- CWD=..
- MODULENAME=carla-bridge
- include $(CWD)/Makefile.mk
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- BINDIR := $(CWD)/../bin
-
- 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) -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)
-
- 32BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
- 64BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- LIBS_native = $(MODULEDIR)/jackbridge.a
- LIBS_posix32 = $(MODULEDIR)/jackbridge.posix32.a
- LIBS_posix64 = $(MODULEDIR)/jackbridge.posix64.a
- ifeq ($(BUILDING_FOR_WINDOWS),true)
- LIBS_win32 = $(MODULEDIR)/jackbridge.win32.a
- LIBS_win64 = $(MODULEDIR)/jackbridge.win64.a
- else
- LIBS_win32 = $(MODULEDIR)/jackbridge.win32e.a
- LIBS_win64 = $(MODULEDIR)/jackbridge.win64e.a
- endif
- LINK_FLAGS += $(JACKBRIDGE_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)
-
- LIBS_native += $(MODULEDIR)/water.a
- LIBS_posix32 += $(MODULEDIR)/water.posix32.a
- LIBS_posix64 += $(MODULEDIR)/water.posix64.a
- LIBS_win32 += $(MODULEDIR)/water.win32.a
- LIBS_win64 += $(MODULEDIR)/water.win64.a
- LINK_FLAGS += $(WATER_LIBS)
-
- LINK_FLAGS += $(LIBLO_LIBS)
- LINK_FLAGS += $(X11_LIBS)
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- NATIVE_BUILD_FLAGS = $(NATIVE_PLUGINS_FLAGS)
- NATIVE_LINK_FLAGS =
-
- NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
- NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
-
- NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS)
- NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
-
- NATIVE_LINK_FLAGS += $(FFMPEG_LIBS)
- NATIVE_LINK_FLAGS += $(MAGIC_LIBS)
- NATIVE_LINK_FLAGS += $(SNDFILE_LIBS)
-
- LIBS_native += $(MODULEDIR)/audio_decoder.a
- LIBS_native += $(MODULEDIR)/native-plugins.base.a
-
- ifeq ($(HAVE_DGL),true)
- LIBS_native += $(MODULEDIR)/dgl.a
- endif
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- OBJS_native = \
- $(OBJDIR)/CarlaBridgePlugin.cpp.o \
- $(OBJDIR)/CarlaEngine.cpp.o \
- $(OBJDIR)/CarlaEngineClient.cpp.o \
- $(OBJDIR)/CarlaEngineData.cpp.o \
- $(OBJDIR)/CarlaEngineInternal.cpp.o \
- $(OBJDIR)/CarlaEngineOsc.cpp.o \
- $(OBJDIR)/CarlaEngineOscSend.cpp.o \
- $(OBJDIR)/CarlaEnginePorts.cpp.o \
- $(OBJDIR)/CarlaEngineThread.cpp.o \
- $(OBJDIR)/CarlaEngineJack.cpp.o \
- $(OBJDIR)/CarlaEngineBridge.cpp.o \
- $(OBJDIR)/CarlaPlugin.cpp.o \
- $(OBJDIR)/CarlaPluginBridge.cpp.o \
- $(OBJDIR)/CarlaPluginInternal.cpp.o \
- $(OBJDIR)/CarlaPluginJack.cpp.o \
- $(OBJDIR)/CarlaPluginNative.cpp.o \
- $(OBJDIR)/CarlaPluginLADSPA.cpp.o \
- $(OBJDIR)/CarlaPluginDSSI.cpp.o \
- $(OBJDIR)/CarlaPluginLV2.cpp.o \
- $(OBJDIR)/CarlaPluginVST2.cpp.o \
- $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \
- $(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \
- $(OBJDIR)/CarlaStandalone.cpp.o
-
- OBJS_lv2 = $(OBJS_native) \
- $(OBJDIR)/CarlaBridgeSingleLV2.cpp.o
-
- 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)/CarlaPluginBridge.cpp.arch.o \
- $(OBJDIR)/CarlaPluginInternal.cpp.arch.o \
- $(OBJDIR)/CarlaPluginJack.cpp.arch.o \
- $(OBJDIR)/CarlaPluginLADSPA.cpp.arch.o \
- $(OBJDIR)/CarlaPluginDSSI.cpp.arch.o \
- $(OBJDIR)/CarlaPluginLV2.cpp.arch.o \
- $(OBJDIR)/CarlaPluginVST2.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)
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- all: native
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- clean:
- rm -f $(OBJDIR)/*.o
- rm -f $(BINDIR)/$(MODULENAME)-native
- rm -f $(BINDIR)/$(MODULENAME)-posix32
- rm -f $(BINDIR)/$(MODULENAME)-posix64
- rm -f $(BINDIR)/$(MODULENAME)-win*.exe
-
- debug:
- $(MAKE) DEBUG=true
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT) $(BINDIR)/$(MODULENAME)-lv2$(LIB_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)-lv2$(LIB_EXT): $(OBJS_lv2) $(LIBS_native)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2$(LIB_EXT)"
- @$(CXX) $(OBJS_lv2) $(LIBS_START) $(LIBS_native) $(LIBS_END) $(SHARED) $(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 $(MODULENAME)-win64.exe"
- @$(CXX) $(OBJS_win64) $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------
- # native
-
- ifeq ($(MACOS),true)
- $(OBJDIR)/CarlaPluginVST2.cpp.o: $(CWD)/backend/plugin/CarlaPluginVST2.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling CarlaPluginVST2.cpp (bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -ObjC++ -c -o $@
-
- $(OBJDIR)/CarlaStandalone.cpp.o: $(CWD)/backend/CarlaStandalone.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling CarlaStandalone.cpp (bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -ObjC++ -c -o $@
-
- $(OBJDIR)/CarlaBridgePlugin.cpp.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $<"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -ObjC++ -c -o $@
- else
- $(OBJDIR)/CarlaStandalone.cpp.o: $(CWD)/backend/CarlaStandalone.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling CarlaStandalone.cpp (bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
-
- $(OBJDIR)/CarlaBridgePlugin.cpp.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $<"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
- endif
-
- $(OBJDIR)/CarlaBridgeSingleLV2.cpp.o: CarlaBridgeSingleLV2.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $<"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
-
- $(OBJDIR)/CarlaPlug%.cpp.o: $(CWD)/backend/plugin/CarlaPlug%.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling CarlaPlug$*.cpp (bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
-
- $(OBJDIR)/CarlaEng%.cpp.o: $(CWD)/backend/engine/CarlaEng%.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling CarlaEng$*.cpp (bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------
- # posix32
-
- ifeq ($(MACOS),true)
- $(OBJDIR)/CarlaPluginVST2.cpp.posix32.o: $(CWD)/backend/plugin/CarlaPluginVST2.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling CarlaPluginVST2.cpp (posix32 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -ObjC++ -c -o $@
-
- $(OBJDIR)/CarlaBridgePlugin.cpp.posix32.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (posix32 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -ObjC++ -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) -ObjC++ -c -o $@
- else
- $(OBJDIR)/CarlaBridgePlugin.cpp.posix32.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (posix32 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -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) -c -o $@
- 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) -c -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) -c -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------
- # posix64
-
- ifeq ($(MACOS),true)
- $(OBJDIR)/CarlaPluginVST2.cpp.posix64.o: $(CWD)/backend/plugin/CarlaPluginVST2.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling CarlaPluginVST2.cpp (posix64 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -ObjC++ -c -o $@
-
- $(OBJDIR)/CarlaBridgePlugin.cpp.posix64.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (posix64 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -ObjC++ -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) -ObjC++ -c -o $@
- else
- $(OBJDIR)/CarlaBridgePlugin.cpp.posix64.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (posix64 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -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) -c -o $@
- 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) -c -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) -c -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------
- # win32
-
- $(OBJDIR)/CarlaBridgePlugin.cpp.win32.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (win32 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -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) -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) -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) -c -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------
- # win64
-
- $(OBJDIR)/CarlaBridgePlugin.cpp.win64.o: CarlaBridgePlugin.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (win64 bridge)"
- @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -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) -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) -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) -c -o $@
-
- # ----------------------------------------------------------------------------------------------------------------------
-
- -include $(OBJS_lv2:%.o=%.d)
- -include $(OBJS_posix32:%.o=%.d)
- -include $(OBJS_posix64:%.o=%.d)
- -include $(OBJS_win32:%.o=%.d)
- -include $(OBJS_win64:%.o=%.d)
-
- # ----------------------------------------------------------------------------------------------------------------------
|