# Speaker Recognition Makefile Linux by Ville Hautamki, 2001-2002
#   
# Whole project by:  
#
# by Ville Hautamki <villeh@cs.joensuu.fi>, 2001-2002
#    Teemu Kilpelinen <tkilpela@cs.joensuu.fi>, 2000-2001
#    Tomi Kinnunen     <tkinnu@cs.joensuu.fi>
#    Ismo Krkkinen   <iak@cs.joensuu.fi>
#
INSTALLDIR = /usr/local/bin
OPTIONS = -Wall
LINKOPT = -lm  -lfftw -lsndfile 
OBJECTS = util.o audio_io.o signal.o preprocess.o frame.o feature_extraction.o matrix.o pattern.o misc.o fvec.o textfile.o mel-functions.o memctrl.o random.o distortion.o clustering.o list.o csv.o speakerid.o dct.o cmdline.o

# NOTE!!! For .DLL (WIN) or .so (in UNIX) DO NOT link in getopt1.o, getopt.o
# and cmdline.o those are only neede for commandline progs.


.suffixes: .c

.c.o:
	gcc -c $(OPTIONS) $<

# For normal build
default: adduser removeuser identifyuser featextract

# For cleaning un necessary files after build
clean: 
	rm -f $(OBJECTS) adduser removeuser identifyuser featextract adduser.o removeuser.o identifyuser.o featextract.o 2> /dev/null

# For building all Speaker Recognition binaries
adduser:$(OBJECTS)
	gcc -o adduser $(OPTIONS) $(OBJECTS) adduser.c $(LINKOPT)

removeuser:$(OBJECTS)
	gcc -o removeuser $(OPTIONS) $(OBJECTS) removeuser.c $(LINKOPT)

identifyuser:$(OBJECTS)
	gcc -o identifyuser $(OPTIONS) $(OBJECTS) identifyuser.c $(LINKOPT)

featextract:$(OBJECTS)
	gcc -o featextract $(OPTIONS) $(OBJECTS) featextract.c $(LINKOPT)

install:
	@ cp adduser $(INSTALLDIR)
	@ cp removeuser $(INSTALLDIR)
	@ cp identifyuser $(INSTALLDIR)
	@ cp featextract $(INSTALLDIR)

# Make dependency information
depend:
	@makedepend *.c 2> /dev/null          






