1 # opencv/interfaces/swig/python/Makefile.am
2 # 2005-05-07, Mark Asbach <asbach@ient.rwth-aachen.de>
4 # depending on the Automake conditionals set by configure, we will build the various
5 # script language interfaces that SWIG is capable of generating wrappers for
8 -I$(top_srcdir)/cv/include \
9 -I$(top_srcdir)/cxcore/include \
10 -I$(top_srcdir)/ml/include \
11 -I$(top_srcdir)/otherlibs/highgui
15 -DCV_NO_BACKWARD_COMPATIBILITY
17 AM_CXXFLAGS = @PY_CXXFLAGS@
19 noinst_PYTHON = setup-for-win.py
54 # SWIG #######################################################################
56 # the following rules keep wrappers up to date, if SWIG is present
57 if UPDATE_SWIG_WRAPPERS
59 # this rule creates the Python wrapper sources for cxcore and cv
60 _cv.cpp: cv.i imagedata.i cvarr.i cvaliases.i pyhelpers.i \
61 nointpb.i pytypemaps.i cvshadow.i cvseq.i \
63 pyhelpers.h cvshadow.h pycvseq.hpp \
64 $(top_srcdir)/interfaces/swig/general/cv.i \
65 $(top_srcdir)/interfaces/swig/general/memory.i \
66 $(top_srcdir)/interfaces/swig/general/typemaps.i \
67 $(top_srcdir)/interfaces/swig/general/extensions.i \
68 $(top_srcdir)/interfaces/swig/general/doublepointers.i \
69 $(top_srcdir)/interfaces/swig/general/sizeof.i \
70 $(top_srcdir)/interfaces/swig/general/cvmacros.i \
72 ../filtered/constants.h \
74 $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -o $@ $<
76 # this rule creates the Python wrapper sources for ml
77 _ml.cpp: ml.i nointpb.i pytypemaps.i \
78 $(top_srcdir)/interfaces/swig/general/typemaps.i \
79 $(top_srcdir)/interfaces/swig/general/memory.i \
80 $(top_srcdir)/ml/include/ml.h \
82 $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -DSKIP_INCLUDES -o $@ $<
84 # this rule creates the Python wrapper sources for highgui
85 _highgui.cpp: highgui.i nointpb.i pytypemaps.i \
86 $(top_srcdir)/interfaces/swig/general/highgui.i \
87 $(top_srcdir)/interfaces/swig/general/typemaps.i \
88 $(top_srcdir)/interfaces/swig/general/memory.i \
89 $(top_srcdir)/otherlibs/highgui/highgui.h \
91 $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -DSKIP_INCLUDES -o $@ $<
94 $(top_srcdir)/cxcore/include/cxtypes.h \
95 $(top_srcdir)/cxcore/include/cxcore.h \
96 $(top_srcdir)/cv/include/cvtypes.h \
97 $(top_srcdir)/cv/include/cv.h
99 cvaliases.i: $(CV_HEADER_FILES) Makefile.in
100 $(PYTHON) $(top_srcdir)/utils/extract_aliases.py $(CV_HEADER_FILES) > $@
105 # Conditional targets #######################################################
107 if BUILD_PYTHON_WRAPPERS
109 #pkgpython_LTLIBRARIES = _cv.la _highgui.la
110 pkgpython_LTLIBRARIES = _cv.la _ml.la _highgui.la
120 _cv_la_SOURCES = _cv.cpp error.cpp error.h pyhelpers.cpp pyhelpers.h \
121 pycvseq.hpp cvshadow.cpp cvshadow.h \
122 cv.i imagedata.i cvarr.i nointpb.i pytypemaps.i cvseq.i cvshadow.i
123 _cv_la_CXXFLAGS = $(PYTHON_CSPEC)
124 _cv_la_LIBADD = $(top_builddir)/cv/src/libcv.la
125 _cv_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LSPEC) \
126 -L$(SWIG_PYTHON_LIBS)
128 _ml_la_SOURCES = _ml.cpp pyhelpers.cpp pyhelpers.h
129 _ml_la_CXXFLAGS = $(PYTHON_CSPEC)
130 _ml_la_LIBADD = $(top_builddir)/ml/src/libml.la
131 _ml_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LSPEC) \
132 -L$(SWIG_PYTHON_LIBS)
134 _highgui_la_SOURCES = _highgui.cpp pyhelpers.cpp pyhelpers.h \
136 _highgui_la_CXXFLAGS = $(PYTHON_CSPEC)
137 _highgui_la_LIBADD = $(top_builddir)/otherlibs/highgui/libhighgui.la
138 _highgui_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LSPEC) \
139 -L$(SWIG_PYTHON_LIBS)