# libaudiomask - hybrid simultaneous audio masking threshold evaluation library
#    Copyright (C) 2000-2010  Dr Matthew Raphael Flax
#
#    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 3 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.  If not, see <http://www.gnu.org/licenses/>.

SRC=MooreSpread.cc AudioMask.cc AudioMasker.cc depukfb.cc 
HDR=$(SRC:.cc=.cc)
OBJ=$(SRC:.cc=.o)
.cc.o:
	$(CC) -fPIC -c $<
.C.o:
	$(CC) -fPIC -c $<

CC=g++ -O3 -Wall

MAKELIB=$(CC) -shared -Wl,-soname

all: $(OBJ) \
	libs \
	ex

libs:
	$(MAKELIB),libAudioMask.so.0.1 -o libAudioMask.so.0.1 $(OBJ)

ex:
	$(CC) -L/home/flatmax/lib -lfftw3 -lfft $(OBJ) -o AudioMaskerExample AudioMaskerExample.cc

clean:
	rm -f *~ $(OBJ) AudioMaskerExample AudioMaskExample MooreSpreadExample lib* *.mask *.dat *.pow w *.s

MooreSpread.o: MooreSpread.H
mask.o: MooreSpread.H mask.H
AudioMasker.o: AudioMasker.H ../depukfb/depukfb.H
