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.

145 lines
4.7KB

  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.4
  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. PIXMAP_PATH:=$(prefix)/share/pixmaps/non-sequencer/
  32. ICON_PATH:=$(prefix)/share/icons/
  33. DESKTOP_PATH:=$(prefix)/share/applications/
  34. # a bit of a hack to make sure this runs before any rules
  35. ifneq ($(CALCULATING),yes)
  36. TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
  37. endif
  38. ifeq ($(USE_DEBUG),yes)
  39. CXXFLAGS := -pipe -ggdb -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
  40. else
  41. CXXFLAGS := -pipe -O2 -fno-rtti -fno-exceptions -DNDEBUG
  42. endif
  43. CFLAGS+=-DINSTALL_PREFIX=\"$(prefix)\" \
  44. -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
  45. -DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
  46. -DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
  47. CXXFLAGS:=$(CFLAGS) $(CXXFLAGS) $(FLTK_CFLAGS) $(SIGCPP_CFLAGS) $(LIBLO_CFLAGS) $(XPM_CFLAGS)
  48. LIBS:=$(FLTK_LIBS) $(JACK_LIBS) $(SIGCPP_LIBS) $(LIBLO_LIBS) $(XPM_LIBS)
  49. ifeq ($(JACK_MIDI_PROTO_API),yes)
  50. CXXFLAGS+=-DJACK_MIDI_PROTO_API
  51. endif
  52. # uncomment this line to print each playback event to the console (not RT safe)
  53. # CXXFLAGS+= -DDEBUG_EVENTS
  54. SRCS:=$(wildcard src/*.C src/gui/*.fl src/gui/*.C src/NSM/*.C)
  55. SRCS:=$(SRCS:.fl=.C)
  56. SRCS:=$(sort $(SRCS))
  57. OBJS:=$(SRCS:.C=.o)
  58. .PHONEY: all clean install dist valgrind config
  59. clean:
  60. rm -f non-sequencer .deps $(OBJS)
  61. @ echo "$(DONE)"
  62. valgrind:
  63. valgrind ./non-sequencer
  64. include scripts/colors
  65. ifneq ($(CALCULATING),yes)
  66. COMPILING="$(BOLD)$(BLACK)[$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) Compiling: $(BOLD)$(YELLOW)$<$(SGR0)"
  67. else
  68. COMPILING="Compiling: $<"
  69. endif
  70. .C.o:
  71. @ echo $(COMPILING)
  72. @ $(CXX) $(CXXFLAGS) -c $< -o $@
  73. %.C : %.fl
  74. @ cd $(dir $<) && fluid -c $(notdir $<)
  75. $(OBJS): .config
  76. DONE:=$(BOLD)$(GREEN)done$(SGR0)
  77. non-sequencer: $(OBJS)
  78. @ echo -n "Linking..."
  79. @ rm -f $@
  80. @ scripts/build_id .version.c $(VERSION)
  81. @ $(CXX) -c .version.c
  82. @ $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) .version.o -o $@ || echo "$(BOLD)$(RED)Error!$(SGR0)"
  83. @ 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
  84. install: all
  85. @ echo -n "Installing..."
  86. @ install -d $(DESTDIR)$(prefix)/bin
  87. @ install -m 755 non-sequencer $(DESTDIR)$(prefix)/bin
  88. @ install -d "$(DESTDIR)$(SYSTEM_PATH)/instruments"
  89. @ install -m 644 instruments/* "$(DESTDIR)$(SYSTEM_PATH)/instruments"
  90. @ install -d "$(DESTDIR)$(DOCUMENT_PATH)"
  91. @ install -m 644 doc/*.html doc/*.png "$(DESTDIR)$(DOCUMENT_PATH)"
  92. @ install -d "$(DESTDIR)$(PIXMAP_PATH)"
  93. @ install -m 644 icons/hicolor/256x256/apps/non-sequencer.png "$(DESTDIR)$(PIXMAP_PATH)"/icon-256x256.png
  94. @ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
  95. @ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
  96. @ install -d "$(DESTDIR)$(DESKTOP_PATH)"
  97. @ sed 's:@BIN_PATH@:$(prefix)/bin:' non-sequencer.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-sequencer.desktop"
  98. @ echo "$(DONE)"
  99. ifneq ($(USE_DEBUG),yes)
  100. @ echo -n "Stripping..."
  101. @ strip $(DESTDIR)$(prefix)/bin/non-sequencer
  102. @ echo "$(DONE)"
  103. endif
  104. dist:
  105. git archive --prefix=non-sequencer-$(VERSION)/ v$(VERSION) | bzip2 > non-sequencer-$(VERSION).tar.bz2
  106. TAGS: $(SRCS)
  107. etags $(SRCS)
  108. .deps: .config $(SRCS)
  109. @ echo -n Calculating dependencies...
  110. @ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) > .deps 2>/dev/null && echo $(DONE)
  111. -include .deps