Update NTK submodule.
[nondaw.git] / scripts / Makefile
blobac2b9aa979c44f4d9a7a875b23520298aa1000a2
2 ###############################################################################
3 # Copyright (C) 2008 Jonathan Moore Liles #
4 # #
5 # This program is free software; you can redistribute it and/or modify it #
6 # under the terms of the GNU General Public License as published by the #
7 # Free Software Foundation; either version 2 of the License, or (at your #
8 # option) any later version. #
9 # #
10 # This program is distributed in the hope that it will be useful, but WITHOUT #
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
13 # more details. #
14 # #
15 # You should have received a copy of the GNU General Public License along #
16 # with This program; see the file COPYING. If not,write to the Free Software #
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
18 ###############################################################################
20 ## Makefile for the Non-DAW.
23 ## Do not edit this file; run `make config` instead.
27 all: .config
29 .config: configure
30 @ echo '<<< Configuring '$(PACKAGE)
31 @ ./configure
33 config:
34 @ echo '<<< Configuring '$(PACKAGE)
35 @ ./configure
37 -include .config
39 export SYSTEM_PATH:=$(prefix)/share/
40 export DOCUMENT_PATH:=$(prefix)/share/doc/
41 export PIXMAP_PATH:=$(prefix)/share/pixmaps/
42 export ICON_PATH:=$(prefix)/share/icons/
43 export DESKTOP_PATH:=$(prefix)/share/applications/
45 # a bit of a hack to make sure this runs before any rules
46 ifneq ($(CALCULATING),yes)
47 TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
48 endif
50 ifeq ($(USE_DEBUG),yes)
51 CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
52 CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
53 else
54 CFLAGS := -pipe -O2 -DNDEBUG
55 CXXFLAGS := -fno-rtti -fno-exceptions
56 endif
58 # LIBS := "$(FLTK_LIBS) $(LIBS)"
60 INCLUDES := -I. -Iutil -IFL -Inonlib
61 INCLUDES += $(FLTK_CFLAGS)
63 # INCLUDES +=
65 # CFLAGS += $(FLTK_CFLAGS)
67 # include FL/makefile.inc
68 include makefile.inc
70 CFLAGS+=-DVERSION=\"$(VERSION)\" \
71 -DINSTALL_PREFIX=\"$(prefix)\" \
72 -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
73 -DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
74 -DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
76 CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
80 include scripts/colors
82 SPACE:=" `tput cuf 20`"
84 ifneq ($(CALCULATING),yes)
85 COMPILING="$(BOLD)$(BLACK)[$(SGR0) $(PACKAGE)$(SPACE)$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"` $(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(CYAN)$<$(SGR0)"
86 else
87 COMPILING="Compiling: $<"
88 endif
90 .C.o:
91 @ echo $(COMPILING)
92 @ $(CXX) $(INCLUDES) $(CXXFLAGS) -c $< -o $@
94 %.C : %.fl
95 @ cd `dirname $<` && $(FLUID) -c `basename $<`
97 DONE := $(BOLD)$(GREEN)done$(SGR0)
100 # SRCS:=$(Timeline_SRCS)
101 # OBJS:=$(Timeline_OBJS)
102 # CXXFLAGS += $(Timeline_CFLAGS)
104 # FIXME: isn't there a better way?
105 $(OBJS): .config Makefile
107 TAGS: $(SRCS)
108 etags $(SRCS)
110 .deps: .config $(SRCS)
111 ifneq ($(CALCULATING),yes)
112 @ echo -n Calculating dependencies...
113 @ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
114 @ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
115 endif
117 clean_deps:
118 @ rm -f .deps
120 .PHONEY: clean config depend clean_deps
122 dist:
123 git archive --prefix=${BIN_NAME}-$(VERSION)/ v$(VERSION) | bzip2 > ${BIN_NAME}-$(VERSION).tar.bz2
125 scan-gpl:
126 @ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
128 -include .deps