1
# Copyright (C) 2003-2010 Fons Adriaensen <fons@kokkinizita.net>
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
22
DISTDIR = aeolus-$(VERSION)
23
CPPFLAGS += -O3 -Wall -MMD -MP -DVERSION=\"$(VERSION)\" -DLIBDIR=\"$(PREFIX)/$(LIBDIR)\"
24
CPPFLAGS += -march=native
26
all: aeolus aeolus_x11.so aeolus_txt.so
29
AEOLUS_O = main.o audio.o model.o slave.o imidi.o addsynth.o scales.o \
30
reverb.o asection.o division.o rankwave.o rngen.o exp2ap.o lfqueue.o
31
aeolus: LDLIBS += -lclalsadrv -lclthreads -lpthread -ljack -lasound -lpthread -lrt
32
aeolus: LDFLAGS += -L$(PREFIX)/$(LIBDIR)
34
g++ $(LDFLAGS) -o $@ $(AEOLUS_O) $(LDLIBS)
36
addsynth.o: CPPFLAGS += -fpic -D_REENTRANT
38
-include $(AEOLUS_O:%.o=%.d)
41
XIFACE_O = styles.o mainwin.o midiwin.o audiowin.o instrwin.o editwin.o midimatrix.o \
42
multislider.o functionwin.o xiface.o addsynth.o
43
aeolus_x11.so: CPPFLAGS += -fpic -D_REENTRANT -I/usr/X11R6/include -I/usr/include/freetype2
44
aeolus_x11.so: LDLIBS += -lclthreads -lclxclient -lXft -lX11
45
aeolus_x11.so: LDFLAGS += -shared -L$(PREFIX)/$(LIBDIR) -L/usr/X11R6/$(LIBDIR)
46
aeolus_x11.so: $(XIFACE_O) $(LIBCLX)
47
g++ $(LDFLAGS) -o $@ $(XIFACE_O) $(LDLIBS)
50
-include $(XIFACE_O:%.o=%.d)
54
aeolus_txt.so: CPPFLAGS += -fpic -D_REENTRANT
55
aeolus_txt.so: LDLIBS += -lclthreads -lreadline
56
aeolus_txt.so: LDFLAGS += -shared -L$(PREFIX)/$(LIBDIR)
57
aeolus_txt.so: $(TIFACE_O)
58
g++ $(LDFLAGS) -o $@ $(TIFACE_O) $(LDLIBS)
61
-include $(TIFACE_O:%.o=%.d)
64
install: aeolus aeolus_x11.so aeolus_txt.so
65
install -Dm 755 aeolus $(DESTDIR)$(PREFIX)/bin/aeolus
66
install -Dm 755 aeolus_x11.so $(DESTDIR)$(PREFIX)/$(LIBDIR)/aeolus_x11.so
67
install -Dm 755 aeolus_txt.so $(DESTDIR)$(PREFIX)/$(LIBDIR)/aeolus_txt.so
68
/sbin/ldconfig $(PREFIX)/$(LIBDIR)
72
/bin/rm -f *~ *.o *.d *.a *.so aeolus