Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 541260
Collapse All | Expand All

(-)original/ANN.pc.in (+11 lines)
Line 0 Link Here
1
prefix=@prefix@
2
exec_prefix=@exec_prefix@
3
libdir=@libdir@
4
includedir=@includedir@
5
6
Name: ANN
7
Description: A Library for Approximate Nearest Neighbor Searching
8
Version: 1.1.2
9
URL: http://www.cs.umd.edu/~mount/ANN/ 
10
Cflags: -I${includedir}
11
Libs: -L${libdir} -lANN
(-)original/configure.ac (+20 lines)
Line 0 Link Here
1
AC_INIT([libANN], [1.1.2])
2
AC_CONFIG_MACRO_DIR([m4])
3
AC_CONFIG_SRCDIR([src])
4
AC_CONFIG_AUX_DIR([build-aux])
5
AM_INIT_AUTOMAKE([foreign -Wall])
6
7
AM_PROG_AR
8
AC_PROG_CXX
9
AC_PROG_INSTALL
10
LT_INIT
11
12
AC_CONFIG_HEADERS([config.h])
13
AC_CONFIG_FILES([
14
                 Makefile
15
                 include/Makefile
16
                 src/Makefile
17
                 ANN.pc
18
                 ])
19
20
AC_OUTPUT
(-)original/include/Makefile.am (+4 lines)
Line 0 Link Here
1
annincludedir = $(includedir)/ANN
2
nodist_anninclude_HEADERS = ANN/ANN.h \
3
	ANN/ANNperf.h \
4
  ANN/ANNx.h
(-)original/Make-config (-194 lines)
Lines 1-194 Link Here
1
#-----------------------------------------------------------------------
2
# Makefile variations depending on different configurations
3
#
4
# ANN: Approximate Nearest Neighbors
5
# Version: 1.1 05/03/05
6
#
7
# (This Make-config structure is based on the one used by Mesa by Brian
8
# Paul.  If you succeed in porting ANN to your favorite system, please
9
# send email to mount@cs.umd.edu, and I'll try to include it in this
10
# list.)
11
#
12
#----------------------------------------------------------------------
13
# The following configuration-dependent variables are passed to each
14
# the Makefile in subdirectories:
15
#
16
# ANNLIB	The name of the ANN library file (usually libANN.a)
17
# C++		The C compiler (usually CC or g++)
18
# MAKELIB	The command and flags to make a library file (usually
19
#			"ar ...")
20
# CFLAGS	Flags to C++ compiler
21
# RANLIB	For "ranlib" = use ranlib, "true" = don't use ranlib
22
#----------------------------------------------------------------------
23
# Revision 0.1  09/06/97
24
#	Initial release
25
# Revision 0.2  06/24/98
26
#	Minor changes to fix compilation errors on SGI systems.
27
# Revision 1.0  04/01/05
28
#	Modifications for alpha with cxx
29
#	Removed CFLAGS2 options (just write your own)
30
#	Removed -DUSING...  (Compilers are pretty consistent these days)
31
#	Added linux-g++ target
32
# Revision 1.1  05/03/05
33
#	Added macosx-g++ target
34
#-----------------------------------------------------------------------------
35
36
#-----------------------------------------------------------------------------
37
# Compilation options (add these, as desired, to the CFLAGS variable
38
# in the desired compilation target below).  For example,
39
#
40
#	"CFLAGS = -O3 -Wall -DANN_PERF"
41
#
42
#	-g			Debugging.
43
#	-O?			Run-time optimization.
44
#	-Wall		Be verbose about warnings.
45
#
46
#	-DANN_PERF	Enable performance evaluation. (This may slow execution
47
#				slightly.)
48
#
49
#	-DANN_NO_LIMITS_H
50
#				Use this if limits.h or float.h does not exist on your
51
#				system. (Also see include/ANN/ANN.h for other changes
52
#				needed.)
53
#
54
#	-DANN_NO_RANDOM
55
#				Use this option if srandom()/random() are not available
56
#				on your system. Pseudo-random number generation is used
57
#				in the utility program test/ann_test. The combination
58
#				srandom()/random() is considered the best pseudo-random
59
#				number generator, but is not available on all systems.
60
#				If they are not available on your system (for example,
61
#				Visual C++) then srand()/rand() will be used instead by
62
#				setting this parameter.
63
#
64
#	-DWIN32
65
#				This is used only for compilation under windows systems
66
#				(but instead of using this, use the various .vcproj
67
#				files in the MS_WIN32 directory).
68
#-----------------------------------------------------------------------------
69
70
#					Linux using g++
71
linux-g++:
72
	$(MAKE) targets \
