better (read: real) fix for ticket:15
[debian/gnuradio] / usrp / host / swig / Makefile.am
1 #
2 # Copyright 2001,2003,2004 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., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, 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
31 LOCAL_IFILES =                          \
32         prims.i
33
34
35 ALL_IFILES =                            \
36         $(LOCAL_IFILES)                 
37
38
39 EXTRA_DIST =                            \
40         $(LOCAL_IFILES)
41
42
43 BUILT_SOURCES =                         \
44         prims.cc                        \
45         usrp_prims.py
46
47
48 ourpython_PYTHON =                      \
49         __init__.py                     \
50         usrp_fpga_regs.py               \
51         usrp_prims.py                   
52
53
54 INCLUDES = $(USRP_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir)
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 $<
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