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.3KB

  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. sem: sem.cpp ../modules/jackbridge/*
  80. $(CXX) $< -Wall -Wextra -O0 -g -I../utils -I../includes -DREAL_BUILD -o $@
  81. ./$@
  82. # --------------------------------------------------------------
  83. ChildProcess: ChildProcess.cpp
  84. $(CXX) $< $(PEDANTIC_CXX_FLAGS) ../modules/juce_core.a -ldl -lpthread -lrt -o $@
  85. valgrind --leak-check=full ./$@
  86. CarlaMutex: CarlaMutex.cpp ../utils/CarlaMutex.hpp
  87. $(CXX) $< -lpthread -o $@
  88. valgrind --leak-check=full ./$@
  89. # ifneq ($(MACOS_OR_WIN32),true)
  90. # ../modules/rtaudio.a ../modules/rtmidi.a \
  91. # endif
  92. Engine: Engine.cpp
  93. $(CXX) $< \
  94. ../backend/standalone/CarlaStandalone.cpp.o \
  95. -Wl,--start-group \
  96. ../backend/carla_engine.a ../backend/carla_plugin.a ../modules/native-plugins.a \
  97. ../modules/dgl.a ../modules/jackbridge.a ../modules/lilv.a ../modules/rtmempool.a \
  98. -Wl,--end-group \
  99. $(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 $@
  100. env LD_LIBRARY_PATH=../backend valgrind --leak-check=full ./$@
  101. # ../modules/juce_audio_basics.a ../modules/juce_core.a \
  102. EngineEvents: EngineEvents.cpp
  103. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -L../backend -lcarla_standalone2 -o $@
  104. env LD_LIBRARY_PATH=../backend valgrind ./$@
  105. PipeServer: PipeServer.cpp ../utils/CarlaPipeUtils.hpp
  106. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  107. valgrind --leak-check=full ./$@
  108. RtLinkedList: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  109. $(CXX) $< ../modules/rtmempool.a $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  110. valgrind --leak-check=full ./$@
  111. RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  112. $(CXX) $< ../modules/rtmempool.a $(GNU_CXX_FLAGS) -lpthread -o $@
  113. valgrind --leak-check=full ./$@
  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. # --------------------------------------------------------------