Merged r10071:10164 from features/cppdb-test into trunk. Implements the fully native...
[debian/gnuradio] / gr-usrp / src / Makefile.am
1 #
2 # Copyright 2004,2005,2006,2008 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 3, 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 # ----------------------------------------------------------------
25 # The straight C++ library
26
27 AM_CPPFLAGS = \
28         $(STD_DEFINES_AND_INCLUDES) \
29         $(PYTHON_CPPFLAGS) \
30         $(USRP_INCLUDES) \
31         $(WITH_INCLUDES)
32
33 lib_LTLIBRARIES = \
34         libgnuradio-usrp.la
35
36 libgnuradio_usrp_la_SOURCES = \
37         usrp_base.cc \
38         usrp_sink_base.cc \
39         usrp_sink_c.cc \
40         usrp_sink_s.cc \
41         usrp_source_base.cc \
42         usrp_source_c.cc \
43         usrp_source_s.cc
44
45 libgnuradio_usrp_la_LIBADD = \
46         $(GNURADIO_CORE_LA) \
47         $(USRP_LA)                      
48
49 libgnuradio_usrp_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
50
51 grinclude_HEADERS = \
52         usrp_base.h \
53         usrp_sink_base.h \
54         usrp_sink_c.h \
55         usrp_sink_s.h \
56         usrp_source_base.h \
57         usrp_source_c.h \
58         usrp_source_s.h
59
60 # ----------------------------------------------------------------
61 # The SWIG library and Python modules
62 #
63 # Install this stuff so that it ends up as the gnuradio.usrp module
64 # This usually ends up at:
65 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio/usrp
66
67 ourpythondir = $(grpythondir)/usrp
68 ourlibdir    = $(grpyexecdir)/usrp
69
70 BUILT_SOURCES = \
71         usrp_swig.cc \
72         usrp_swig.py            
73
74 LOCAL_IFILES = \
75         $(srcdir)/usrp.i \
76         $(srcdir)/usrp_base.i \
77         $(srcdir)/usrp_source_base.i \
78         $(srcdir)/usrp_source_c.i \
79         $(srcdir)/usrp_source_s.i \
80         $(srcdir)/usrp_sink_base.i \
81         $(srcdir)/usrp_sink_c.i \
82         $(srcdir)/usrp_sink_s.i \
83         $(srcdir)/usrp_standard.i
84
85 NON_LOCAL_IFILES = \
86         $(GNURADIO_I)
87
88 ALL_IFILES = \
89         $(LOCAL_IFILES) \
90         $(NON_LOCAL_IFILES)             
91
92 ourlib_LTLIBRARIES = \
93         _usrp_swig.la
94
95 ourlib_PYTHON = \
96         __init__.py \
97         usrp_swig.py
98
99 _usrp_swig_la_SOURCES = \
100         usrp_swig.cc                    
101
102 _usrp_swig_la_LIBADD = \
103         $(PYTHON_LDFLAGS) \
104         libgnuradio-usrp.la
105
106 _usrp_swig_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
107
108 _usrp_swig_la_CXXFLAGS = @swig_CXXFLAGS@
109
110 SWIGPYTHONARGS = \
111         $(SWIGPYTHONFLAGS) \
112         $(STD_DEFINES_AND_INCLUDES) \
113         $(USRP_INCLUDES) \
114         $(WITH_INCLUDES) \
115         $(WITH_SWIG_INCLUDES)
116
117 usrp_swig.cc usrp_swig.py: $(ALL_IFILES)
118         $(SWIG) $(SWIGPYTHONARGS) -module usrp_swig -o usrp_swig.cc $(srcdir)/usrp.i
119
120 noinst_PYTHON = \
121         qa_usrp.py                      
122
123 swiginclude_HEADERS = \
124         $(LOCAL_IFILES)
125
126 # Don't distribute output of swig
127 dist-hook:
128         @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
129         @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
130
131 # ----------------------------------------------------------------
132 # Misc. build/installation activities
133
134 MOSTLYCLEANFILES = $(BUILT_SOURCES) *~ *.pyc
135 EXTRA_DIST = run_tests.in
136 TESTS = run_tests