-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (23 loc) · 837 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
PYTHON_VERSION = 2.7
PYTHON_INCLUDE = /usr/include/python$(PYTHON_VERSION)
BOOST_INC = /usr/local/include
BOOST_LIB = /usr/local/lib
OPENCV_LIB = $$(pkg-config --libs opencv)
OPENCV_INC = $$(pkg-config --cflags opencv)
TARGET = gpumeanshift
$(TARGET).so: $(TARGET).o conversion.o
g++ -shared -Wl,--export-dynamic \
$(TARGET).o conversion.o -L$(BOOST_LIB) -lboost_python -lboost_numpy \
$(OPENCV_LIB) \
-L/usr/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) \
-o $(TARGET).so
$(TARGET).o: $(TARGET).cpp
g++ -std=c++11 -I$(PYTHON_INCLUDE) $(OPENCV_INC) -I$(BOOST_INC) -fPIC -c \
$(TARGET).cpp
conversion.o: conversion.cpp conversion.h
g++ -std=c++11 -I$(PYTHON_INCLUDE) $(OPENCV_INC) -I$(BOOST_INC) -fPIC -c \
conversion.cpp
clean:
rm -f $(TARGET).so $(TARGET).o conversion.o
test:
python -m test