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.

133 lines
3.9KB

  1. ###############################################################################
  2. # Copyright (C) 2007-2008 Jonathan Moore Liles #
  3. # #
  4. # This program is free software; you can redistribute it and/or modify it #
  5. # under the terms of the GNU General Public License as published by the #
  6. # Free Software Foundation; either version 2 of the License, or (at your #
  7. # option) any later version. #
  8. # #
  9. # This program is distributed in the hope that it will be useful, but WITHOUT #
  10. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
  11. # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
  12. # more details. #
  13. # #
  14. # You should have received a copy of the GNU General Public License along #
  15. # with This program; see the file COPYING. If not,write to the Free Software #
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
  17. ###############################################################################
  18. # Makefile for the Non Sequencer.
  19. #
  20. # Do not edit this file; run `make config` instead.
  21. #
  22. VERSION := 1.9.2
  23. all: .config non-sequencer
  24. .config: configure
  25. @ ./configure
  26. config:
  27. @ ./configure
  28. -include .config
  29. SYSTEM_PATH=$(prefix)/share/non-sequencer/
  30. DOCUMENT_PATH=$(prefix)/share/doc/non-sequencer/
  31. # a bit of a hack to make sure this runs before any rules
  32. ifneq ($(CALCULATING),yes)
  33. TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
  34. endif
  35. ifeq ($(USE_DEBUG),yes)
  36. CXXFLAGS := -pipe -ggdb -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
  37. else
  38. CXXFLAGS := -pipe -O2 -fno-rtti -fno-exceptions -DNDEBUG
  39. endif
  40. CFLAGS+=-DVERSION=\"$(VERSION)\" \
  41. -DINSTALL_PREFIX=\"$(prefix)\" \
  42. -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
  43. -DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\"
  44. CXXFLAGS:=$(CFLAGS) $(CXXFLAGS) $(FLTK_CFLAGS) $(SIGCPP_CFLAGS) $(LASH_CFLAGS)
  45. LIBS:=$(FLTK_LIBS) $(JACK_LIBS) $(LASH_LIBS) $(SIGCPP_LIBS)
  46. ifeq ($(JACK_MIDI_PROTO_API),yes)
  47. CXXFLAGS+=-DJACK_MIDI_PROTO_API
  48. endif
  49. # uncomment this line to print each playback event to the console (not RT safe)
  50. # CXXFLAGS+= -DDEBUG_EVENTS
  51. SRCS:=$(wildcard src/*.C src/gui/*.fl src/gui/*.C)
  52. SRCS:=$(SRCS:.fl=.C)
  53. SRCS:=$(sort $(SRCS))
  54. OBJS:=$(SRCS:.C=.o)
  55. .PHONEY: all clean install dist valgrind config
  56. clean:
  57. rm -f non-sequencer .deps $(OBJS)
  58. @ echo "$(DONE)"
  59. valgrind:
  60. valgrind ./non-sequencer
  61. include scripts/colors
  62. ifneq ($(CALCULATING),yes)
  63. COMPILING="$(BOLD)$(BLACK)[$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) Compiling: $(BOLD)$(YELLOW)$<$(SGR0)"
  64. else
  65. COMPILING="Compiling: $<"
  66. endif
  67. .C.o:
  68. @ echo $(COMPILING)
  69. @ $(CXX) $(CXXFLAGS) -c $< -o $@
  70. %.C : %.fl
  71. @ cd $(dir $<) && fluid -c $(notdir $<)
  72. $(OBJS): .config
  73. DONE:=$(BOLD)$(GREEN)done$(SGR0)
  74. non-sequencer: $(OBJS)
  75. @ echo -n "Linking..."
  76. @ rm -f $@
  77. @ $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) -o $@ || echo "$(BOLD)$(RED)Error!$(SGR0)"
  78. @ 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
  79. install: all
  80. @ echo -n "Installing..."
  81. @ install non-sequencer $(prefix)/bin
  82. @ mkdir -p "$(SYSTEM_PATH)"
  83. @ cp -r instruments "$(SYSTEM_PATH)"
  84. @ mkdir -p "$(DOCUMENT_PATH)"
  85. @ cp doc/*.html doc/*.png "$(DOCUMENT_PATH)"
  86. @ echo "$(DONE)"
  87. ifneq ($(USE_DEBUG),yes)
  88. @ echo -n "Stripping..."
  89. @ strip $(prefix)/bin/non-sequencer
  90. @ echo "$(DONE)"
  91. endif
  92. dist:
  93. git archive --prefix=non-sequencer-$(VERSION)/ v$(VERSION) | bzip2 > non-sequencer-$(VERSION).tar.bz2
  94. TAGS: $(SRCS)
  95. etags $(SRCS)
  96. .deps: .config $(SRCS)
  97. @ echo -n Calculating dependencies...
  98. @ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) > .deps 2>/dev/null && echo $(DONE)
  99. -include .deps