non/Makefile

142 lines
3.9 KiB
Makefile
Raw Normal View History

2008-02-14 06:47:12 +01:00
2008-07-10 05:43:22 +02:00
###############################################################################
# Copyright (C) 2008 Jonathan Moore Liles #
# #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the #
# Free Software Foundation; either version 2 of the License, or (at your #
# option) any later version. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with This program; see the file COPYING. If not,write to the Free Software #
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
###############################################################################
## Makefile for the Non-DAW.
##
## Do not edit this file; run `make config` instead.
##
2008-05-16 21:12:52 +02:00
2008-05-05 00:20:38 +02:00
VERSION := 0.5.0
all: .config
2008-05-16 21:12:52 +02:00
.config: configure
2008-05-16 21:12:52 +02:00
@ ./configure
2008-05-15 02:48:46 +02:00
2008-05-21 17:20:01 +02:00
config:
@ ./configure
-include .config
2008-07-19 19:06:47 +02:00
export SYSTEM_PATH:=$(prefix)/share/non-daw/
export DOCUMENT_PATH:=$(prefix)/share/doc/non-daw/
export PIXMAP_PATH:=$(prefix)/share/pixmaps/non-daw/
# a bit of a hack to make sure this runs before any rules
ifneq ($(CALCULATING),yes)
TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
endif
2008-05-01 10:05:10 +02:00
2008-05-18 06:28:36 +02:00
ifeq ($(USE_DEBUG),yes)
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
2008-07-19 19:06:47 +02:00
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
2008-05-16 21:12:52 +02:00
else
2008-07-19 19:06:47 +02:00
CFLAGS := -pipe -O2 -DNDEBUG
CXXFLAGS := -fno-rtti -fno-exceptions
2008-05-16 21:12:52 +02:00
endif
2008-02-14 06:47:12 +01:00
ifeq ($(USE_UNOPTIMIZED_DRAWING),yes)
CFLAGS+=-DUSE_UNOPTIMIZED_DRAWING
endif
ifeq ($(USE_SINGLEBUFFERED_TIMELINE),yes)
CFLAGS+=-DUSE_SINGLEBUFFERED_TIMELINE
endif
2008-07-19 19:06:47 +02:00
CFLAGS+=-DVERSION=\"$(VERSION)\" \
-DINSTALL_PREFIX=\"$(prefix)\" \
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
CXXFLAGS += $(SNDFILE_CFLAGS) $(LASH_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS)
2008-07-19 19:06:47 +02:00
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
INCLUDES := -I. -Iutil -IFL -Inonlib
2008-05-01 10:05:10 +02:00
include scripts/colors
ifneq ($(CALCULATING),yes)
COMPILING="$(BOLD)$(BLACK)[$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) Compiling: $(BOLD)$(YELLOW)$<$(SGR0)"
else
COMPILING="Compiling: $<"
endif
2008-05-01 10:05:10 +02:00
.C.o:
@ echo $(COMPILING)
2008-05-01 10:05:10 +02:00
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
%.C : %.fl
2008-05-05 07:42:26 +02:00
@ cd `dirname $<` && fluid -c ../$<
2008-05-01 10:05:10 +02:00
2008-05-16 22:52:10 +02:00
DONE := $(BOLD)$(GREEN)done$(SGR0)
2008-05-01 10:05:10 +02:00
include FL/makefile.inc
include nonlib/makefile.inc
2008-05-01 10:05:10 +02:00
include Timeline/makefile.inc
SRCS:=$(FL_SRCS) $(nonlib_SRCS) $(Timeline_SRCS)
OBJS:=$(FL_OBJS) $(nonlib_OBJS) $(Timeline_OBJS)
2008-05-16 22:52:10 +02:00
# FIXME: isn't there a better way?
2008-07-10 05:43:22 +02:00
$(OBJS): .config Makefile
2008-05-01 10:05:10 +02:00
TAGS: $(SRCS)
etags $(SRCS)
.deps: .config $(SRCS)
2008-06-19 06:14:14 +02:00
ifneq ($(CALCULATING),yes)
2008-05-21 17:20:01 +02:00
@ echo -n Calculating dependencies...
2008-06-19 06:14:14 +02:00
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
endif
2008-05-01 10:05:10 +02:00
2008-07-19 19:06:47 +02:00
install: all
@ echo -n "Installing..."
@ install Timeline/timeline $(prefix)/bin/non-daw
# @ install Mixer/mixer $(prefix)/bin/non-mixer
2008-07-19 19:06:47 +02:00
@ mkdir -p $(SYSTEM_PATH)
@ mkdir -p $(PIXMAP_PATH)
@ cp pixmaps/*.png $(PIXMAP_PATH)
@ $(MAKE) -s -C doc install
@ echo "$(DONE)"
ifneq ($(USE_DEBUG),yes)
@ echo -n "Stripping..."
@ strip $(prefix)/bin/non-daw
# @ strip $(prefix)/bin/non-mixer
@ echo "$(DONE)"
endif
clean_deps:
@ rm -f .deps
2008-05-22 09:13:27 +02:00
2008-05-28 05:39:42 +02:00
.PHONEY: clean config depend clean_deps
2008-05-16 21:12:52 +02:00
clean: FL_clean nonlib_clean Timeline_clean
2008-03-20 08:18:59 +01:00
2008-05-28 05:39:42 +02:00
dist:
git archive --prefix=non-daw-$(VERSION)/ v$(VERSION) | bzip2 > non-daw-$(VERSION).tar.bz2
2008-05-28 00:14:37 +02:00
2008-06-16 03:16:55 +02:00
scan-gpl:
@ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
-include .deps