Make C++ shared libraries versioned
[debian/gnuradio] / gr-usrp / src / Makefile.am
1 #
2 # Copyright 2004,2005,2006,2008,2009 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 # Misc. build/installation activities
26
27 EXTRA_DIST = run_tests.in
28
29 DISTCLEANFILES = run_tests
30
31 noinst_PYTHON = qa_usrp.py
32
33 # ----------------------------------------------------------------
34 # The straight C++ library
35
36 AM_CPPFLAGS = \
37         $(STD_DEFINES_AND_INCLUDES) \
38         $(PYTHON_CPPFLAGS) \
39         $(USRP_INCLUDES) \
40         $(USB_INCLUDES) \
41         $(WITH_INCLUDES)
42
43 lib_LTLIBRARIES = \
44         libgnuradio-usrp.la
45
46 libgnuradio_usrp_la_SOURCES = \
47         usrp_base.cc \
48         usrp_sink_base.cc \
49         usrp_sink_c.cc \
50         usrp_sink_s.cc \
51         usrp_source_base.cc \
52         usrp_source_c.cc \
53         usrp_source_s.cc
54
55 libgnuradio_usrp_la_LIBADD = \
56         $(GNURADIO_CORE_LA) \
57         $(USRP_LA)                      
58
59 libgnuradio_usrp_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
60
61 grinclude_HEADERS = \
62         usrp_base.h \
63         usrp_sink_base.h \
64         usrp_sink_c.h \
65         usrp_sink_s.h \
66         usrp_source_base.h \
67         usrp_source_c.h \
68         usrp_source_s.h
69
70 if PYTHON
71 # ----------------------------------------------------------------
72 # The SWIG library
73 TESTS = run_tests
74
75 TOP_SWIG_IFILES =               \
76         usrp_swig.i
77
78 # Install so that they end up available as:
79 #   import gnuradio.usrp
80 # This ends up at:
81 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio/usrp
82 usrp_swig_pythondir_category =  \
83         gnuradio/usrp
84
85 # additional arguments to the SWIG command
86 usrp_swig_swig_args =           \
87         $(USRP_INCLUDES)
88
89 # additional libraries for linking with the SWIG-generated library
90 usrp_swig_la_swig_libadd =      \
91         libgnuradio-usrp.la
92
93 # additional Python files to be installed along with the SWIG-generated one
94 usrp_swig_python =              \
95         __init__.py
96
97 # additional SWIG files to be installed
98 usrp_swig_swiginclude_headers = \
99         usrp_base.i             \
100         usrp_source_base.i      \
101         usrp_source_c.i         \
102         usrp_source_s.i         \
103         usrp_sink_base.i        \
104         usrp_sink_c.i           \
105         usrp_sink_s.i           \
106         usrp_standard.i
107
108 include $(top_srcdir)/Makefile.swig
109
110 # add some of the variables generated inside the Makefile.swig.gen
111 BUILT_SOURCES = $(swig_built_sources)
112
113 # Do not distribute the output of SWIG
114 no_dist_files = $(swig_built_sources)
115 endif