Imported Upstream version 3.0
[debian/gnuradio] / usrp / host / swig / Makefile.am
1 #
2 # Copyright 2001,2003,2004,2006 Free Software Foundation, Inc.
3
4 # This file is part of GNU Radio
5
6 # GNU Radio is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # GNU Radio is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Radio; see the file COPYING.  If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street,
19 # Boston, MA 02110-1301, USA.
20
21
22 include $(top_srcdir)/Makefile.common
23
24 # This usually ends up at:
25 #   ${prefix}/lib/python${python_version}/site-packages/usrp_prims
26
27 ourpythondir = $(pythondir)
28 ourlibdir    = $(pyexecdir)
29
30 INCLUDES = $(USRP_INCLUDES)             \
31            $(PYTHON_CPPFLAGS)           \
32            -I$(srcdir)
33
34 LOCAL_IFILES =                          \
35         prims.i
36
37
38 ALL_IFILES =                            \
39         $(LOCAL_IFILES)                 
40
41
42 EXTRA_DIST =                            \
43         $(LOCAL_IFILES)
44
45
46 BUILT_SOURCES =                         \
47         prims.cc                        \
48         usrp_prims.py
49
50
51 ourpython_PYTHON =                      \
52         __init__.py                     \
53         usrp_fpga_regs.py               \
54         usrp_prims.py                   
55
56
57 SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(INCLUDES)
58
59
60 ourlib_LTLIBRARIES =                    \
61         _usrp_prims.la
62
63 _usrp_prims_la_SOURCES =                \
64         prims.cc                
65
66
67 noinst_HEADERS =
68
69 _usrp_prims_la_LIBADD  = $(top_builddir)/usrp/host/lib/libusrp.la -lstdc++ $(PYTHON_LDFLAGS)
70 _usrp_prims_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
71
72
73 prims.cc usrp_prims.py : prims.i ../../firmware/include/fpga_regs_common.h ../../firmware/include/fpga_regs_standard.h
74         $(SWIG) $(SWIGPYTHONARGS) -module usrp_prims -o prims.cc prims.i
75
76
77 MOSTLYCLEANFILES = \
78         prims.cc usrp_prims.py *~ *.pyc
79
80 # Don't distribute output of swig
81 dist-hook:
82         @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
83         @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
84