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
7 CV_INCLUDES = -I$(top_srcdir)/include/opencv -I$(srcdir)
11 -DCV_NO_BACKWARD_COMPATIBILITY
13 noinst_PYTHON = setup-for-win.py
53 # SWIG #######################################################################
55 # the following rules keep wrappers up to date, if SWIG is present
56 if UPDATE_SWIG_WRAPPERS
58 # this rule creates the Python wrapper sources for cxcore and cv
59 _cv.cpp: cv.i imagedata.i cvarr.i cvaliases.i cvaliases_autogen.i pyhelpers.i \
60 nointpb.i pytypemaps.i cvshadow.i cvseq.i cvswigmacros.i \
62 pyhelpers.h cvshadow.h pycvseq.hpp \
63 $(top_srcdir)/interfaces/swig/general/cv.i \
64 $(top_srcdir)/interfaces/swig/general/memory.i \
65 $(top_srcdir)/interfaces/swig/general/typemaps.i \
66 $(top_srcdir)/interfaces/swig/general/extensions.i \
67 $(top_srcdir)/interfaces/swig/general/doublepointers.i \
68 $(top_srcdir)/interfaces/swig/general/sizeof.i \
69 $(top_srcdir)/interfaces/swig/general/cvmacros.i \
71 ../filtered/constants.h \
73 $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -o $@ $<
75 # this rule creates the Python wrapper sources for ml
76 _ml.cpp: ml.i nointpb.i pytypemaps.i cvswigmacros.i \
77 $(top_srcdir)/interfaces/swig/general/typemaps.i \
78 $(top_srcdir)/interfaces/swig/general/memory.i \
79 $(top_srcdir)/include/opencv/ml.h \
81 $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -DSKIP_INCLUDES -o $@ $<
83 # this rule creates the Python wrapper sources for highgui
84 _highgui.cpp: highgui.i nointpb.i pytypemaps.i cvswigmacros.i \
85 $(top_srcdir)/interfaces/swig/general/highgui.i \
86 $(top_srcdir)/interfaces/swig/general/typemaps.i \
87 $(top_srcdir)/interfaces/swig/general/memory.i \
88 $(top_srcdir)/include/opencv/highgui.h \
90 $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -DSKIP_INCLUDES -o $@ $<
93 $(top_srcdir)/include/opencv/cxtypes.h \
94 $(top_srcdir)/include/opencv/cxcore.h \
95 $(top_srcdir)/include/opencv/cvtypes.h \
96 $(top_srcdir)/include/opencv/cv.h
98 cvaliases_autogen.i: $(CV_HEADER_FILES) Makefile.in
99 $(PYTHON) $(top_srcdir)/utils/extract_aliases.py $(CV_HEADER_FILES) > $@
104 # Conditional targets #######################################################
106 if BUILD_PYTHON_WRAPPERS
108 pkgpyexec_LTLIBRARIES = _cv.la _ml.la _highgui.la
118 _cv_la_SOURCES = _cv.cpp error.cpp error.h pyhelpers.cpp pyhelpers.h \
119 pycvseq.hpp cvshadow.cpp cvshadow.h \
120 cv.i imagedata.i cvarr.i nointpb.i pytypemaps.i cvseq.i cvshadow.i
121 _cv_la_CXXFLAGS = $(PYTHON_CSPEC) $(AM_CXXFLAGS)
122 _cv_la_LIBADD = $(top_builddir)/src/libcv.la $(top_builddir)/src/libcxcore.la
123 _cv_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LSPEC) $(SWIG_PYTHON_LIBS) @LDFLAGS@
125 _ml_la_SOURCES = _ml.cpp pyhelpers.cpp pyhelpers.h
126 _ml_la_CXXFLAGS = $(PYTHON_CSPEC) $(AM_CXXFLAGS)
127 _ml_la_LIBADD = $(top_builddir)/src/libml.la
128 _ml_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LSPEC) $(SWIG_PYTHON_LIBS) @LDFLAGS@
130 _highgui_la_SOURCES = _highgui.cpp pyhelpers.cpp pyhelpers.h \
132 _highgui_la_CXXFLAGS = $(PYTHON_CSPEC) $(AM_CXXFLAGS)
133 _highgui_la_LIBADD = $(top_builddir)/src/libhighgui.la
134 _highgui_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LSPEC) $(SWIG_PYTHON_LIBS) @LDFLAGS@