73
	"ANNLIB = libANN.a" \
74
	"C++ = g++" \
75
	"CFLAGS = -O3" \
76
	"MAKELIB = ar ruv" \
77
	"RANLIB = true"
78
79
#					Mac OS X using g++
80
macosx-g++:
81
	$(MAKE) targets \
82
	"ANNLIB = libANN.a" \
83
	"C++ = g++" \
84
	"CFLAGS = -O3" \
85
	"MAKELIB = libtool -static -o " \
86
	"RANLIB = true"
87
88
#					SunOS5
89
sunos5:
90
	$(MAKE) targets \
91
	"ANNLIB = libANN.a" \
92
	"C++ = CC" \
93
	"CFLAGS = -O" \
94
	"MAKELIB = ar ruv" \
95
	"RANLIB = true"
96
97
#					SunOS5 with shared libraries
98
sunos5-sl:
99
	$(MAKE) targets \
100
	"ANNLIB = libANN.a" \
101
	"C++ = CC" \
102
	"CFLAGS = -Kpic -O" \
103
	"MAKELIB = ld -G -o" \
104
	"RANLIB = true"
105
106
#					SunOS5 with g++
107
sunos5-g++:
108
	$(MAKE) targets \
109
	"ANNLIB = libANN.a" \
110
	"C++ = g++" \
111
	"CFLAGS = -O3" \
112
	"MAKELIB = ar ruv" \
113
	"RANLIB = true"
114
115
#					SunOS5 with g++ and shared libraries
116
sunos5-g++-sl:
117
	$(MAKE) targets \
118
	"ANNLIB = libANN.so" \
119
	"C++ = g++" \
120
	"CFLAGS = -fpic -O3" \
121
	"MAKELIB = ld -G -o" \
122
	"RANLIB = true"
123
124
#-----------------------------------------------------------------------
125
# Used for the author's testing and debugging only
126
#-----------------------------------------------------------------------
127
128
#					debugging version for authors
129
authors-debug:
130
	$(MAKE) targets \
131
	"ANNLIB = libANN.a" \
132
	"C++ = g++" \
133
	"CFLAGS = -g -DANN_PERF -Wall" \
134
	"MAKELIB = ar ruv" \
135
	"RANLIB = true"
136
137
#					performance testing version for authors
138
authors-perf:
139
	$(MAKE) targets \
140
	"ANNLIB = libANN.a" \
141
	"C++ = g++" \
142
	"CFLAGS = -O3 -DANN_PERF -Wall" \
143
	"MAKELIB = ar ruv" \
144
	"RANLIB = true"
145
146
#-----------------------------------------------------------------------
147
# Some older ones that I have not tested with the latest version.
148
#-----------------------------------------------------------------------
149
150
sgi:
151
	$(MAKE) targets \
152
	"ANNLIB = libANN.a" \
153
	"C++ = CC -ansi" \
154
	"CFLAGS = -O2" \
155
	"MAKELIB = ar ruv" \
156
	"RANLIB = true"
157
158
#					DEC Alpha with g++
159
alpha-g++:
160
	$(MAKE) targets \
161
	"ANNLIB = libANN.a" \
162
	"C++ = g++" \
163
	"CFLAGS = -O3" \
164
	"MAKELIB = ar ruv" \
165
	"RANLIB = ranlib"
166
167
#					SunOS4
168
sunos4:
169
	$(MAKE) targets \
170
	"ANNLIB = libANN.a" \
171
	"C++ = CC" \
172
	"CFLAGS = -O" \
173
	"MAKELIB = ar ruv" \
174
	"RANLIB = ranlib"
175
176
#					SunOS4 with g++
177
sunos4-g++:
178
	$(MAKE) targets \
179
	"ANNLIB = libANN.a" \
180
	"C++ = g++" \
181
	"CFLAGS = -O3" \
182
	"MAKELIB = ar ruv" \
183
	"RANLIB = ranlib"
