Update to 2.0.0 tree from current Fremantle build
[opencv] / interfaces / swig / python / Makefile.am
1 # opencv/interfaces/swig/python/Makefile.am
2 # 2005-05-07, Mark Asbach <asbach@ient.rwth-aachen.de>
3
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
6
7 CV_INCLUDES = -I$(top_srcdir)/include/opencv -I$(srcdir)
8
9 AM_CPPFLAGS = \
10   $(CV_INCLUDES)                     \
11   -DCV_NO_BACKWARD_COMPATIBILITY
12
13 noinst_PYTHON = setup-for-win.py
14
15 EXTRA_DIST = \
16   \
17   CMakeLists.txt   \
18   \
19   __init__.py      \
20   \
21   cv.py            \
22   adaptors.py      \
23   highgui.py       \
24   matlab_syntax.py \
25   \
26   cv.i             \
27   cvaliases.i      \
28   cvaliases_autogen.i \
29   cvarr.i          \
30   cvseq.i          \
31   cvshadow.i       \
32   cvswigmacros.i   \
33   ml.i             \
34   highgui.i        \
35   imagedata.i      \
36   nointpb.i        \
37   pyhelpers.i      \
38   pytypemaps.i     \
39   \
40   cvshadow.h       \
41   error.h          \
42   pycvseq.hpp      \
43   pyhelpers.h      \
44   \
45   _cv.cpp          \
46   _ml.cpp          \
47   _highgui.cpp     \
48   cvshadow.cpp     \
49   error.cpp        \
50   pyhelpers.cpp
51
52
53 # SWIG #######################################################################
54
55 # the following rules keep wrappers up to date, if SWIG is present
56 if UPDATE_SWIG_WRAPPERS
57
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 \
61          error.cpp error.h                                      \
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       \
70          ../filtered/cv.h            \
71          ../filtered/constants.h     \
72          Makefile.in
73         $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -o $@ $<
74
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                 \
80               Makefile.in
81         $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -DSKIP_INCLUDES -o $@ $<
82
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            \
89               Makefile.in
90         $(SWIG) $(SWIG_PYTHON_OPT) $(CV_INCLUDES) -DSKIP_INCLUDES -o $@ $<
91
92 CV_HEADER_FILES = \
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
97
98 cvaliases_autogen.i: $(CV_HEADER_FILES) Makefile.in
99         $(PYTHON) $(top_srcdir)/utils/extract_aliases.py $(CV_HEADER_FILES) > $@
100
101 endif
102
103
104 # Conditional targets #######################################################
105
106 if BUILD_PYTHON_WRAPPERS
107
108 pkgpyexec_LTLIBRARIES = _cv.la _ml.la _highgui.la
109
110 pkgpyexec_PYTHON = \
111   __init__.py    \
112   cv.py          \
113   ml.py          \
114   highgui.py     \
115   adaptors.py    \
116   matlab_syntax.py
117
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@
124
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@
129
130 _highgui_la_SOURCES    = _highgui.cpp pyhelpers.cpp pyhelpers.h \
131                          highgui.i
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@
135
136 endif