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.

170 lines
6.1KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla tests #
  3. # ------------------------ #
  4. # Created by falkTX
  5. #
  6. # --------------------------------------------------------------
  7. BASE_FLAGS = -Wall -Wextra -Werror -fPIC -DPIC -pipe -DREAL_BUILD -DDEBUG -O0 -g
  8. BASE_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules
  9. BASE_FLAGS += -Wcast-align -Wcast-qual -Wconversion -Wmissing-declarations -Wsign-conversion -Wuninitialized -Wunused-parameter
  10. BASE_FLAGS += -Wformat -Wformat-security -Wredundant-decls -Wshadow -Wstrict-overflow -fstrict-overflow -Wundef -Wwrite-strings
  11. ifneq ($(CC),clang-3.4)
  12. BASE_FLAGS += -Wlogical-op
  13. endif
  14. # --------------------------------------------------------------
  15. ANSI_FLAGS = $(BASE_FLAGS) -DBUILD_ANSI_TEST
  16. ANSI_FLAGS += -ansi -pedantic -pedantic-errors -Waggregate-return
  17. # ANSI_FLAGS += -L../backend -lcarla_standalone2
  18. # --------------------------------------------------------------
  19. GNU_CXX_FLAGS = $(BASE_FLAGS)
  20. GNU_CXX_FLAGS += -std=c++11 -std=gnu++11 -Weffc++ -Wzero-as-null-pointer-constant
  21. # --------------------------------------------------------------
  22. PEDANTIC_CXX_FLAGS = $(BASE_FLAGS)
  23. PEDANTIC_CXX_FLAGS += -std=c++11 -pedantic -pedantic-errors
  24. PEDANTIC_CXX_FLAGS += -isystem /opt/kxstudio/include
  25. PEDANTIC_CXX_FLAGS += -Weffc++ -Wno-vla
  26. ifeq ($(CC),clang-3.4)
  27. PEDANTIC_CXX_FLAGS += -Wno-vla-extension
  28. else
  29. PEDANTIC_CXX_FLAGS += -Wunsafe-loop-optimizations -Wzero-as-null-pointer-constant
  30. endif
  31. # --------------------------------------------------------------
  32. TARGETS = ansi-pedantic-test_c ansi-pedantic-test_c99
  33. TARGETS += CarlaRingBuffer CarlaString
  34. TARGETS += CarlaUtils1 CarlaUtils2 CarlaUtils3 CarlaUtils4
  35. TARGETS += Exceptions Print RDF
  36. # ansi-pedantic-test_cxx ansi-pedantic-test_cxx11
  37. # TARGETS += EngineEvents PipeServer RtLinkedList RtLinkedListGnu
  38. all: $(TARGETS)
  39. # --------------------------------------------------------------
  40. ansi-pedantic-test_c: ansi-pedantic-test.c ../backend/Carla*.h
  41. $(CC) $< $(ANSI_FLAGS) -Wc++-compat -o $@
  42. ansi-pedantic-test_c99: ansi-pedantic-test.c ../backend/Carla*.h
  43. $(CC) $< $(ANSI_FLAGS) -std=c99 -pedantic -pedantic-errors -Wc++-compat -o $@
  44. ansi-pedantic-test_cxx: ansi-pedantic-test.cpp ../backend/Carla*.h
  45. $(CXX) $< $(ANSI_FLAGS) -o $@
  46. ansi-pedantic-test_cxx11: ansi-pedantic-test.cpp ../backend/Carla*.h
  47. $(CXX) $< $(ANSI_FLAGS) -std=c++11 -pedantic -pedantic-errors -o $@
  48. # --------------------------------------------------------------
  49. CarlaRingBuffer: CarlaRingBuffer.cpp ../utils/CarlaRingBuffer.hpp
  50. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  51. valgrind --leak-check=full ./$@
  52. CarlaString: CarlaString.cpp ../utils/CarlaString.hpp
  53. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  54. valgrind --leak-check=full ./$@
  55. CarlaUtils1: CarlaUtils1.cpp ../utils/*.hpp
  56. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  57. valgrind --leak-check=full ./$@
  58. CarlaUtils2: CarlaUtils2.cpp ../utils/*.hpp
  59. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
  60. ../modules/juce_core.a ../modules/lilv.a -ldl -lpthread -lrt
  61. valgrind --leak-check=full ./$@
  62. CarlaUtils3: CarlaUtils3.cpp ../utils/*.hpp
  63. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ -ldl -lrt
  64. valgrind --leak-check=full ./$@
  65. CarlaUtils4: CarlaUtils4.cpp ../utils/CarlaStateUtils.cpp ../utils/*.hpp
  66. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
  67. ../modules/juce_core.a -ldl -lpthread -lrt
  68. valgrind --leak-check=full ./$@
  69. Exceptions: Exceptions.cpp
  70. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  71. valgrind --leak-check=full ./$@
  72. Print: Print.cpp ../utils/CarlaUtils.hpp
  73. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  74. valgrind --leak-check=full ./$@
  75. RDF: RDF.cpp ../modules/ladspa_rdf.hpp ../modules/lv2_rdf.hpp
  76. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  77. valgrind --leak-check=full ./$@
  78. # --------------------------------------------------------------
  79. ChildProcess: ChildProcess.cpp
  80. $(CXX) $< $(PEDANTIC_CXX_FLAGS) ../modules/juce_core.a -ldl -lpthread -lrt -o $@
  81. valgrind --leak-check=full ./$@
  82. CarlaMutex: CarlaMutex.cpp ../utils/CarlaMutex.hpp
  83. $(CXX) $< -lpthread -o $@
  84. valgrind --leak-check=full ./$@
  85. # ifneq ($(MACOS_OR_WIN32),true)
  86. # ../modules/rtaudio.a ../modules/rtmidi.a \
  87. # endif
  88. Engine: Engine.cpp
  89. $(CXX) $< \
  90. ../backend/standalone/CarlaStandalone.cpp.o \
  91. -Wl,--start-group \
  92. ../backend/carla_engine.a ../backend/carla_plugin.a ../modules/native-plugins.a \
  93. ../modules/dgl.a ../modules/jackbridge.a ../modules/lilv.a ../modules/rtmempool.a \
  94. -Wl,--end-group \
  95. $(PEDANTIC_CXX_FLAGS) $(shell pkg-config --libs alsa libpulse-simple liblo QtCore QtXml fluidsynth linuxsampler x11 gl smf fftw3 mxml zlib ntk_images ntk) -o $@
  96. env LD_LIBRARY_PATH=../backend valgrind --leak-check=full ./$@
  97. # ../modules/juce_audio_basics.a ../modules/juce_core.a \
  98. EngineEvents: EngineEvents.cpp
  99. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -L../backend -lcarla_standalone2 -o $@
  100. env LD_LIBRARY_PATH=../backend valgrind ./$@
  101. PipeServer: PipeServer.cpp ../utils/CarlaPipeUtils.hpp
  102. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  103. valgrind --leak-check=full ./$@
  104. RtLinkedList: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  105. $(CXX) $< ../modules/rtmempool.a $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  106. valgrind --leak-check=full ./$@
  107. RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  108. $(CXX) $< ../modules/rtmempool.a $(GNU_CXX_FLAGS) -lpthread -o $@
  109. valgrind --leak-check=full ./$@
  110. # --------------------------------------------------------------
  111. clean:
  112. rm -f *.o $(TARGETS)
  113. debug:
  114. $(MAKE) DEBUG=true
  115. # --------------------------------------------------------------
  116. DISTRHO: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  117. $(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi $(LINK_FLAGS) $(DGL_LIBS) -lpthread -o $@
  118. ./DISTRHO
  119. DISTRHO.so: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  120. $(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi -DSHARED_DLL $(LINK_FLAGS) $(DGL_LIBS) -lpthread -shared -Wl,--no-undefined -o $@
  121. DGL: DGL.cpp ../modules/distrho/dgl/src/Window.cpp
  122. $(CXX) $< $(PEDANTIC_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) -o $@
  123. # ./DGL
  124. # valgrind ./DGL
  125. # --------------------------------------------------------------