automatic commit
[folded-ctf.git] / Makefile
1
2 ########################################################################
3 #                                                                      #
4 #  folded-ctf is an implementation of the folded hierarchy of          #
5 #  classifiers for object detection, developed by Francois Fleuret     #
6 #  and Donald Geman.                                                   #
7 #                                                                      #
8 #  Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/   #
9 #  Written by Francois Fleuret <francois.fleuret@idiap.ch>             #
10 #                                                                      #
11 #  This file is part of folded-ctf.                                    #
12 #                                                                      #
13 #  folded-ctf is free software: you can redistribute it and/or modify  #
14 #  it under the terms of the GNU General Public License version 3 as   #
15 #  published by the Free Software Foundation.                          #
16 #                                                                      #
17 #  folded-ctf is distributed in the hope that it will be useful, but   #
18 #  WITHOUT ANY WARRANTY; without even the implied warranty of          #
19 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   #
20 #  General Public License for more details.                            #
21 #                                                                      #
22 #  You should have received a copy of the GNU General Public License   #
23 #  along with folded-ctf.  If not, see <http://www.gnu.org/licenses/>. #
24 #                                                                      #
25 ########################################################################
26
27 ifeq ($(STATIC),yes)
28   LDFLAGS=-static -lm -ljpeg -lpng -lz
29 else
30   LDFLAGS=-lm -ljpeg -lpng
31 endif
32
33 ifeq ($(DEBUG),yes)
34   OPTIMIZE_FLAG = -ggdb3 -DDEBUG
35 else
36   OPTIMIZE_FLAG = -ggdb3 -O3
37 endif
38
39 ifeq ($(PROFILE),yes)
40   PROFILE_FLAG = -pg
41 endif
42
43 CXXFLAGS = -Wall $(OPTIMIZE_FLAG) $(PROFILE_FLAG)
44
45 all: folding list_to_pool TAGS
46
47 TAGS: *.cc *.h
48         etags --members -l c++ *.cc *.h
49
50 folding: misc.o interval.o gaussian.o fusion_sort.o global.o tools.o \
51          progress_bar.o \
52          jpeg_misc.o rgb_image.o rgb_image_subpixel.o param_parser.o \
53          shared.o \
54          storable.o \
55          image.o rich_image.o \
56          labelled_image.o \
57          labelled_image_pool.o labelled_image_pool_file.o labelled_image_pool_subset.o \
58          pose.o pose_cell.o pose_cell_set.o pose_cell_scored_set.o \
59          parsing.o parsing_pool.o \
60          pose_cell_hierarchy.o pose_cell_hierarchy_reader.o \
61          pi_referential.o pi_feature.o pi_feature_family.o \
62          sample_set.o \
63          shared_responses.o \
64          classifier.o classifier_reader.o \
65          detector.o \
66          loss_machine.o decision_tree.o boosted_classifier.o \
67          error_rates.o \
68          materials.o \
69          folding.o
70         $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
71
72 list_to_pool: misc.o interval.o fusion_sort.o shared.o global.o progress_bar.o \
73          storable.o \
74          jpeg_misc.o rgb_image.o param_parser.o \
75          image.o rich_image.o \
76          pose.o pose_cell.o \
77          labelled_image.o labelled_image_pool.o \
78          list_to_pool.o
79         $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
80
81 Makefile.depend: *.h *.cc Makefile
82         $(CC) -M *.cc > Makefile.depend
83
84 archive:
85         cd .. && tar zcvf folding-gpl.tgz folding/{*.{cc,h,sh,txt},Makefile}
86
87 clean:
88         \rm -f folding list_to_pool *.o Makefile.depend TAGS
89
90 -include Makefile.depend