Makefile
author Dmitriy Morozov <dmitriy@mrzv.org>
Fri, 17 Jul 2009 13:54:30 -0700 (2009-07-17)
changeset 3 f1e962ffa1c2
parent 2 689462154b3a
child 4 c2859a25fad6
permissions -rw-r--r--
ANNkd_tree:annkSearch() is reentrant, in particular it works with OpenMP
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     1
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     2
# Top-level Makefile for ANN.
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     3
#
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     4
# ANN: Approximate Nearest Neighbors
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     5
# Version: 1.1 05/03/05
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     6
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     7
# Copyright (c) 1997-2005 University of Maryland and Sunil Arya and
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     8
# David Mount.  All Rights Reserved.
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
     9
# 
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    10
# This software and related documentation is part of the Approximate
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    11
# Nearest Neighbor Library (ANN).  This software is provided under
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    12
# the provisions of the Lesser GNU Public License (LGPL).  See the
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    13
# file ../ReadMe.txt for further information.
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    14
# 
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    15
# The University of Maryland (U.M.) and the authors make no
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    16
# representations about the suitability or fitness of this software for
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    17
# any purpose.  It is provided "as is" without express or implied
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    18
# warranty.
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    19
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    20
# Revision 0.1  09/06/97
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    21
#	alpha release
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    22
# Revision 0.2  06/26/98
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    23
#	Minor changes to fix compilation errors on SGI systems.
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    24
# Revision 1.0  04/01/05
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    25
#	Initial release (finally!)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    26
#	Added linux-g++ target
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    27
# Revision 1.1  05/03/05
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    28
#	Added macosx-g++ target
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    29
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    30
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    31
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    32
# default: list the options
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    33
# The following legacy targets are also available.
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    34
#	make sunos4		for Sun with SunOS 4.x
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    35
#	make sunos4-g++		for Sun with SunOS 4.x and g++
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    36
#	make alpha-g++		for DEC Alpha and g++
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    37
# The following targets are used for internal development only
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    38
#	make authors-debug	author's debugging
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    39
#	make authors-perf	author's performance evaluations
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    40
#	make distribution	author's generation of distribution file
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    41
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    42
default:
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    43
	@echo "Enter one of the following:"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    44
	@echo "  make linux-g++            for Linux and g++"
2
689462154b3a Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents: 0
diff changeset
    45
	@echo "  make linux-g++-sl         for Linux and g++, make shared libs"
0
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    46
	@echo "  make macosx-g++           for Mac OS X and g++"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    47
	@echo "  make sunos5               for Sun with SunOS 5.x"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    48
	@echo "  make sunos5-sl            for Sun with SunOS 5.x, make shared libs"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    49
	@echo "  make sunos5-g++           for Sun with SunOS 5.x and g++"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    50
	@echo "  make sunos5-g++-sl        for Sun with SunOS 5.x, g++, make shared libs"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    51
	@echo "  make clean                remove .o files"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    52
	@echo "  make realclean            remove .o, library and executable files"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    53
	@echo " "
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    54
	@echo "See file Makefile for other compilation options, such as disabling"
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    55
	@echo "performance measurement code."
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    56
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    57
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    58
# main make entry point
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    59
#-----------------------------------------------------------------------------
2
689462154b3a Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents: 0
diff changeset
    60
alpha-g++ macosx-g++ linux-g++ linux-g++-sl sgi sunos4 sunos4-g++ sunos5 sunos5-g++ sunos5-g++-sl authors-debug authors-perf:
0
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    61
	cd src ; $(MAKE) $@
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    62
	cd test ; $(MAKE) $@
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    63
	cd sample ; $(MAKE) $@
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    64
	cd ann2fig ; $(MAKE) $@
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    65
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    66
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    67
# Remove .o files and core files
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    68
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    69
clean:
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    70
	cd src ; $(MAKE) clean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    71
	cd test ; $(MAKE) clean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    72
	cd sample ; $(MAKE) clean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    73
	cd ann2fig ; $(MAKE) clean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    74
	cd doc ; $(MAKE) clean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    75
	cd MS_Win32; $(MAKE) clean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    76
	cd validate ; $(MAKE) clean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    77
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    78
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    79
# Remove everthing that can be remade
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    80
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    81
realclean: 
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    82
	-rm -f lib/*
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    83
	-rm -f bin/*
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    84
	cd src ; $(MAKE) realclean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    85
	cd test ; $(MAKE) realclean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    86
	cd sample ; $(MAKE) realclean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    87
	cd ann2fig ; $(MAKE) realclean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    88
	cd doc ; $(MAKE) realclean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    89
	cd MS_Win32; $(MAKE) realclean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    90
	cd validate ; $(MAKE) realclean
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    91
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    92
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    93
# Make distribution package (for use by authors only)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    94
#-----------------------------------------------------------------------------
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    95
DISTR = ann_1.1.1
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    96
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    97
distribution: realclean 
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    98
	cd .. ; mv -f $(DISTR) $(DISTR)-old; mkdir $(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
    99
	cp Copyright.txt ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   100
	cp License.txt ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   101
	cp Make-config ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   102
	cp Makefile ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   103
	cp ReadMe.txt ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   104
	cp -r MS_Win32 ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   105
#	cd ..; mv -f $(DISTR)_MS_Win32_bin $(DISTR)_MS_Win32_bin-old
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   106
	cp -r MS_Win32_bin ../$(DISTR)_MS_Win32_bin
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   107
	cp -r bin ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   108
	cp -r include ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   109
	cp -r lib ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   110
	cp -r src ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   111
	cp -r test ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   112
	cp -r sample ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   113
	cp -r ann2fig ../$(DISTR)
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   114
	cd ../$(DISTR); mkdir doc
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   115
	cp doc/*.pdf ../$(DISTR)/doc
e2bb6f169431 Initial commit: ANN 1.1.1
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff changeset
   116
#	cd .. ; tar -cfv $(DISTR).tar $(DISTR) ; gzip $(DISTR).tar