Initial commit.
[clueless-kmeans.git] / Makefile
1
2 # clueless-kmean is a variant of k-mean which enforces balanced
3 # distribution of classes in every cluster
4 #
5 # Copyright (c) 2013 Idiap Research Institute, http://www.idiap.ch/
6 # Written by Francois Fleuret <francois.fleuret@idiap.ch>
7 #
8 # This file is part of clueless-kmean.
9 #
10 # clueless-kmean is free software: you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # version 3 as published by the Free Software Foundation.
13 #
14 # clueless-kmean is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with selector.  If not, see <http://www.gnu.org/licenses/>.
21
22 ifeq ($(STATIC),yes)
23   LDFLAGS=-static -lm -ljpeg -lpng -lz -lglpk
24 else
25   LDFLAGS= -lm -ljpeg -lpng -lz -lglpk
26 endif
27
28 ifeq ($(DEBUG),yes)
29   OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
30 else
31   OPTIMIZE_FLAG = -ggdb3 -O3
32 endif
33
34 ifeq ($(PROFILE),yes)
35   PROFILE_FLAG = -pg
36 endif
37
38 CXXFLAGS = -Wall $(OPTIMIZE_FLAG) $(PROFILE_FLAG) $(CXXGLPK)
39
40 # LDFLAGS=-lglpk
41
42 all: clueless-kmean
43
44 clueless-kmean: \
45         misc.o \
46         sample_set.o \
47         clusterer.o \
48         clueless-kmean.o
49         $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
50
51 clean:
52         rm -f *.o clueless-kmean