2007-12-18 05:09:02 +01:00
# Makefile for the Non Sequencer.
# Copyright 2007-2008 Jonathan Moore Liles
# This file is licencesd under version 2 of the GPL.
2008-05-18 18:16:47 +02:00
VERSION := 1.9.1
2008-05-18 19:15:11 +02:00
all : make .conf non -sequencer
2008-05-18 18:16:47 +02:00
make.conf : configure
@ ./configure
config :
@ ./configure
- i n c l u d e m a k e . c o n f
2008-02-13 17:23:19 +01:00
SYSTEM_PATH = $( prefix) /share/non-sequencer/
DOCUMENT_PATH = $( prefix) /share/doc/non-sequencer/
2008-02-13 17:10:41 +01:00
2008-05-18 18:16:47 +02:00
i f e q ( $( USE_DEBUG ) , y e s )
CXXFLAGS := -pipe -ggdb -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
e l s e
CXXFLAGS := -pipe -O3 -fno-rtti -fno-exceptions -DNDEBUG
e n d i f
2007-12-18 05:09:02 +01:00
2008-02-13 17:10:41 +01:00
CFLAGS += -DVERSION= \" $( VERSION) \" \
2008-02-13 17:23:19 +01:00
-DINSTALL_PREFIX= \" $( prefix) \" \
2007-12-18 05:09:02 +01:00
-DSYSTEM_PATH= \" $( SYSTEM_PATH) \" \
-DDOCUMENT_PATH= \" $( DOCUMENT_PATH) \"
2008-05-18 18:16:47 +02:00
CXXFLAGS := $( CFLAGS) $( CXXFLAGS) $( FLTK_CFLAGS) $( sigcpp_CFLAGS) $( LASH_CFLAGS)
2007-12-18 05:09:02 +01:00
2008-05-18 18:16:47 +02:00
LIBS := $( FLTK_LIBS) $( JACK_LIBS) $( LASH_LIBS) $( sigcpp_LIBS)
i f e q ( $( JACK_MIDI_PROTO_API ) , y e s )
CXXFLAGS += -DJACK_MIDI_PROTO_API
2007-12-18 05:09:02 +01:00
e n d i f
2008-03-22 21:20:34 +01:00
# uncomment this line to print each playback event to the console (not RT safe)
# CXXFLAGS+= -DDEBUG_EVENTS
2007-12-18 05:09:02 +01:00
SRCS = \
canvas.C \
debug.C \
event.C \
event_list.C \
grid.C \
gui/draw.C \
gui/event_edit.C \
gui/input.C \
gui/ui.C \
gui/widgets.C \
instrument.C \
jack.C \
lash.C \
main.C \
mapping.C \
midievent.C \
pattern.C \
phrase.C \
scale.C \
sequence.C \
smf.C \
transport.C
OBJS = $( SRCS:.C= .o)
2008-05-18 18:16:47 +02:00
.PHONEY : all clean install dist valgrind config
2007-12-18 05:09:02 +01:00
clean :
2008-05-18 19:15:11 +02:00
rm -f non-sequencer makedepend $( OBJS)
2008-05-18 18:16:47 +02:00
@ echo " $( DONE) "
2007-12-18 05:09:02 +01:00
2008-02-13 08:06:48 +01:00
valgrind :
2008-05-18 19:15:11 +02:00
valgrind ./non-sequencer
2008-02-13 08:06:48 +01:00
2008-05-18 18:16:47 +02:00
i n c l u d e s c r i p t s / c o l o r s
2007-12-18 05:09:02 +01:00
.C.o :
2008-05-18 18:16:47 +02:00
@ echo " Compiling: $( BOLD) $( YELLOW) $< $( SGR0) "
2007-12-18 05:09:02 +01:00
@ $( CXX) $( CXXFLAGS) -c $< -o $@
%.C : %.fl
2008-05-18 18:16:47 +02:00
@ cd ` dirname $<` && fluid -c ../$<
2007-12-18 05:09:02 +01:00
2008-05-18 18:16:47 +02:00
$(OBJS) : make .conf
DONE := $( BOLD) $( GREEN) done $( SGR0)
2008-02-13 17:12:40 +01:00
2008-05-18 19:15:11 +02:00
non-sequencer : $( OBJS )
2007-12-18 05:09:02 +01:00
@ echo -n "Linking..."
@ rm -f $@
2008-05-18 18:16:47 +02:00
@ $( CXX) $( CXXFLAGS) $( LIBS) $( OBJS) -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
2007-12-18 05:09:02 +01:00
2008-02-14 20:33:06 +01:00
install : all
2007-12-18 05:09:02 +01:00
@ echo -n "Installing..."
2008-05-18 19:15:11 +02:00
@ install non-sequencer $( prefix) /bin
2007-12-18 05:09:02 +01:00
@ mkdir -p " $( SYSTEM_PATH) "
@ cp -r instruments " $( SYSTEM_PATH) "
@ mkdir -p " $( DOCUMENT_PATH) "
2008-02-14 17:09:15 +01:00
@ cp doc/*.html doc/*.png " $( DOCUMENT_PATH) "
2008-05-18 18:16:47 +02:00
@ echo " $( DONE) "
2007-12-18 05:09:02 +01:00
2008-02-13 17:23:19 +01:00
dist :
git archive --prefix= non-sequencer-$( VERSION) / v$( VERSION) | bzip2 > non-sequencer-$( VERSION) .tar.bz2
2007-12-18 05:09:02 +01:00
TAGS : $( SRCS )
etags $( SRCS)
2008-05-18 18:16:47 +02:00
makedepend : make .conf $( SRCS )
2007-12-18 05:09:02 +01:00
@ echo -n Checking dependencies...
2008-05-18 18:16:47 +02:00
@ makedepend -f- -- $( CXXFLAGS) -- $( SRCS) > makedepend 2>/dev/null && echo " $( DONE) "
2007-12-18 05:09:02 +01:00
2008-05-18 18:16:47 +02:00
- i n c l u d e m a k e d e p e n d