source: libs/magicsquares/Makefile @ 1706

Revision 665, 1.3 KB checked in by dave, 10 years ago (diff)

new examples

Line 
1TARGET  := libmagicsquares.a
2
3SRCS    := src/Image.cpp\
4        src/Rendering.cpp\
5        src/Classifier.cpp\
6        src/PCAClassifier.cpp\
7        src/LDAClassifier.cpp\
8        src/Matrix.cpp\
9        src/PCA.cpp\
10        src/SVD.cpp\
11        src/FileTools.cpp\
12        src/FaceFinder.cpp\
13        src/Geometry.cpp\
14        src/ParticleFilter.cpp\
15        src/RadarParticleFilter.cpp\
16        src/LEDParticleFilter.cpp\
17        src/tinyxml.cpp\
18        src/tinyxmlerror.cpp\
19        src/tinyxmlparser.cpp
20
21CCFLAGS = `pkg-config --cflags opencv` -ggdb -Wall -march=core2 -mfpmath=sse -O3 -ffast-math -Wno-unused -DTIXML_USE_STL
22LIBS    = `pkg-config --libs opencv`
23PYTHON_INCLUDE = -I/usr/include/python2.5
24
25CC = g++
26OBJS    := ${SRCS:.cpp=.o}
27DEPS    := ${SRCS:.cpp=.dep}
28XDEPS   := $(wildcard ${DEPS})
29
30.PHONY: all clean distclean
31all:: ${TARGET}
32
33ifneq (${XDEPS},)
34include ${XDEPS}
35endif
36
37${TARGET}: ${OBJS}
38        ar rc ${TARGET} ${OBJS}
39
40${OBJS}: %.o: %.cpp %.dep
41        ${CC} ${CCFLAGS} -o $@ -c $<
42
43${DEPS}: %.dep: %.cpp Makefile
44        ${CC} ${CCFLAGS} -MM $< > $@
45
46clean::
47        -rm -f *~ src/*.o ${TARGET}
48
49cleandeps:: clean
50        -rm -f src/*.dep
51
52distclean:: clean
53
54python:: ${TARGET}
55        swig -c++ -python src/magicsquares.i
56        g++ ${CCFLAGS} -c src/magicsquares_wrap.cxx ${PYTHON_INCLUDE}
57        g++ -shared ${OBJS} magicsquares_wrap.o ${LIBS} -o _magicsquares.so
58        mv _magicsquares.so python
59        mv src/magicsquares.py python
60       
Note: See TracBrowser for help on using the repository browser.