1 | #----------------------------------------------------------------------------- |
---|
2 | # Makefile for the sample program |
---|
3 | # |
---|
4 | # ANN: Approximate Nearest Neighbors |
---|
5 | # Version: 1.1.1 08/04/06 |
---|
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 03/04/98 |
---|
21 | # Initial release |
---|
22 | # Revision 1.1.1 08/04/06 |
---|
23 | # Added copyright/license |
---|
24 | #----------------------------------------------------------------------------- |
---|
25 | # Note: For full performance measurements, it is assumed that the library |
---|
26 | # and this program have both been compiled with the -DPERF flag. See the |
---|
27 | # Makefile in the ANN base directory for this flag. |
---|
28 | #----------------------------------------------------------------------------- |
---|
29 | |
---|
30 | #----------------------------------------------------------------------------- |
---|
31 | # Basic definitions |
---|
32 | # BASEDIR where include, src, lib, ... are |
---|
33 | # INCDIR include directory |
---|
34 | # LIBDIR library directory |
---|
35 | # BINDIR bin directory |
---|
36 | # LDFLAGS loader flags |
---|
37 | # ANNLIBS libraries |
---|
38 | #----------------------------------------------------------------------------- |
---|
39 | |
---|
40 | BASEDIR = .. |
---|
41 | INCDIR = $(BASEDIR)/include |
---|
42 | LIBDIR = $(BASEDIR)/lib |
---|
43 | BINDIR = $(BASEDIR)/bin |
---|
44 | LDFLAGS = -L$(LIBDIR) |
---|
45 | ANNLIBS = -lANN -lm |
---|
46 | |
---|
47 | #----------------------------------------------------------------------------- |
---|
48 | # Some more definitions |
---|
49 | # ANNSAMP name of sample program |
---|
50 | #----------------------------------------------------------------------------- |
---|
51 | |
---|
52 | ANNSAMP = ann_sample |
---|
53 | |
---|
54 | SAMPSOURCES = ann_sample.cpp |
---|
55 | SAMPOBJECTS = $(SAMPSOURCES:.cpp=.o) |
---|
56 | |
---|
57 | #----------------------------------------------------------------------------- |
---|
58 | # Make the program |
---|
59 | #----------------------------------------------------------------------------- |
---|
60 | |
---|
61 | default: |
---|
62 | @echo "Specify a target configuration" |
---|
63 | |
---|
64 | targets: $(BINDIR)/$(ANNSAMP) |
---|
65 | |
---|
66 | $(BINDIR)/$(ANNSAMP): $(SAMPOBJECTS) $(LIBDIR)/$(ANNLIB) |
---|
67 | $(C++) $(SAMPOBJECTS) -o $(ANNSAMP) $(LDFLAGS) $(ANNLIBS) |
---|
68 | mv $(ANNSAMP) $(BINDIR) |
---|
69 | |
---|
70 | #----------------------------------------------------------------------------- |
---|
71 | # configuration definitions |
---|
72 | #----------------------------------------------------------------------------- |
---|
73 | |
---|
74 | include ../Make-config |
---|
75 | |
---|
76 | #----------------------------------------------------------------------------- |
---|
77 | # Objects |
---|
78 | #----------------------------------------------------------------------------- |
---|
79 | |
---|
80 | ann_sample.o: ann_sample.cpp |
---|
81 | $(C++) -c -I$(INCDIR) $(CFLAGS) ann_sample.cpp |
---|
82 | |
---|
83 | #------------------ |
---|
84 | # execute file |
---|
85 | #------------------ |
---|
86 | #----------------------------------------------------------------------------- |
---|
87 | # Cleaning |
---|
88 | #----------------------------------------------------------------------------- |
---|
89 | |
---|
90 | clean: |
---|
91 | -rm -f *.o *.out core |
---|
92 | |
---|
93 | realclean: clean |
---|