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.

146 lines
4.4KB

  1. ###############################################################################
  2. # Copyright (C) 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-DAW.
  19. ##
  20. ## Do not edit this file; run `make config` instead.
  21. ##
  22. VERSION := 1.0.0
  23. PACKAGE := SESSION_MANAGER
  24. all: .config
  25. .config: configure
  26. @ echo '<<< Configuring '$(PACKAGE)
  27. @ ./configure
  28. config:
  29. @ echo '<<< Configuring '$(PACKAGE)
  30. @ ./configure
  31. -include .config
  32. export SYSTEM_PATH:=$(prefix)/share/
  33. export DOCUMENT_PATH:=$(prefix)/share/doc/
  34. export PIXMAP_PATH:=$(prefix)/share/pixmaps/
  35. export ICON_PATH:=$(prefix)/share/icons/
  36. export DESKTOP_PATH:=$(prefix)/share/applications/
  37. # a bit of a hack to make sure this runs before any rules
  38. ifneq ($(CALCULATING),yes)
  39. TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
  40. endif
  41. ifeq ($(USE_DEBUG),yes)
  42. CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
  43. CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
  44. else
  45. CFLAGS := -pipe -O2 -DNDEBUG
  46. CXXFLAGS := -fno-rtti -fno-exceptions
  47. endif
  48. CFLAGS+=-DVERSION=\"$(VERSION)\" \
  49. -DINSTALL_PREFIX=\"$(prefix)\" \
  50. -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
  51. -DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
  52. -DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
  53. CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
  54. INCLUDES := -I. -Iutil -IFL -Inonlib
  55. include scripts/colors
  56. ifneq ($(CALCULATING),yes)
  57. COMPILING="$(BOLD)$(BLACK)${PACKAGE} [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)"
  58. else
  59. COMPILING="Compiling: $<"
  60. endif
  61. .C.o:
  62. @ echo $(COMPILING)
  63. @ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
  64. %.C : %.fl
  65. @ cd `dirname $<` && fluid -c ../$<
  66. DONE := $(BOLD)$(GREEN)done$(SGR0)
  67. include FL/makefile.inc
  68. #include nonlib/makefile.inc
  69. include makefile.inc
  70. SRCS:=$(Session_SRCS)
  71. OBJS:=$(Session_OBJS)
  72. CXXFLAGS += $(Session_CFLAGS)
  73. # FIXME: isn't there a better way?
  74. $(OBJS): .config Makefile
  75. TAGS: $(SRCS)
  76. etags $(SRCS)
  77. .deps: .config $(SRCS)
  78. ifneq ($(CALCULATING),yes)
  79. @ echo -n Calculating dependencies...
  80. @ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
  81. @ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
  82. endif
  83. install: all
  84. @ echo -n "Installing..."
  85. @ install src/nsmd "$(DESTDIR)$(prefix)"/bin/nsmd
  86. @ install src/session-manager "$(DESTDIR)$(prefix)"/bin/non-session-manager
  87. @ install src/jackpatch "$(DESTDIR)$(prefix)"/bin/jackpatch
  88. @ mkdir -p "$(DESTDIR)$(SYSTEM_PATH)"/non-session-manager
  89. @ $(MAKE) -s -C doc install
  90. @ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-session-manager"
  91. @ install -m 644 icons/hicolor/256x256/apps/non-session-manager.png "$(DESTDIR)$(PIXMAP_PATH)"/non-session-manager/icon-256x256.png
  92. @ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
  93. @ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
  94. @ install -d "$(DESTDIR)$(DESKTOP_PATH)"
  95. @ sed 's:@BIN_PATH@:$(prefix)/bin:' non-session-manager.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-session-manager.desktop"
  96. @ echo "$(DONE)"
  97. ifneq ($(USE_DEBUG),yes)
  98. @ echo -n "Stripping..."
  99. @ strip "$(DESTDIR)$(prefix)"/bin/jackpatch
  100. @ strip "$(DESTDIR)$(prefix)"/bin/nsmd
  101. @ strip "$(DESTDIR)$(prefix)"/bin/non-session-manager
  102. @ echo "$(DONE)"
  103. endif
  104. clean_deps:
  105. @ rm -f .deps
  106. .PHONEY: clean config depend clean_deps
  107. clean: Session_clean
  108. dist:
  109. git archive --prefix=non-session-$(VERSION)/ v$(VERSION) | bzip2 > non-session-$(VERSION).tar.bz2
  110. scan-gpl:
  111. @ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
  112. -include .deps