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.

132 lines
4.8KB

  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
  8. BASE_FLAGS += -Wcast-qual -Wconversion -Wlogical-op
  9. BASE_FLAGS += -Wsign-conversion -Wuninitialized -Wunused-parameter
  10. BASE_FLAGS += -DDEBUG -O0 -g
  11. BASE_FLAGS += -I. -I../backend -I../includes -I../utils
  12. BASE_FLAGS += -isystem ../modules
  13. # --------------------------------------------------------------
  14. ANSI_FLAGS = $(BASE_FLAGS) -DBUILD_ANSI_TEST
  15. ANSI_FLAGS += -ansi -pedantic -pedantic-errors -Waggregate-return
  16. ANSI_FLAGS += -I../backend -I../includes
  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 -Wzero-as-null-pointer-constant -Wno-vla
  24. PEDANTIC_CXX_FLAGS += -isystem /opt/kxstudio/include
  25. # --------------------------------------------------------------
  26. TARGETS = ansi-pedantic-test_c ansi-pedantic-test_c99 ansi-pedantic-test_cxx ansi-pedantic-test_cxx11
  27. TARGETS += CarlaString EngineEvents PipeServer Print RtLinkedList RtLinkedListGnu Utils
  28. all: $(TARGETS)
  29. # --------------------------------------------------------------
  30. ansi-pedantic-test_c: ansi-pedantic-test.c ../backend/Carla*.h
  31. $(CC) $< $(ANSI_FLAGS) -Wc++-compat -o $@
  32. ansi-pedantic-test_c99: ansi-pedantic-test.c ../backend/Carla*.h
  33. $(CC) $< $(ANSI_FLAGS) -std=c99 -Wc++-compat -o $@
  34. ansi-pedantic-test_cxx: ansi-pedantic-test.c ../backend/Carla*.h
  35. $(CXX) $< $(ANSI_FLAGS) -o $@
  36. ansi-pedantic-test_cxx11: ansi-pedantic-test.c ../backend/Carla*.h
  37. $(CXX) $< $(ANSI_FLAGS) -std=c++11 -Wzero-as-null-pointer-constant -o $@
  38. # --------------------------------------------------------------
  39. CarlaString: CarlaString.cpp ../utils/CarlaString.hpp
  40. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  41. valgrind --leak-check=full ./$@
  42. Engine: Engine.cpp
  43. $(CXX) $< \
  44. ../backend/standalone/CarlaStandalone.cpp.o \
  45. -Wl,--start-group \
  46. ../backend/carla_engine.a ../backend/carla_plugin.a ../modules/native-plugins.a \
  47. ../modules/dgl.a ../modules/jackbridge.a ../modules/lilv.a ../modules/rtmempool.a ../modules/rtaudio.a ../modules/rtmidi.a \
  48. -Wl,--end-group \
  49. $(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 $@
  50. env LD_LIBRARY_PATH=../backend valgrind --leak-check=full ./$@
  51. # ../modules/juce_audio_basics.a ../modules/juce_core.a \
  52. EngineEvents: EngineEvents.cpp
  53. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -L../backend -lcarla_standalone2 -o $@
  54. env LD_LIBRARY_PATH=../backend valgrind ./$@
  55. PipeServer: PipeServer.cpp ../utils/CarlaPipeUtils.hpp
  56. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  57. # valgrind ./$@
  58. Print: Print.cpp ../utils/CarlaUtils.hpp
  59. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
  60. valgrind ./$@
  61. RtLinkedList: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  62. $(CXX) $< ../modules/rtmempool.a $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
  63. valgrind ./$@
  64. RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp ../modules/rtmempool.a
  65. $(CXX) $< ../modules/rtmempool.a $(GNU_CXX_FLAGS) -lpthread -o $@
  66. valgrind ./$@
  67. Utils: Utils.cpp ../utils/*.hpp
  68. $(CXX) $< $(PEDANTIC_CXX_FLAGS) -ldl -lpthread -o $@
  69. valgrind ./$@
  70. # --------------------------------------------------------------
  71. Rewire.exe: Rewire.cpp.o
  72. $(CXX) $^ -lversion -o $@
  73. Rewire.cpp.o: Rewire.cpp
  74. $(CXX) $< -Wall -Wextra -DREAL_BUILD -DDEBUG -O0 -g -I../includes -I../utils -std=c++11 -c -o $@
  75. # --------------------------------------------------------------
  76. ../modules/%.a:
  77. $(MAKE) -C ../modules $*
  78. # --------------------------------------------------------------
  79. clean:
  80. rm -f *.o $(TARGETS)
  81. debug:
  82. $(MAKE) DEBUG=true
  83. # --------------------------------------------------------------
  84. DISTRHO: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  85. $(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi $(LINK_FLAGS) $(DGL_LIBS) -lpthread -o $@
  86. ./DISTRHO
  87. DISTRHO.so: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
  88. $(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 $@
  89. DGL: DGL.cpp ../modules/distrho/dgl/src/Window.cpp
  90. $(CXX) $< $(PEDANTIC_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) -o $@
  91. # ./DGL
  92. # valgrind ./DGL
  93. # --------------------------------------------------------------