Merge branch 'master' into wip/burx_support
[debian/gnuradio] / usrp / host / lib / Makefile.am
1 #
2 #  USRP - Universal Software Radio Peripheral
3 #
4 #  Copyright (C) 2003,2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
5 #
6 #  This program 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 of the License, or
9 #  (at your option) any later version.
10 #
11 #  This program 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 this program; if not, write to the Free Software
18 #  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
19 #
20
21 include $(top_srcdir)/Makefile.common
22
23 common_INCLUDES = $(USRP_INCLUDES) $(USB_INCLUDES)
24
25 lib_LTLIBRARIES = libusrp.la
26
27 libusrp_la_common_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 $(BOOST_LDFLAGS)
28
29 libusrp_la_common_LIBADD =              \
30         $(USB_LIBS)                     \
31         $(BOOST_THREAD_LIB)             \
32         ../misc/libmisc.la
33
34 # darwin fusb requires gruel (for threading)
35 if FUSB_TECH_darwin
36 AM_CPPFLAGS = $(common_INCLUDES) $(GRUEL_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
37 libusrp_la_LIBADD = $(libusrp_la_common_LIBADD) $(GRUEL_LA)
38 libusrp_la_LDFLAGS = $(libusrp_la_common_LDFLAGS) -framework CoreFoundation
39 else
40 AM_CPPFLAGS = $(common_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
41 libusrp_la_LIBADD = $(libusrp_la_common_LIBADD)
42 libusrp_la_LDFLAGS = $(libusrp_la_common_LDFLAGS)
43 endif
44
45 EXTRA_DIST =                            \
46         std_paths.h.in                  \
47         usrp_dbid.dat
48
49 BUILT_SOURCES = $(abs_top_builddir)/usrp/host/include/usrp/usrp_dbid.h
50
51 BUILT_SOURCES += usrp_dbid.cc \
52                  usrp_dbid.py
53
54 # ----------------------------------------------------------------
55 # FUSB_TECH is set at configure time by way of
56 #   usrp/config/usrp_fusb_tech.m4.
57 #   It indicates which fast usb strategy we should be building.
58 #   We currently implement "generic", "darwin", "win32" and "linux"
59
60
61 generic_CODE =                          \
62         fusb_generic.cc                 \
63         fusb_sysconfig_generic.cc       \
64         usrp_prims_libusb0.cc           
65
66 darwin_CODE =                           \
67         fusb_darwin.cc                  \
68         fusb_sysconfig_darwin.cc        \
69         README_OSX                      \
70         circular_buffer.h               \
71         circular_linked_list.h          \
72         darwin_libusb.h                 \
73         usrp_prims_libusb0.cc           
74
75
76 win32_CODE =                            \
77         fusb_win32.cc                   \
78         fusb_sysconfig_win32.cc         \
79         usrp_prims_libusb0.cc           
80
81
82 linux_CODE =                            \
83         fusb_linux.cc                   \
84         fusb_sysconfig_linux.cc         \
85         usrp_prims_libusb0.cc           
86
87 ra_wb_CODE =                            \
88         fusb_ra_wb.cc                   \
89         fusb_sysconfig_ra_wb.cc         \
90         usrp_prims_libusb0.cc           
91
92 libusb1_CODE =                          \
93         fusb_libusb1.cc                 \
94         fusb_sysconfig_libusb1.cc       \
95         usrp_prims_libusb1.cc           
96
97 #
98 # include each <foo>_CODE entry here...
99 #
100 EXTRA_libusrp_la_SOURCES =              \
101         $(generic_CODE)                 \
102         $(darwin_CODE)                  \
103         $(win32_CODE)                   \
104         $(linux_CODE)                   \
105         $(ra_wb_CODE)                   \
106         $(libusb1_CODE)
107
108 # work around automake deficiency
109 libusrp_la_common_SOURCES =             \
110         fusb.cc                         \
111         md5.c                           \
112         usrp_basic.cc                   \
113         usrp_config.cc                  \
114         usrp_dbid.cc                    \
115         usrp_local_sighandler.cc        \
116         usrp_prims_common.cc            \
117         usrp_standard.cc                \
118         db_wbxng_adf4350.cc             \
119         db_wbxng_adf4350_regs.cc        \
120         db_boards.cc                    \
121         db_base.cc                      \
122         db_basic.cc                     \
123         db_bitshark_rx.cc               \
124         db_tv_rx.cc                     \
125         db_tv_rx_mimo.cc                \
126         db_flexrf.cc                    \
127         db_flexrf_mimo.cc               \
128         db_dbs_rx.cc                    \
129         db_wbxng.cc                     \
130         db_xcvr2450.cc                  \
131         db_dtt754.cc                    \
132         db_dtt768.cc                    \
133         db_util.cc
134
135 if FUSB_TECH_generic
136 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(generic_CODE)
137 endif
138
139 if FUSB_TECH_darwin
140 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(darwin_CODE)
141 endif
142
143 if FUSB_TECH_win32
144 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(win32_CODE)
145 endif
146
147 if FUSB_TECH_linux
148 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(linux_CODE)
149 endif
150
151 if FUSB_TECH_ra_wb
152 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(ra_wb_CODE)
153 endif
154
155 if FUSB_TECH_libusb1
156 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(libusb1_CODE)
157 endif
158
159
160 noinst_HEADERS =                        \
161         ad9862.h                        \
162         db_base_impl.h                  \
163         db_boards.h                     \
164         db_util.h                       \
165         db_wbxng_adf4350.h              \
166         db_wbxng_adf4350_regs.h         \
167         fusb.h                          \
168         fusb_darwin.h                   \
169         fusb_generic.h                  \
170         fusb_linux.h                    \
171         fusb_libusb1.h                  \
172         fusb_ra_wb.h                    \
173         fusb_win32.h                    \
174         md5.h                           \
175         rate_to_regval.h                \
176         usrp_config.h                   \
177         usrp_primsi.h
178
179 if PYTHON
180 usrppython_PYTHON =                     \
181         usrp_dbid.py                    
182
183 noinst_PYTHON =                         \
184         gen_usrp_dbid.py                \
185         check_data.py                   \
186         dump_data.py
187 endif
188
189 # common way for generating sources from templates when using
190 # BUILT_SOURCES, using parallel build protection.
191 gen_sources = $(BUILT_SOURCES)
192 gen_sources_deps = gen_usrp_dbid.py usrp_dbid.dat
193 par_gen_command = PYTHONPATH=$(top_srcdir)/usrp/src srcdir=$(srcdir) $(PYTHON) $(srcdir)/gen_usrp_dbid.py $(srcdir)/usrp_dbid.dat
194 include $(top_srcdir)/Makefile.par.gen