author | Dmitriy Morozov <dmitriy@mrzv.org> |
Tue, 14 Jul 2009 09:25:24 -0700 (2009-07-14) | |
changeset 2 | 689462154b3a |
parent 0 | e2bb6f169431 |
permissions | -rw-r--r-- |
0 | 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 |
||
2
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
79 |
linux-g++-sl: |
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
80 |
$(MAKE) targets \ |
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
81 |
"ANNLIB = libANN.so" \ |
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
82 |
"C++ = g++" \ |
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
83 |
"CFLAGS = -O3 -fPIC" \ |
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
84 |
"MAKELIB = g++ -shared -o" \ |
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
85 |
"RANLIB = true" |
689462154b3a
Added linux-g++-sl (shared libraries under Linux)
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
0
diff
changeset
|
86 |
|
0 | 87 |
# Mac OS X using g++ |
88 |
macosx-g++: |
|
89 |
$(MAKE) targets \ |
|
90 |
"ANNLIB = libANN.a" \ |
|
91 |
"C++ = g++" \ |
|
92 |
"CFLAGS = -O3" \ |
|
93 |
"MAKELIB = libtool -static -o " \ |
|
94 |
"RANLIB = true" |
|
95 |
||
96 |
# SunOS5 |
|
97 |
sunos5: |
|
98 |
$(MAKE) targets \ |
|
99 |
"ANNLIB = libANN.a" \ |
|
100 |
"C++ = CC" \ |
|
101 |
"CFLAGS = -O" \ |
|
102 |
"MAKELIB = ar ruv" \ |
|
103 |
"RANLIB = true" |
|
104 |
||
105 |
# SunOS5 with shared libraries |
|
106 |
sunos5-sl: |
|
107 |
$(MAKE) targets \ |
|
108 |
"ANNLIB = libANN.a" \ |
|
109 |
"C++ = CC" \ |
|
110 |
"CFLAGS = -Kpic -O" \ |
|
111 |
"MAKELIB = ld -G -o" \ |
|
112 |
"RANLIB = true" |
|
113 |
||
114 |
# SunOS5 with g++ |
|
115 |
sunos5-g++: |
|
116 |
$(MAKE) targets \ |
|
117 |
"ANNLIB = libANN.a" \ |
|
118 |
"C++ = g++" \ |
|
119 |
"CFLAGS = -O3" \ |
|
120 |
"MAKELIB = ar ruv" \ |
|
121 |
"RANLIB = true" |
|
122 |
||
123 |
# SunOS5 with g++ and shared libraries |
|
124 |
sunos5-g++-sl: |
|
125 |
$(MAKE) targets \ |
|
126 |
"ANNLIB = libANN.so" \ |
|
127 |
"C++ = g++" \ |
|
128 |
"CFLAGS = -fpic -O3" \ |
|
129 |
"MAKELIB = ld -G -o" \ |
|
130 |
"RANLIB = true" |
|
131 |
||
132 |
#----------------------------------------------------------------------- |
|
133 |
# Used for the author's testing and debugging only |
|
134 |
#----------------------------------------------------------------------- |
|
135 |
||
136 |
# debugging version for authors |
|
137 |
authors-debug: |
|
138 |
$(MAKE) targets \ |
|
139 |
"ANNLIB = libANN.a" \ |
|
140 |
"C++ = g++" \ |
|
141 |
"CFLAGS = -g -DANN_PERF -Wall" \ |
|
142 |
"MAKELIB = ar ruv" \ |
|
143 |
"RANLIB = true" |
|
144 |
||
145 |
# performance testing version for authors |
|
146 |
authors-perf: |
|
147 |
$(MAKE) targets \ |
|
148 |
"ANNLIB = libANN.a" \ |
|
149 |
"C++ = g++" \ |
|
150 |
"CFLAGS = -O3 -DANN_PERF -Wall" \ |
|
151 |
"MAKELIB = ar ruv" \ |
|
152 |
"RANLIB = true" |
|
153 |
||
154 |
#----------------------------------------------------------------------- |
|
155 |
# Some older ones that I have not tested with the latest version. |
|
156 |
#----------------------------------------------------------------------- |
|
157 |
||
158 |
sgi: |
|
159 |
$(MAKE) targets \ |
|
160 |
"ANNLIB = libANN.a" \ |
|
161 |
"C++ = CC -ansi" \ |
|
162 |
"CFLAGS = -O2" \ |
|
163 |
"MAKELIB = ar ruv" \ |
|
164 |
"RANLIB = true" |
|
165 |
||
166 |
# DEC Alpha with g++ |
|
167 |
alpha-g++: |
|
168 |
$(MAKE) targets \ |
|
169 |
"ANNLIB = libANN.a" \ |
|
170 |
"C++ = g++" \ |
|
171 |
"CFLAGS = -O3" \ |
|
172 |
"MAKELIB = ar ruv" \ |
|
173 |
"RANLIB = ranlib" |
|
174 |
||
175 |
# SunOS4 |
|
176 |
sunos4: |
|
177 |
$(MAKE) targets \ |
|
178 |
"ANNLIB = libANN.a" \ |
|
179 |
"C++ = CC" \ |
|
180 |
"CFLAGS = -O" \ |
|
181 |
"MAKELIB = ar ruv" \ |
|
182 |
"RANLIB = ranlib" |
|
183 |
||
184 |
# SunOS4 with g++ |
|
185 |
sunos4-g++: |
|
186 |
$(MAKE) targets \ |
|
187 |
"ANNLIB = libANN.a" \ |
|
188 |
"C++ = g++" \ |
|
189 |
"CFLAGS = -O3" \ |
|
190 |
"MAKELIB = ar ruv" \ |
|
191 |
"RANLIB = ranlib" |
|
192 |
||
193 |
# SunOS4 with g++ and shared libraries |
|
194 |
sunos4-g++-sl: |
|
195 |
$(MAKE) targets \ |
|
196 |
"ANNLIB = libANN.so" \ |
|
197 |
"C++ = g++" \ |
|
198 |
"CC = g++" \ |
|
199 |
"CFLAGS = -fPIC -O3" \ |
|
200 |
"MAKELIB = ld -assert pure-text -o" \ |
|
201 |
"RANLIB = true" |
|
202 |