#################################################################################
#	Desmsd, MOEA with added diversity in descision space			#
#										#
#    Copyright (C) 2008  Matthias Jung (matthias.jung@tu-dortmund.de)		#
#										#
#	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/>.	#
#										#
#################################################################################

CC = g++
STRIP = sstrip32
LANG = C

FLAGS = -Wall -Wextra -ansi -pedantic -c -g
CFLAGS = -O2 -march=i686 -pipe
CPPFLAGS = -O2 -march=i686 -pipe
EXTFLAGS = -Wall -Wextra -c -g
LDFLAGS =

LIBS = boost_filesystem

all:		diversity nondomfilter hvset

diversity:	diversity.o diversity.h
		$(CC) diversity.o -o diversity $(addprefix -l,$(LIBS)) -lm $(LDFLAGS)

nondomfilter:	nondomfilter.o nondomfilter.h
		$(CC) nondomfilter.o -o nondomfilter $(addprefix -l,$(LIBS)) -lm $(LDFLAGS)

hvset:		hvset.o Hypervolume.o hvset.h ../hv/Hypervolume.h
		$(CC) hvset.o Hypervolume.o -o hvset $(addprefix -l,$(LIBS)) -lm $(LDFLAGS)

clean:
		rm -f *.o *~ diversity hvset nondomfilter

diversity.o:	diversity.cpp diversity.h
		$(CC) $(FLAGS) $(CPPFLAGS) diversity.cpp

nondomfilter.o:	nondomfilter.cpp nondomfilter.h
		$(CC) $(FLAGS) $(CPPFLAGS) nondomfilter.cpp

hvset.o:	hvset.cpp hvset.h ../hv/Hypervolume.h
		$(CC) $(FLAGS) $(CPPFLAGS) hvset.cpp

Hypervolume.o:	../hv/Hypervolume.cpp ../hv/Hypervolume.h
		$(CC) $(FLAGS) $(CPPFLAGS) ../hv/Hypervolume.cpp
