Makefile
author Dmitriy Morozov <dmitriy@mrzv.org>
Fri, 12 Jun 2009 18:08:50 -0700
changeset 2 cbe1fa5e2993
parent 0 dc27a515a0a3
permissions -rw-r--r--
Added fixed radius search, and renamed methods to match C++ names

all: pyANN.so

PYTHON_INCLUDE=/usr/include/python2.6
LIBRARIES=-lANN -lpython2.6 -lboost_python 
FLAGS=-O3 -fPIC
# FLAGS=-fPIC -g
INSTALL_PATH=~/.local/lib/python2.6/site-packages/

ann-kd-tree.o: ann-kd-tree.cpp
	g++ -c $< -o $@ -I${PYTHON_INCLUDE} ${FLAGS}

pyann.o: pyann.cpp 
	g++ -c $< -o $@ -I${PYTHON_INCLUDE} ${FLAGS}
	
pyANN.so: pyann.o ann-kd-tree.o
	g++ -shared -o $@ pyann.o ann-kd-tree.o ${LIBRARIES} ${FLAGS}

install: pyANN.so
	install -m644 pyANN.so ${INSTALL_PATH}

clean:
	rm *.o *.so