automatic commit
[folded-ctf.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..7fc3339
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,89 @@
+
+#########################################################################
+# This program is free software: you can redistribute it and/or modify  #
+# it under the terms of the version 3 of the GNU General Public License #
+# as published by the Free Software Foundation.                                #
+#                                                                      #
+# 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/>.  #
+#                                                                      #
+# Written by Francois Fleuret, (C) IDIAP                               #
+# Contact <francois.fleuret@idiap.ch> for comments & bug reports        #
+#########################################################################
+
+CXX=g++-4.1
+
+ifeq ($(STATIC),yes)
+  LDFLAGS=-static -lm -ljpeg -lpng -lz
+else
+  LDFLAGS=-lm -ljpeg -lpng
+endif
+
+ifeq ($(DEBUG),yes)
+  OPTIMIZE_FLAG = -ggdb3 -DDEBUG
+else
+  OPTIMIZE_FLAG = -ggdb3 -O3
+endif
+
+ifeq ($(PROFILE),yes)
+  PROFILE_FLAG = -pg
+endif
+
+CXXFLAGS = -Wall $(OPTIMIZE_FLAG) $(PROFILE_FLAG)
+
+# ifeq ($(CURSES),yes)
+#   LDFLAGS=$(LDFLAGS) -lncurses
+#   CXXFLAGS = $(CXXFLAGS) -DWITH_CURSES
+# endif
+
+all: folding list_to_pool TAGS
+
+TAGS: *.cc *.h
+       etags --members -l c++ *.cc *.h
+
+folding: misc.o interval.o gaussian.o fusion_sort.o global.o tools.o \
+        progress_bar.o chrono.o \
+         jpeg_misc.o rgb_image.o rgb_image_subpixel.o param_parser.o \
+         shared.o \
+         storable.o \
+         image.o rich_image.o \
+         labelled_image.o \
+        labelled_image_pool.o labelled_image_pool_file.o labelled_image_pool_subset.o \
+         pose.o pose_cell.o pose_cell_set.o pose_cell_scored_set.o \
+         parsing.o parsing_pool.o \
+        pose_cell_hierarchy.o pose_cell_hierarchy_reader.o \
+         pi_referential.o pi_feature.o pi_feature_family.o \
+         sample_set.o \
+         shared_responses.o \
+        classifier.o classifier_reader.o \
+        detector.o \
+        loss_machine.o decision_tree.o boosted_classifier.o \
+        error_rates.o \
+         materials.o \
+        folding.o
+       $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
+
+list_to_pool: misc.o interval.o fusion_sort.o shared.o global.o progress_bar.o \
+         storable.o \
+         jpeg_misc.o rgb_image.o param_parser.o \
+         image.o rich_image.o \
+         pose.o pose_cell.o \
+         labelled_image.o labelled_image_pool.o \
+        list_to_pool.o
+       $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
+
+Makefile.depend: *.h *.cc Makefile
+       $(CC) -M *.cc > Makefile.depend
+
+archive:
+       cd .. && tar zcvf folding-gpl.tgz folding/*.{cc,h,sh,txt} folding/Makefile folding/gpl-3.0.txt
+
+clean:
+       \rm -f folding list_to_pool *.o Makefile.depend TAGS
+
+-include Makefile.depend