184
185
#					SunOS4 with g++ and shared libraries
186
sunos4-g++-sl:
187
	$(MAKE) targets \
188
	"ANNLIB = libANN.so" \
189
	"C++ = g++" \
190
	"CC = g++" \
191
	"CFLAGS = -fPIC -O3" \
192
	"MAKELIB = ld -assert pure-text -o" \
193
	"RANLIB = true"
194
(-)original/Makefile (-115 lines)
Lines 1-115 Link Here
1
#-----------------------------------------------------------------------------
2
# Top-level Makefile for ANN.
3
#
4
# ANN: Approximate Nearest Neighbors
5
# Version: 1.1 05/03/05
6
#-----------------------------------------------------------------------------
7
# Copyright (c) 1997-2005 University of Maryland and Sunil Arya and
8
# David Mount.  All Rights Reserved.
9
# 
10
# This software and related documentation is part of the Approximate
11
# Nearest Neighbor Library (ANN).  This software is provided under
12
# the provisions of the Lesser GNU Public License (LGPL).  See the
13
# file ../ReadMe.txt for further information.
14
# 
15
# The University of Maryland (U.M.) and the authors make no
16
# representations about the suitability or fitness of this software for
17
# any purpose.  It is provided "as is" without express or implied
18
# warranty.
19
#-----------------------------------------------------------------------------
20
# Revision 0.1  09/06/97
21
#	alpha release
22
# Revision 0.2  06/26/98
23
#	Minor changes to fix compilation errors on SGI systems.
24
# Revision 1.0  04/01/05
25
#	Initial release (finally!)
26
#	Added linux-g++ target
27
# Revision 1.1  05/03/05
28
#	Added macosx-g++ target
29
#-----------------------------------------------------------------------------
30
31
#-----------------------------------------------------------------------------
32
# default: list the options
33
# The following legacy targets are also available.
34
#	make sunos4		for Sun with SunOS 4.x
35
#	make sunos4-g++		for Sun with SunOS 4.x and g++
36
#	make alpha-g++		for DEC Alpha and g++
37
# The following targets are used for internal development only
38
#	make authors-debug	author's debugging
39
#	make authors-perf	author's performance evaluations
40
#	make distribution	author's generation of distribution file
41
#-----------------------------------------------------------------------------
42
default:
43
	@echo "Enter one of the following:"
44
	@echo "  make linux-g++            for Linux and g++"
45
	@echo "  make macosx-g++           for Mac OS X and g++"
46
	@echo "  make sunos5               for Sun with SunOS 5.x"
47
	@echo "  make sunos5-sl            for Sun with SunOS 5.x, make shared libs"
48
	@echo "  make sunos5-g++           for Sun with SunOS 5.x and g++"
49
	@echo "  make sunos5-g++-sl        for Sun with SunOS 5.x, g++, make shared libs"
50
	@echo "  make clean                remove .o files"
51
	@echo "  make realclean            remove .o, library and executable files"
52
	@echo " "
53
	@echo "See file Makefile for other compilation options, such as disabling"
54
	@echo "performance measurement code."
55
56
#-----------------------------------------------------------------------------
57
# main make entry point
58
#-----------------------------------------------------------------------------
59
alpha-g++ macosx-g++ linux-g++ sgi sunos4 sunos4-g++ sunos5 sunos5-g++ sunos5-g++-sl authors-debug authors-perf:
60
	cd src ; $(MAKE) $@
61
	cd test ; $(MAKE) $@
62
	cd sample ; $(MAKE) $@
63
	cd ann2fig ; $(MAKE) $@
64
65
#-----------------------------------------------------------------------------
66
# Remove .o files and core files
67
#-----------------------------------------------------------------------------
68
clean:
69
	cd src ; $(MAKE) clean
70
	cd test ; $(MAKE) clean
71
	cd sample ; $(MAKE) clean
72
	cd ann2fig ; $(MAKE) clean
73
	cd doc ; $(MAKE) clean
74
	cd MS_Win32; $(MAKE) clean
75
	cd validate ; $(MAKE) clean
