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.

58 lines
1.5KB

  1. SLUG=Bogaudio
  2. VERSION=0.6.14
  3. FLAGS += -DSLUG=$(SLUG) -DVERSION=$(VERSION)
  4. ifdef REQUIRE_VERSION
  5. FLAGS += -DREQUIRE_VERSION=$(REQUIRE_VERSION)
  6. endif
  7. ifdef EXPERIMENTAL
  8. FLAGS += -DEXPERIMENTAL=1
  9. endif
  10. ifdef TEST
  11. FLAGS += -DTEST=1
  12. endif
  13. SOURCES = $(wildcard src/*.cpp src/dsp/*cpp)
  14. CXXFLAGS += -Isrc -Isrc/dsp
  15. DISTRIBUTABLES += $(wildcard LICENSE* README*) res
  16. RACK_DIR ?= ../..
  17. include $(RACK_DIR)/plugin.mk
  18. BENCHMARK_SOURCES = $(wildcard benchmarks/*.cpp src/dsp/*cpp)
  19. BENCHMARK_OBJECTS = $(patsubst %, build/%.o, $(BENCHMARK_SOURCES))
  20. BENCHMARK_DEPS = $(patsubst %, build/%.d, $(BENCHMARK_SOURCES))
  21. -include $(BENCHMARK_DEPS)
  22. benchmark: $(BENCHMARK_OBJECTS)
  23. $(CXX) -o $@ $^ -lbenchmark -lpthread
  24. benchmark_clean:
  25. rm -f benchmark $(BENCHMARK_OBJECTS)
  26. TESTMAIN_SOURCES = $(wildcard test/testmain.cpp src/dsp/*cpp)
  27. TESTMAIN_OBJECTS = $(patsubst %, build/%.o, $(TESTMAIN_SOURCES))
  28. TESTMAIN_DEPS = $(patsubst %, build/%.d, $(TESTMAIN_SOURCES))
  29. -include $(TESTMAIN_DEPS)
  30. testmain: $(TESTMAIN_OBJECTS)
  31. $(CXX) -o $@ $^ ../../build/src/util.cpp.o
  32. testmain_clean:
  33. rm -f testmain $(TESTMAIN_OBJECTS)
  34. PLOT_SOURCES = $(wildcard test/plot.cpp src/dsp/*cpp)
  35. PLOT_OBJECTS = $(patsubst %, build/%.o, $(PLOT_SOURCES))
  36. PLOT_DEPS = $(patsubst %, build/%.d, $(PLOT_SOURCES))
  37. -include $(PLOT_DEPS)
  38. plot: $(PLOT_OBJECTS)
  39. $(CXX) -o $@ $^
  40. plotrun: plot
  41. ./plot
  42. plotrungp: plot
  43. ./plot > plot.tmp && gnuplot -e "set yrange [0:1.1]; plot 'plot.tmp' using 1:2 with lines"
  44. plot_clean:
  45. rm -f plot $(PLOT_OBJECTS)
  46. clean: benchmark_clean testmain_clean plot_clean