2010-02-01 07:25:16 +01: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.
|
|
|
|
##
|
|
|
|
|
2010-02-01 07:30:33 +01:00
|
|
|
VERSION := 1.0.0
|
2010-02-01 10:50:38 +01:00
|
|
|
PACKAGE := MIXER
|
2010-02-01 07:25:16 +01:00
|
|
|
|
|
|
|
all: .config
|
|
|
|
|
|
|
|
.config: configure
|
2010-02-01 10:50:38 +01:00
|
|
|
@ echo '<<< Configuring '$(PACKAGE)
|
2010-02-01 07:25:16 +01:00
|
|
|
@ ./configure
|
|
|
|
|
|
|
|
config:
|
2010-02-01 10:50:38 +01:00
|
|
|
@ echo '<<< Configuring '$(PACKAGE)
|
2010-02-01 07:25:16 +01:00
|
|
|
@ ./configure
|
|
|
|
|
|
|
|
-include .config
|
|
|
|
|
|
|
|
export SYSTEM_PATH:=$(prefix)/share/
|
|
|
|
export DOCUMENT_PATH:=$(prefix)/share/doc/
|
|
|
|
export PIXMAP_PATH:=$(prefix)/share/pixmaps/
|
2012-02-29 06:24:51 +01:00
|
|
|
export ICON_PATH:=$(prefix)/share/icons/
|
|
|
|
export DESKTOP_PATH:=$(prefix)/share/applications/
|
|
|
|
|
2010-02-01 07:25:16 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
ifeq ($(USE_DEBUG),yes)
|
|
|
|
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
|
|
|
|
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
|
|
|
|
else
|
|
|
|
CFLAGS := -pipe -O2 -DNDEBUG
|
|
|
|
CXXFLAGS := -fno-rtti -fno-exceptions
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS+=-DVERSION=\"$(VERSION)\" \
|
|
|
|
-DINSTALL_PREFIX=\"$(prefix)\" \
|
|
|
|
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
|
|
|
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
|
|
|
|
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
|
|
|
|
|
|
|
|
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
|
|
|
|
|
|
|
INCLUDES := -I. -Iutil -IFL -Inonlib
|
|
|
|
|
|
|
|
include scripts/colors
|
|
|
|
|
|
|
|
ifneq ($(CALCULATING),yes)
|
2010-02-01 10:50:38 +01:00
|
|
|
COMPILING="$(BOLD)$(BLACK)MIXER [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)"
|
2010-02-01 07:25:16 +01:00
|
|
|
else
|
|
|
|
COMPILING="Compiling: $<"
|
|
|
|
endif
|
|
|
|
|
|
|
|
.C.o:
|
|
|
|
@ echo $(COMPILING)
|
|
|
|
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
|
|
|
|
|
|
|
|
%.C : %.fl
|
|
|
|
@ cd `dirname $<` && fluid -c ../$<
|
|
|
|
|
|
|
|
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
|
|
|
|
|
|
|
include FL/makefile.inc
|
2010-02-01 10:50:38 +01:00
|
|
|
#include nonlib/makefile.inc
|
2010-02-01 07:25:16 +01:00
|
|
|
include makefile.inc
|
|
|
|
|
2010-02-01 10:50:38 +01:00
|
|
|
SRCS:=$(Mixer_SRCS)
|
|
|
|
OBJS:=$(Mixer_OBJS)
|
2012-02-26 02:22:42 +01:00
|
|
|
CXXFLAGS += $(Mixer_CFLAGS)
|
2010-02-01 07:25:16 +01:00
|
|
|
|
|
|
|
# FIXME: isn't there a better way?
|
|
|
|
$(OBJS): .config Makefile
|
|
|
|
|
|
|
|
TAGS: $(SRCS)
|
|
|
|
etags $(SRCS)
|
|
|
|
|
|
|
|
.deps: .config $(SRCS)
|
|
|
|
ifneq ($(CALCULATING),yes)
|
|
|
|
@ echo -n Calculating dependencies...
|
|
|
|
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
|
|
|
|
@ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
install: all
|
|
|
|
@ echo -n "Installing..."
|
2012-02-29 06:24:51 +01:00
|
|
|
@ install src/mixer "$(DESTDIR)$(prefix)"/bin/non-mixer
|
|
|
|
@ mkdir -p "$(DESTDIR)$(SYSTEM_PATH)"/non-mixer
|
2010-02-01 07:25:16 +01:00
|
|
|
@ $(MAKE) -s -C doc install
|
2012-02-29 06:24:51 +01:00
|
|
|
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-mixer"
|
|
|
|
@ install -m 644 icons/hicolor/256x256/apps/non-mixer.png "$(DESTDIR)$(PIXMAP_PATH)"/non-mixer/icon-256x256.png
|
|
|
|
@ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
|
|
|
|
@ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
|
|
|
|
@ install -d "$(DESTDIR)$(DESKTOP_PATH)"
|
|
|
|
@ sed 's:@BIN_PATH@:$(prefix)/bin:' non-mixer.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-mixer.desktop"
|
2010-02-01 07:25:16 +01:00
|
|
|
@ echo "$(DONE)"
|
|
|
|
ifneq ($(USE_DEBUG),yes)
|
|
|
|
@ echo -n "Stripping..."
|
2012-02-29 06:24:51 +01:00
|
|
|
@ strip $(DESTDIR)$(prefix)/bin/non-mixer
|
2010-02-01 07:25:16 +01:00
|
|
|
@ echo "$(DONE)"
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean_deps:
|
|
|
|
@ rm -f .deps
|
|
|
|
|
|
|
|
.PHONEY: clean config depend clean_deps
|
|
|
|
|
2010-02-01 10:50:38 +01:00
|
|
|
clean: FL_clean Mixer_clean
|
2010-02-01 07:25:16 +01:00
|
|
|
|
|
|
|
dist:
|
|
|
|
git archive --prefix=non-mixer-$(VERSION)/ v$(VERSION) | bzip2 > non-mixer-$(VERSION).tar.bz2
|
|
|
|
|
|
|
|
scan-gpl:
|
|
|
|
@ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
|
|
|
|
|
|
|
|
-include .deps
|