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.
|
|
|
|
|
|
|
|
# config
|
2008-02-13 17:23:19 +01:00
|
|
|
prefix=/usr/local/
|
|
|
|
|
|
|
|
SYSTEM_PATH=$(prefix)/share/non-sequencer/
|
|
|
|
DOCUMENT_PATH=$(prefix)/share/doc/non-sequencer/
|
2007-12-18 05:09:02 +01:00
|
|
|
USE_LASH=1
|
|
|
|
|
2008-02-13 17:10:41 +01:00
|
|
|
VERSION=1.9.0
|
|
|
|
|
2007-12-18 05:09:02 +01:00
|
|
|
# Debugging
|
2008-02-12 19:21:42 +01:00
|
|
|
CFLAGS:=-O0 -ggdb -fno-omit-frame-pointer -Wall
|
2007-12-18 05:09:02 +01:00
|
|
|
# Production
|
2008-02-12 19:21:42 +01:00
|
|
|
# CFLAGS:=-O3 -fomit-frame-pointer -DNDEBUG
|
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)\"
|
|
|
|
|
|
|
|
CXXFLAGS:=$(CFLAGS) -fno-exceptions -fno-rtti `fltk-config --cxxflags` `pkg-config jack --atleast-version 0.105 || echo -DJACK_MIDI_PROTO_API` `pkg-config jack --cflags` `pkg-config --cflags sigc++-2.0`
|
2008-02-12 19:08:17 +01:00
|
|
|
LIBS=`pkg-config --libs jack` `fltk-config --use-images --ldflags` `pkg-config --libs sigc++-2.0`
|
2007-12-18 05:09:02 +01:00
|
|
|
|
|
|
|
ifeq ($(USE_LASH),1)
|
|
|
|
LIBS+=-llash
|
|
|
|
CXXFLAGS+=-DUSE_LASH `pkg-config --cflags lash-1.0`
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
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-02-13 17:23:19 +01:00
|
|
|
.PHONEY: all clean install dist
|
2007-12-18 05:09:02 +01:00
|
|
|
|
|
|
|
all: non makedepend
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f non makedepend $(OBJS)
|
|
|
|
@ echo Done
|
|
|
|
|
2008-02-13 08:06:48 +01:00
|
|
|
valgrind:
|
|
|
|
valgrind ./non
|
|
|
|
|
2007-12-18 05:09:02 +01:00
|
|
|
.C.o:
|
|
|
|
@ echo -n "Compiling: "; tput bold; tput setaf 3; echo $<; tput sgr0; true
|
|
|
|
@ $(CXX) $(CXXFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
%.C : %.fl
|
|
|
|
@ cd gui && fluid -c ../$<
|
|
|
|
|
2008-02-13 17:12:40 +01:00
|
|
|
$(OBJS): Makefile
|
|
|
|
|
2007-12-18 05:09:02 +01:00
|
|
|
non: $(OBJS)
|
|
|
|
@ echo -n "Linking..."
|
|
|
|
@ rm -f $@
|
|
|
|
@ $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) -o $@ || (tput bold; tput setaf 1; echo Error!; tput sgr0)
|
|
|
|
@ test -x $@ && echo done.
|
|
|
|
|
|
|
|
install:
|
|
|
|
@ echo -n "Installing..."
|
2008-02-13 17:23:19 +01:00
|
|
|
@ install non $(prefix)/bin
|
2007-12-18 05:09:02 +01:00
|
|
|
@ mkdir -p "$(SYSTEM_PATH)"
|
|
|
|
@ cp -r instruments "$(SYSTEM_PATH)"
|
|
|
|
@ mkdir -p "$(DOCUMENT_PATH)"
|
|
|
|
@ cp doc/*.{html,png} "$(DOCUMENT_PATH)"
|
|
|
|
@ echo done
|
|
|
|
# make -C doc install
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
makedepend: $(SRCS)
|
|
|
|
@ echo -n Checking dependencies...
|
|
|
|
@ makedepend -f- -- $(CXXFLAGS) -- $(SRCS) > makedepend 2>/dev/null && echo done.
|
|
|
|
|
|
|
|
|
|
|
|
include makedepend
|