Bring Non-Sequencer's build system in line with Non-DAW and Non-Mixer.

This commit is contained in:
Jonathan Moore Liles 2012-03-04 22:18:11 -08:00
parent d4bacf444a
commit ca64e0fef8
5 changed files with 14 additions and 157 deletions

View File

@ -83,7 +83,7 @@ endif
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
%.C : %.fl
@ cd `dirname $<` && fluid -c ../$<
@ cd `dirname $<` && fluid -c `basename $<`
DONE := $(BOLD)$(GREEN)done$(SGR0)

View File

@ -16,9 +16,15 @@
# 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. #
if [ -d .git ]
if [ "$#" = 0 ]
then
ID="`[ \`git rev-parse HEAD\` = \`git rev-parse v${2}\` ] || git rev-parse --short HEAD`"
echo "Usage: $0 [output_file.h] [version]"
fi
if [ -d ../.git ]
then
ID=`git log -1 --format=%h -- .`
# ID="`[ \`git rev-parse HEAD\` = \`git rev-parse v${2}\` ] || git rev-parse --short HEAD`"
if [ -n "$ID" ]
then
ID="git {$ID}"

View File

@ -1,144 +0,0 @@
###############################################################################
# Copyright (C) 2007-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 Sequencer.
#
# Do not edit this file; run `make config` instead.
#
VERSION := 1.9.4
all: .config non-sequencer
.config: configure
@ ./configure
config:
@ ./configure
-include .config
SYSTEM_PATH=$(prefix)/share/non-sequencer/
DOCUMENT_PATH=$(prefix)/share/doc/non-sequencer/
PIXMAP_PATH:=$(prefix)/share/pixmaps/non-sequencer/
ICON_PATH:=$(prefix)/share/icons/
DESKTOP_PATH:=$(prefix)/share/applications/
# 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)
CXXFLAGS := -pipe -ggdb -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
else
CXXFLAGS := -pipe -O2 -fno-rtti -fno-exceptions -DNDEBUG
endif
CFLAGS+=-DINSTALL_PREFIX=\"$(prefix)\" \
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
CXXFLAGS:=$(CFLAGS) $(CXXFLAGS) $(FLTK_CFLAGS) $(SIGCPP_CFLAGS) $(LIBLO_CFLAGS) $(XPM_CFLAGS)
LIBS:=$(FLTK_LIBS) $(JACK_LIBS) $(SIGCPP_LIBS) $(LIBLO_LIBS) $(XPM_LIBS)
ifeq ($(JACK_MIDI_PROTO_API),yes)
CXXFLAGS+=-DJACK_MIDI_PROTO_API
endif
# uncomment this line to print each playback event to the console (not RT safe)
# CXXFLAGS+= -DDEBUG_EVENTS
SRCS:=$(wildcard src/*.C src/gui/*.fl src/gui/*.C src/NSM/*.C)
SRCS:=$(SRCS:.fl=.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
.PHONEY: all clean install dist valgrind config
clean:
rm -f non-sequencer .deps $(OBJS)
@ echo "$(DONE)"
valgrind:
valgrind ./non-sequencer
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
.C.o:
@ echo $(COMPILING)
@ $(CXX) $(CXXFLAGS) -c $< -o $@
%.C : %.fl
@ cd $(dir $<) && fluid -c $(notdir $<)
$(OBJS): .config
DONE:=$(BOLD)$(GREEN)done$(SGR0)
non-sequencer: $(OBJS)
@ echo -n "Linking..."
@ rm -f $@
@ scripts/build_id .version.c $(VERSION)
@ $(CXX) -c .version.c
@ $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) .version.o -o $@ || echo "$(BOLD)$(RED)Error!$(SGR0)"
@ 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
install: all
@ echo -n "Installing..."
@ install -d $(DESTDIR)$(prefix)/bin
@ install -m 755 non-sequencer $(DESTDIR)$(prefix)/bin
@ install -d "$(DESTDIR)$(SYSTEM_PATH)/instruments"
@ install -m 644 instruments/* "$(DESTDIR)$(SYSTEM_PATH)/instruments"
@ install -d "$(DESTDIR)$(DOCUMENT_PATH)"
@ install -m 644 doc/*.html doc/*.png "$(DESTDIR)$(DOCUMENT_PATH)"
@ install -d "$(DESTDIR)$(PIXMAP_PATH)"
@ install -m 644 icons/hicolor/256x256/apps/non-sequencer.png "$(DESTDIR)$(PIXMAP_PATH)"/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-sequencer.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-sequencer.desktop"
@ echo "$(DONE)"
ifneq ($(USE_DEBUG),yes)
@ echo -n "Stripping..."
@ strip $(DESTDIR)$(prefix)/bin/non-sequencer
@ echo "$(DONE)"
endif
dist:
git archive --prefix=non-sequencer-$(VERSION)/ v$(VERSION) | bzip2 > non-sequencer-$(VERSION).tar.bz2
TAGS: $(SRCS)
etags $(SRCS)
.deps: .config $(SRCS)
@ echo -n Calculating dependencies...
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) > .deps 2>/dev/null && echo $(DONE)
-include .deps

1
sequencer/Makefile Symbolic link
View File

@ -0,0 +1 @@
scripts/Makefile

View File

@ -46,12 +46,6 @@ decl {\#include "../NSM.H"} {private local
decl {extern NSM_Client *nsm;} {private local
}
decl {extern const char *BUILD_ID;} {private local
}
decl {extern const char *VERSION;} {private local
}
decl {extern UI *ui;} {private local
}
@ -1162,7 +1156,7 @@ You should have received a copy of the GNU General Public License along with thi
Fl_Box {} {
label label
xywh {185 337 153 22} color 51 labelfont 4 labelcolor 52
code2 {o->label( BUILD_ID );}
code2 {o->label( "" );}
}
}
}

View File

@ -38,8 +38,8 @@
#include "../icons/icon-16x16.xpm"
#endif
extern const char *BUILD_ID;
extern const char *VERSION;
// extern const char *BUILD_ID;
// extern const char *VERSION;
const double NSM_CHECK_INTERVAL = 0.25f;
@ -237,7 +237,7 @@ main ( int argc, char **argv )
asprintf( &config.user_config_dir, "%s/%s", getenv( "HOME" ), USER_CONFIG_DIR );
mkdir( config.user_config_dir, 0777 );
printf( "%s %s %s -- %s\n", APP_TITLE, VERSION, BUILD_ID, COPYRIGHT );
printf( "%s %s %s -- %s\n", APP_TITLE, VERSION, "", COPYRIGHT );
playlist = new sequence;