[37] | 1 | #----------------------------------------------------------------------------- |
---|
| 2 | # Makefile for the test and evaluation 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 -DANN_PERF flag. See |
---|
| 27 | # the 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 ANN library |
---|
| 38 | # OTHERLIBS other libraries |
---|
| 39 | #----------------------------------------------------------------------------- |
---|
| 40 | |
---|
| 41 | BASEDIR = .. |
---|
| 42 | INCDIR = $(BASEDIR)/include |
---|
| 43 | LIBDIR = $(BASEDIR)/lib |
---|
| 44 | BINDIR = $(BASEDIR)/bin |
---|
| 45 | LDFLAGS = -L$(LIBDIR) |
---|
| 46 | ANNLIBS = -lANN |
---|
| 47 | OTHERLIBS = -lm |
---|
| 48 | |
---|
| 49 | #----------------------------------------------------------------------------- |
---|
| 50 | # Some more definitions |
---|
| 51 | # ANNTEST name of test program |
---|
| 52 | #----------------------------------------------------------------------------- |
---|
| 53 | |
---|
| 54 | ANNTEST = ann_test |
---|
| 55 | |
---|
| 56 | HEADERS = rand.h |
---|
| 57 | TESTSOURCES = ann_test.cpp rand.cpp |
---|
| 58 | TESTOBJECTS = $(TESTSOURCES:.cpp=.o) |
---|
| 59 | |
---|
| 60 | #----------------------------------------------------------------------------- |
---|
| 61 | # Make the program |
---|
| 62 | #----------------------------------------------------------------------------- |
---|
| 63 | |
---|
| 64 | default: |
---|
| 65 | @echo "Specify a target configuration" |
---|
| 66 | |
---|
| 67 | targets: $(BINDIR)/$(ANNTEST) |
---|
| 68 | |
---|
| 69 | $(BINDIR)/$(ANNTEST): $(TESTOBJECTS) $(LIBDIR)/$(ANNLIB) |
---|
| 70 | $(C++) $(TESTOBJECTS) -o $(ANNTEST) $(LDFLAGS) $(ANNLIBS) $(OTHERLIBS) |
---|
| 71 | mv $(ANNTEST) $(BINDIR) |
---|
| 72 | |
---|
| 73 | #----------------------------------------------------------------------------- |
---|
| 74 | # configuration definitions |
---|
| 75 | #----------------------------------------------------------------------------- |
---|
| 76 | |
---|
| 77 | include ../Make-config |
---|
| 78 | |
---|
| 79 | #----------------------------------------------------------------------------- |
---|
| 80 | # Objects |
---|
| 81 | #----------------------------------------------------------------------------- |
---|
| 82 | |
---|
| 83 | ann_test.o: ann_test.cpp |
---|
| 84 | $(C++) -c -I$(INCDIR) $(CFLAGS) ann_test.cpp |
---|
| 85 | |
---|
| 86 | rand.o: rand.cpp |
---|
| 87 | $(C++) -c -I$(INCDIR) $(CFLAGS) rand.cpp |
---|
| 88 | |
---|
| 89 | #----------------------------------------------------------------------------- |
---|
| 90 | # Cleaning |
---|
| 91 | #----------------------------------------------------------------------------- |
---|
| 92 | |
---|
| 93 | clean: |
---|
| 94 | -rm -f *.o *.out core |
---|
| 95 | |
---|
| 96 | realclean: clean |
---|