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.

176 lines
6.5KB

  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 -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 += -Wno-vla -Wno-vla-extension
  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. $(shell pkg-config --cflags --libs QtCore) -isystem /usr/include/qt4
  62. valgrind --leak-check=full ./$@
  63. CarlaUtils3: CarlaUtils3.cpp ../utils/*.hpp
  64. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ -ldl -lrt
  65. valgrind --leak-check=full ./$@
  66. CarlaUtils4: CarlaUtils4.cpp ../utils/CarlaStateUtils.cpp ../utils/*.hpp
  67. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
  68. ../modules/juce_core.a -ldl -lpthread -lrt \
  69. $(shell pkg-config --cflags --libs QtCore QtXml) -isystem /usr/include/qt4
  70. valgrind --leak-check=full ./$@
  71. Exceptions: Exceptions.cpp
  72. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  73. valgrind --leak-check=full ./$@
  74. Print: Print.cpp ../utils/CarlaUtils.hpp
  75. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  76. valgrind --leak-check=full ./$@
  77. RDF: RDF.cpp ../modules/ladspa_rdf.hpp ../modules/lv2_rdf.hpp
  78. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  79. valgrind --leak-check=full ./$@
  80. # --------------------------------------------------------------
  81. ChildProcess: ChildProcess.cpp
  82. $(CXX) $< $(PEDANTIC_CXX_FLAGS) ../modules/juce_core.a -ldl -lpthread -lrt -o $@
  83. valgrind --leak-check=full ./$@
  84. CarlaMutex: CarlaMutex.cpp ../utils/CarlaMutex.hpp
  85. $(CXX) $< -lpthread -o $@
  86. valgrind --leak-check=full ./$@
  87. Engine: Engine.cpp
  88. $(CXX) $< \
  89. ../backend/standalone/CarlaStandalone.cpp.o \
  90. -Wl,--start-group \
  91. ../backend/carla_engine.a ../backend/carla_plugin.a ../modules/native-plugins.a \
  92. ../modules/dgl.a ../modules/jackbridge.a ../modules/lilv.a ../modules/rtmempool.a ../modules/rtaudio.a ../modules/rtmidi.a \
  93. -Wl,--end-group \
  94. $(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 $@
  95. env LD_LIBRARY_PATH=../backend valgrind --leak-check=full ./$@
  96. # ../modules/juce_audio_basics.a ../modules/juce_core.a \
  97. EngineEvents: EngineEvents.cpp
  98. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -L../backend -lcarla_standalone2 -o $@
  99. env LD_LIBRARY_PATH=../backend valgrind ./$@
  100. PipeServer: PipeServer.cpp ../utils/CarlaPipeUtils.hpp
  101. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  102. valgrind --leak-check=full ./$@
  103. RtLinkedList: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  104. $(CXX) $< ../modules/rtmempool.a $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  105. valgrind --leak-check=full ./$@
  106. RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  107. $(CXX) $< ../modules/rtmempool.a $(GNU_CXX_FLAGS) -lpthread -o $@
  108. valgrind --leak-check=full ./$@
  109. # --------------------------------------------------------------
  110. Rewire.exe: Rewire.cpp.o
  111. $(CXX) $^ -lversion -o $@
  112. Rewire.cpp.o: Rewire.cpp
  113. $(CXX) $< -Wall -Wextra -DREAL_BUILD -DDEBUG -O0 -g -I../includes -I../utils -std=c++11 -c -o $@
  114. # --------------------------------------------------------------
  115. clean:
  116. rm -f *.o $(TARGETS)
  117. debug:
  118. $(MAKE) DEBUG=true
  119. # --------------------------------------------------------------
  120. DISTRHO: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  121. $(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi $(LINK_FLAGS) $(DGL_LIBS) -lpthread -o $@
  122. ./DISTRHO
  123. DISTRHO.so: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  124. $(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 $@
  125. DGL: DGL.cpp ../modules/distrho/dgl/src/Window.cpp
  126. $(CXX) $< $(PEDANTIC_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) -o $@
  127. # ./DGL
  128. # valgrind ./DGL
  129. # --------------------------------------------------------------