76
77
#-----------------------------------------------------------------------------
78
# Remove everthing that can be remade
79
#-----------------------------------------------------------------------------
80
realclean: 
81
	-rm -f lib/*
82
	-rm -f bin/*
83
	cd src ; $(MAKE) realclean
84
	cd test ; $(MAKE) realclean
85
	cd sample ; $(MAKE) realclean
86
	cd ann2fig ; $(MAKE) realclean
87
	cd doc ; $(MAKE) realclean
88
	cd MS_Win32; $(MAKE) realclean
89
	cd validate ; $(MAKE) realclean
90
91
#-----------------------------------------------------------------------------
92
# Make distribution package (for use by authors only)
93
#-----------------------------------------------------------------------------
94
DISTR = ann_1.1.2
95
96
distribution: realclean 
97
	cd .. ; mv -f $(DISTR) $(DISTR)-old; mkdir $(DISTR)
98
	cp Copyright.txt ../$(DISTR)
99
	cp License.txt ../$(DISTR)
100
	cp Make-config ../$(DISTR)
101
	cp Makefile ../$(DISTR)
102
	cp ReadMe.txt ../$(DISTR)
103
	cp -r MS_Win32 ../$(DISTR)
104
#	cd ..; mv -f $(DISTR)_MS_Win32_bin $(DISTR)_MS_Win32_bin-old
105
	cp -r MS_Win32_bin ../$(DISTR)_MS_Win32_bin
106
	cp -r bin ../$(DISTR)
107
	cp -r include ../$(DISTR)
108
	cp -r lib ../$(DISTR)
109
	cp -r src ../$(DISTR)
110
	cp -r test ../$(DISTR)
111
	cp -r sample ../$(DISTR)
112
	cp -r ann2fig ../$(DISTR)
113
	cd ../$(DISTR); mkdir doc
114
	cp doc/*.pdf ../$(DISTR)/doc
115
#	cd .. ; tar -cfv $(DISTR).tar $(DISTR) ; gzip $(DISTR).tar
(-)original/Makefile.am (+7 lines)
Line 0 Link Here
1
ACLOCAL_AMFLAGS = -I m4
2
3
pkgconfigdir = $(libdir)/pkgconfig
4
nodist_pkgconfig_DATA = ANN.pc
5
6
SUBDIRS = include/ src/
7
CLEANFILES = *~
(-)original/src/Makefile (-121 lines)
Lines 1-121 Link Here
1
#-----------------------------------------------------------------------------
2
# Makefile for ANN library
3
#----------------------------------------------------------------------
4
# Copyright (c) 1997-2005 University of Maryland and Sunil Arya and
5
# David Mount.  All Rights Reserved.
6
# 
7
# This software and related documentation is part of the Approximate
8
# Nearest Neighbor Library (ANN).  This software is provided under
9
# the provisions of the Lesser GNU Public License (LGPL).  See the
10
# file ../ReadMe.txt for further information.
11
# 
12
# The University of Maryland (U.M.) and the authors make no
13
# representations about the suitability or fitness of this software for
14
# any purpose.  It is provided "as is" without express or implied
15
# warranty.
16
#----------------------------------------------------------------------
17
# History:
18
#	Revision 0.1  03/04/98
19
#		Initial release
20
#	Revision 1.0  04/01/05
21
#		Renamed files from .cc to .cpp for Microsoft Visual C++
22
#		Added kd_dump.cpp
23
#	Revision 1.1  05/03/05
24
#		Added kd_fix_rad_search.cpp and bd_fix_rad_search.cpp
25
#----------------------------------------------------------------------
26
27
#-----------------------------------------------------------------------------
28
# Some basic definitions:
29
#		BASEDIR		where include, src, lib, ... are
30
#		INCLIB		include directory
31
#		LIBLIB		library directory
32
#-----------------------------------------------------------------------------
33
BASEDIR	= ..
34
INCDIR	= $(BASEDIR)/include
35
LIBDIR	= $(BASEDIR)/lib
36
37
SOURCES = ANN.cpp brute.cpp kd_tree.cpp kd_util.cpp kd_split.cpp \
38
	kd_dump.cpp kd_search.cpp kd_pr_search.cpp kd_fix_rad_search.cpp \
39
	bd_tree.cpp bd_search.cpp bd_pr_search.cpp bd_fix_rad_search.cpp \
40
	perf.cpp
41
42
HEADERS = kd_tree.h kd_split.h kd_util.h kd_search.h \
43
	kd_pr_search.h kd_fix_rad_search.h perf.h pr_queue.h pr_queue_k.h
44
45
OBJECTS = $(SOURCES:.cpp=.o)
46
47
#-----------------------------------------------------------------------------
48
# Make the library
49
#-----------------------------------------------------------------------------
50
51
default:
52
	@echo "Specify a target configuration"
53
54
targets: $(LIBDIR)/$(ANNLIB)
55
56
$(LIBDIR)/$(ANNLIB): $(OBJECTS)
57
	$(MAKELIB) $(ANNLIB) $(OBJECTS)
58
	$(RANLIB) $(ANNLIB)
59
	mv $(ANNLIB) $(LIBDIR)
60
61
#-----------------------------------------------------------------------------
62
# Make object files
63
#-----------------------------------------------------------------------------
64
65
ANN.o: ANN.cpp
66
	$(C++) -c -I$(INCDIR) $(CFLAGS) ANN.cpp
67
68
brute.o: brute.cpp
69
	$(C++) -c -I$(INCDIR) $(CFLAGS) brute.cpp
70
71
kd_tree.o: kd_tree.cpp
72
	$(C++) -c -I$(INCDIR) $(CFLAGS) kd_tree.cpp
73
74
kd_util.o: kd_util.cpp
75
	$(C++) -c -I$(INCDIR) $(CFLAGS) kd_util.cpp
76
77
kd_split.o: kd_split.cpp
78
	$(C++) -c -I$(INCDIR) $(CFLAGS) kd_split.cpp
79
80
kd_search.o: kd_search.cpp
81
	$(C++) -c -I$(INCDIR) $(CFLAGS) kd_search.cpp
82
83
kd_pr_search.o: kd_pr_search.cpp
84
	$(C++) -c -I$(INCDIR) $(CFLAGS) kd_pr_search.cpp
85
86
kd_fix_rad_search.o: kd_fix_rad_search.cpp
87
	$(C++) -c -I$(INCDIR) $(CFLAGS) kd_fix_rad_search.cpp
88
89
kd_dump.o: kd_dump.cpp
90
	$(C++) -c -I$(INCDIR) $(CFLAGS) kd_dump.cpp
91
92
bd_tree.o: bd_tree.cpp
93
	$(C++) -c -I$(INCDIR) $(CFLAGS) bd_tree.cpp
94
95
bd_search.o: bd_search.cpp
96
	$(C++) -c -I$(INCDIR) $(CFLAGS) bd_search.cpp
97
98
bd_pr_search.o: bd_pr_search.cpp
99
	$(C++) -c -I$(INCDIR) $(CFLAGS) bd_pr_search.cpp
100
101
bd_fix_rad_search.o: bd_fix_rad_search.cpp
102
	$(C++) -c -I$(INCDIR) $(CFLAGS) bd_fix_rad_search.cpp
103
104
perf.o: perf.cpp
105
	$(C++) -c -I$(INCDIR) $(CFLAGS) perf.cpp
106
107
#-----------------------------------------------------------------------------
108
# Configuration definitions
109
#-----------------------------------------------------------------------------
110
111
include ../Make-config
112
113
#-----------------------------------------------------------------------------
114
# Cleaning
115
#-----------------------------------------------------------------------------
116
117
clean:
118
	-rm -f *.o core
119
120
realclean: clean
121
(-)original/src/Makefile.am (+28 lines)
Line 0 Link Here
1
AM_CPPFLAGS = -I $(top_srcdir)/include
2
3
lib_LTLIBRARIES = libANN.la
4
libANN_la_SOURCES = $(top_srcdir)/include \
5
									bd_tree.h \
6
									kd_fix_rad_search.h \
7
									kd_pr_search.h \
8
									kd_search.h \
9
									kd_split.h \
10
									kd_tree.h \
11
									kd_util.h \
12
									pr_queue.h \
13
									pr_queue_k.h \
14
									ANN.cpp \
15
									bd_fix_rad_search.cpp \
16
									bd_pr_search.cpp \
17
									bd_search.cpp \
18
									bd_tree.cpp \
19
									brute.cpp \
20
									kd_dump.cpp \
21
									kd_fix_rad_search.cpp \
22
									kd_pr_search.cpp \
23
									kd_search.cpp \
24
									kd_split.cpp \
25
									kd_tree.cpp \
26
									kd_util.cpp \
27
									perf.cpp
28
CLEANFILES = *~

Return to bug 541260