Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 4.2KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. #!/usr/bin/make -f
  2. # Makefile for carla plugin exports #
  3. # --------------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. BUILD_CXX_FLAGS += -I../includes -I../modules -I../utils
  8. # --------------------------------------------------------------
  9. ifeq ($(HAVE_OPENGL),true)
  10. BUILD_CXX_FLAGS += -DWANT_OPENGL
  11. endif
  12. ifeq ($(HAVE_AF_DEPS),true)
  13. BUILD_CXX_FLAGS += -DWANT_AUDIOFILE
  14. endif
  15. ifeq ($(HAVE_MF_DEPS),true)
  16. BUILD_CXX_FLAGS += -DWANT_MIDIFILE
  17. endif
  18. ifeq ($(HAVE_ZYN_DEPS),true)
  19. BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX
  20. endif
  21. # --------------------------------------------------------------
  22. # Common
  23. # LINK_FLAGS += $(shell pkg-config --libs liblo)
  24. # --------------------------------------------------------------
  25. # Plugin
  26. # ifeq ($(HAVE_FLUIDSYNTH),true)
  27. # LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
  28. # endif
  29. #
  30. # ifeq ($(HAVE_LINUXSAMPLER),true)
  31. # LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
  32. # endif
  33. # --------------------------------------------------------------
  34. # Native
  35. ifeq ($(HAVE_AF_DEPS),true)
  36. LINK_FLAGS += $(shell pkg-config --libs sndfile)
  37. ifeq ($(HAVE_FFMPEG),true)
  38. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  39. endif
  40. endif
  41. ifeq ($(HAVE_MF_DEPS),true)
  42. LINK_FLAGS += $(shell pkg-config --libs smf)
  43. endif
  44. ifeq ($(HAVE_ZYN_DEPS),true)
  45. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  46. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  47. LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  48. endif
  49. endif
  50. # --------------------------------------------------------------
  51. # Libs
  52. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  53. LINK_FLAGS += $(JUCE_CORE_LIBS)
  54. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  55. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  56. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  57. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  58. LINK_FLAGS += $(RTMEMPOOL_LIBS)
  59. ifeq ($(HAVE_OPENGL),true)
  60. LINK_FLAGS += $(DGL_LIBS)
  61. endif
  62. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  63. LINK_FLAGS += $(LILV_LIBS)
  64. endif
  65. # --------------------------------------------------------------
  66. LIBS = ../modules/carla_native.a
  67. LIBS += ../modules/juce_audio_basics.a
  68. LIBS += ../modules/juce_core.a
  69. LIBS += ../modules/juce_data_structures.a
  70. LIBS += ../modules/juce_events.a
  71. LIBS += ../modules/juce_graphics.a
  72. LIBS += ../modules/juce_gui_basics.a
  73. LIBS += ../modules/rtmempool.a
  74. ifeq ($(HAVE_OPENGL),true)
  75. LIBS += ../modules/dgl.a
  76. endif
  77. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  78. LIBS += ../modules/lilv.a
  79. endif
  80. # --------------------------------------------------------------
  81. ifeq ($(WIN32),true)
  82. TARGETS = carla-native-lv2-export.exe carla-native.lv2/carla-native.dll
  83. else
  84. ifeq ($(MACOS),true)
  85. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.dylib
  86. else
  87. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.so
  88. endif
  89. endif
  90. # --------------------------------------------------------------
  91. all: $(TARGETS)
  92. clean:
  93. $(RM) $(TARGETS) *.o
  94. $(RM) carla-native.lv2/*.*
  95. debug:
  96. $(MAKE) DEBUG=true
  97. # --------------------------------------------------------------
  98. carla-native-base.cpp.o: carla-native-base.cpp ../modules/CarlaNative.h
  99. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  100. carla-native-lv2.cpp.o: carla-native-lv2.cpp carla-native-base.cpp ../modules/CarlaNative.h
  101. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  102. carla-native-lv2-export.cpp.o: carla-native-lv2-export.cpp carla-native-base.cpp ../modules/CarlaNative.h
  103. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  104. # --------------------------------------------------------------
  105. carla-native-lv2-export: carla-native-lv2-export.cpp.o $(LIBS)
  106. $(CXX) $^ $(LINK_FLAGS) -o $@
  107. ./carla-native-lv2-export
  108. carla-native-lv2-export.exe: carla-native-lv2-export.cpp.o $(LIBS)
  109. $(CXX) $^ $(LINK_FLAGS) -o $@
  110. ./carla-native-lv2-export.exe
  111. # --------------------------------------------------------------
  112. carla-native.lv2/carla-native.dll: carla-native-lv2.cpp.o $(LIBS)
  113. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  114. carla-native.lv2/carla-native.dylib: carla-native-lv2.cpp.o $(LIBS)
  115. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  116. carla-native.lv2/carla-native.so: carla-native-lv2.cpp.o $(LIBS)
  117. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  118. # --------------------------------------------------------------
  119. .FORCE:
  120. .PHONY: .FORCE
  121. ../modules/%.a: .FORCE
  122. $(MAKE) -C ../modules $*
  123. # --------------------------------------------------------------