Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
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.

117 lines
2.9KB

  1. # Makefile for the Non Sequencer.
  2. # Copyright 2007-2008 Jonathan Moore Liles
  3. # This file is licensed under version 2 of the GPL.
  4. #
  5. # Do not edit this file; run `make config` instead.
  6. #
  7. VERSION := 1.9.2
  8. all: .config non-sequencer
  9. .config: configure
  10. @ ./configure
  11. config:
  12. @ ./configure
  13. -include .config
  14. SYSTEM_PATH=$(prefix)/share/non-sequencer/
  15. DOCUMENT_PATH=$(prefix)/share/doc/non-sequencer/
  16. # a bit of a hack to make sure this runs before any rules
  17. ifneq ($(CALCULATING),yes)
  18. TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
  19. endif
  20. ifeq ($(USE_DEBUG),yes)
  21. CXXFLAGS := -pipe -ggdb -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
  22. else
  23. CXXFLAGS := -pipe -O2 -fno-rtti -fno-exceptions -DNDEBUG
  24. endif
  25. CFLAGS+=-DVERSION=\"$(VERSION)\" \
  26. -DINSTALL_PREFIX=\"$(prefix)\" \
  27. -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
  28. -DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\"
  29. CXXFLAGS:=$(CFLAGS) $(CXXFLAGS) $(FLTK_CFLAGS) $(SIGCPP_CFLAGS) $(LASH_CFLAGS)
  30. LIBS:=$(FLTK_LIBS) $(JACK_LIBS) $(LASH_LIBS) $(SIGCPP_LIBS)
  31. ifeq ($(JACK_MIDI_PROTO_API),yes)
  32. CXXFLAGS+=-DJACK_MIDI_PROTO_API
  33. endif
  34. # uncomment this line to print each playback event to the console (not RT safe)
  35. # CXXFLAGS+= -DDEBUG_EVENTS
  36. SRCS:=$(wildcard src/*.C src/gui/*.fl src/gui/*.C)
  37. SRCS:=$(SRCS:.fl=.C)
  38. SRCS:=$(sort $(SRCS))
  39. OBJS:=$(SRCS:.C=.o)
  40. .PHONEY: all clean install dist valgrind config
  41. clean:
  42. rm -f non-sequencer .deps $(OBJS)
  43. @ echo "$(DONE)"
  44. valgrind:
  45. valgrind ./non-sequencer
  46. include scripts/colors
  47. ifneq ($(CALCULATING),yes)
  48. COMPILING="$(BOLD)$(BLACK)[$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) Compiling: $(BOLD)$(YELLOW)$<$(SGR0)"
  49. else
  50. COMPILING="Compiling: $<"
  51. endif
  52. .C.o:
  53. @ echo $(COMPILING)
  54. @ $(CXX) $(CXXFLAGS) -c $< -o $@
  55. %.C : %.fl
  56. @ cd $(dir $<) && fluid -c $(notdir $<)
  57. $(OBJS): .config
  58. DONE:=$(BOLD)$(GREEN)done$(SGR0)
  59. non-sequencer: $(OBJS)
  60. @ echo -n "Linking..."
  61. @ rm -f $@
  62. @ $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) -o $@ || echo "$(BOLD)$(RED)Error!$(SGR0)"
  63. @ if test -x $@; then echo "$(DONE)"; test -x "$(prefix)/bin/$@" || echo "You must now run 'make install' (as the appropriate user) to install the executable, documentation and other support files in order for the program to function properly."; fi
  64. install: all
  65. @ echo -n "Installing..."
  66. @ install non-sequencer $(prefix)/bin
  67. @ mkdir -p "$(SYSTEM_PATH)"
  68. @ cp -r instruments "$(SYSTEM_PATH)"
  69. @ mkdir -p "$(DOCUMENT_PATH)"
  70. @ cp doc/*.html doc/*.png "$(DOCUMENT_PATH)"
  71. @ echo "$(DONE)"
  72. ifneq ($(USE_DEBUG),yes)
  73. @ echo -n "Stripping..."
  74. @ strip $(prefix)/bin/non-sequencer
  75. @ echo "$(DONE)"
  76. endif
  77. dist:
  78. git archive --prefix=non-sequencer-$(VERSION)/ v$(VERSION) | bzip2 > non-sequencer-$(VERSION).tar.bz2
  79. TAGS: $(SRCS)
  80. etags $(SRCS)
  81. .deps: .config $(SRCS)
  82. @ echo -n Calculating dependencies...
  83. @ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) > .deps 2>/dev/null && echo $(DONE)
  84. -include .deps