|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- #!/usr/bin/make -f
- # Makefile for carla plugin exports #
- # --------------------------------- #
- # Created by falkTX
- #
-
- include ../Makefile.mk
-
- BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules
-
- # --------------------------------------------------------------
-
- ifeq ($(HAVE_AF_DEPS),true)
- BUILD_CXX_FLAGS += -DWANT_AUDIOFILE
- endif
-
- ifeq ($(HAVE_MF_DEPS),true)
- BUILD_CXX_FLAGS += -DWANT_MIDIFILE
- endif
-
- ifeq ($(HAVE_ZYN_DEPS),true)
- BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX
- endif
-
- # --------------------------------------------------------------
- # Common
-
- LINK_FLAGS += $(LIBLO_LIBS)
- LINK_FLAGS += $(QTCORE_LIBS)
- LINK_FLAGS += $(QTXML_LIBS)
- LINK_FLAGS += $(RTMEMPOOL_LIBS)
-
- # --------------------------------------------------------------
- # Engine
-
- LINK_FLAGS += $(JACKBRIDGE_LIBS)
-
- # --------------------------------------------------------------
- # Plugin
-
- ifeq ($(CARLA_PLUGIN_SUPPORT),true)
- LINK_FLAGS += $(LILV_LIBS)
- endif
-
- ifeq ($(HAVE_FLUIDSYNTH),true)
- LINK_FLAGS += $(FLUIDSYNTH_LIBS)
- endif
-
- # ifeq ($(HAVE_LINUXSAMPLER),true)
- # LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
- # ifeq ($(WIN32),true)
- # LINK_FLAGS += lrpcrt4
- # endif
- # endif
-
- # --------------------------------------------------------------
- # Coomon
-
- ifeq ($(HAVE_JUCE),true)
- LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
- LINK_FLAGS += $(JUCE_CORE_LIBS)
- LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
- LINK_FLAGS += $(JUCE_EVENTS_LIBS)
- LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
- LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
- endif
-
- ifeq ($(HAVE_OPENGL),true)
- LINK_FLAGS += $(DGL_LIBS)
- endif
-
- # --------------------------------------------------------------
- # Native
-
- ifeq ($(HAVE_AF_DEPS),true)
- LINK_FLAGS += $(shell pkg-config --libs sndfile)
- ifeq ($(HAVE_FFMPEG),true)
- LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
- endif
- endif
-
- ifeq ($(HAVE_MF_DEPS),true)
- LINK_FLAGS += $(shell pkg-config --libs smf)
- endif
-
- ifeq ($(HAVE_ZYN_DEPS),true)
- LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
- ifeq ($(HAVE_ZYN_UI_DEPS),true)
- LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
- endif
- endif
-
- # --------------------------------------------------------------
- # Libs
-
- LIBS += ../backend/carla_engine_plugin.a
- LIBS += ../backend/carla_plugin.a
-
- LIBS += ../modules/carla_native.a
- LIBS += ../modules/jackbridge.a
- LIBS += ../modules/rtmempool.a
-
- ifeq ($(CARLA_PLUGIN_SUPPORT),true)
- LIBS += ../modules/lilv.a
- endif
-
- ifeq ($(HAVE_JUCE),true)
- LIBS += ../modules/juce_audio_basics.a
- # LIBS += ../modules/juce_audio_devices.a
- LIBS += ../modules/juce_core.a
- LIBS += ../modules/juce_data_structures.a
- LIBS += ../modules/juce_events.a
- LIBS += ../modules/juce_graphics.a
- LIBS += ../modules/juce_gui_basics.a
- endif
-
- ifeq ($(HAVE_OPENGL),true)
- LIBS += ../modules/dgl.a
- endif
-
- # --------------------------------------------------------------
-
- ifeq ($(WIN32),true)
- TARGETS = carla-native-lv2-export.exe carla-native.lv2/carla-native.dll
- else
- ifeq ($(MACOS),true)
- TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.dylib
- else
- TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.so
- endif
- endif
-
- # --------------------------------------------------------------
-
- all: $(TARGETS)
-
- clean:
- $(RM) $(TARGETS) *.o
- $(RM) carla-native.lv2/*.*
-
- debug:
- $(MAKE) DEBUG=true
-
- # --------------------------------------------------------------
-
- carla-native-base.cpp.o: carla-native-base.cpp ../modules/CarlaNative.h
- $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
-
- carla-native-lv2.cpp.o: carla-native-lv2.cpp carla-native-base.cpp ../modules/CarlaNative.h
- $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
-
- carla-native-lv2-export.cpp.o: carla-native-lv2-export.cpp carla-native-base.cpp ../modules/CarlaNative.h
- $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
-
- # --------------------------------------------------------------
-
- carla-native-lv2-export: carla-native-lv2-export.cpp.o $(LIBS)
- $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
- ./carla-native-lv2-export
-
- carla-native-lv2-export.exe: carla-native-lv2-export.cpp.o $(LIBS)
- $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
- ./carla-native-lv2-export.exe
-
- # --------------------------------------------------------------
-
- carla-native.lv2/carla-native.dll: carla-native-lv2.cpp.o $(LIBS)
- $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
-
- carla-native.lv2/carla-native.dylib: carla-native-lv2.cpp.o $(LIBS)
- $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -dynamiclib $(LINK_FLAGS) -o $@
-
- carla-native.lv2/carla-native.so: carla-native-lv2.cpp.o $(LIBS)
- $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
-
- # --------------------------------------------------------------
-
- .FORCE:
- .PHONY: .FORCE
-
- ../backend/carla_engine_plugin.a: .FORCE
- $(MAKE) -C ../backend/engine ../carla_engine_plugin.a
-
- ../backend/carla_plugin.a: .FORCE
- $(MAKE) -C ../backend/plugin ../carla_plugin.a
-
- ../modules/%.a: .FORCE
- $(MAKE) -C ../modules $*
-
- # --------------------------------------------------------------
|