Removed internal functions from external header file
[debian/gnuradio] / usrp / host / lib / Makefile.am
1 #
2 #  USRP - Universal Software Radio Peripheral
3
4 #  Copyright (C) 2003,2004,2006,2007,2008,2009 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)
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 omnithreads
35 if FUSB_TECH_darwin
36 AM_CPPFLAGS = $(common_INCLUDES) $(OMNITHREAD_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
37 libusrp_la_LIBADD = $(libusrp_la_common_LIBADD) $(OMNITHREAD_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         fusb.h.in                       \
49         usrp_prims.h.in                 \
50         usrp_basic.h.in 
51
52 BUILT_SOURCES =                         \
53         $(abs_top_builddir)/usrp/host/include/usrp/usrp_dbid.h  \
54         fusb.h                                                  \
55         usrp_prims.h                                            \
56         usrp_basic.h
57
58 BUILT_SOURCES += usrp_dbid.cc \
59                  usrp_dbid.py
60
61 # ----------------------------------------------------------------
62 # FUSB_TECH is set at configure time by way of
63 #   usrp/config/usrp_fusb_tech.m4.
64 #   It indicates which fast usb strategy we should be building.
65 #   We currently implement "generic", "darwin", "win32" and "linux"
66
67
68 generic_CODE =                          \
69         fusb_generic.cc                 \
70         fusb_sysconfig_generic.cc       \
71         usrp_prims_libusb0.cc           \
72         usrp_basic_libusb0.cc
73
74 darwin_CODE =                           \
75         fusb_darwin.cc                  \
76         fusb_sysconfig_darwin.cc        \
77         README_OSX                      \
78         circular_buffer.h               \
79         circular_linked_list.h          \
80         darwin_libusb.h                 \
81         mld_threads.h                   \
82         usrp_prims_libusb0.cc           \
83         usrp_basic_libusb0.cc
84
85
86 win32_CODE =                            \
87         fusb_win32.cc                   \
88         fusb_sysconfig_win32.cc         \
89         usrp_prims_libusb0.cc           \
90         usrp_basic_libusb0.cc
91
92
93 linux_CODE =                            \
94         fusb_linux.cc                   \
95         fusb_sysconfig_linux.cc         \
96         usrp_prims_libusb0.cc           \
97         usrp_basic_libusb0.cc
98
99 ra_wb_CODE =                            \
100         fusb_ra_wb.cc                   \
101         fusb_sysconfig_ra_wb.cc         \
102         usrp_prims_libusb0.cc           \
103         usrp_basic_libusb0.cc
104
105 libusb1_CODE =                          \
106         fusb_libusb1.cc                 \
107         fusb_sysconfig_libusb1.cc       \
108         usrp_prims_libusb1.cc           \
109         usrp_basic_libusb1.cc
110
111 #
112 # include each <foo>_CODE entry here...
113 #
114 EXTRA_libusrp_la_SOURCES =              \
115         $(generic_CODE)                 \
116         $(darwin_CODE)                  \
117         $(win32_CODE)                   \
118         $(linux_CODE)                   \
119         $(ra_wb_CODE)                   \
120         $(libusb1_CODE)
121
122 # work around automake deficiency
123 libusrp_la_common_SOURCES =             \
124         fusb.cc                         \
125         md5.c                           \
126         usrp_basic_common.cc            \
127         usrp_config.cc                  \
128         usrp_dbid.cc                    \
129         usrp_local_sighandler.cc        \
130         usrp_prims_common.cc            \
131         usrp_standard.cc                \
132         db_boards.cc                    \
133         db_base.cc                      \
134         db_basic.cc                     \
135         db_tv_rx.cc                     \
136         db_tv_rx_mimo.cc                \
137         db_flexrf.cc                    \
138         db_flexrf_mimo.cc               \
139         db_dbs_rx.cc                    \
140         db_xcvr2450.cc                  \
141         db_dtt754.cc                    \
142         db_dtt768.cc                    \
143         db_util.cc
144
145 if FUSB_TECH_generic
146 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(generic_CODE)
147 endif
148
149 if FUSB_TECH_darwin
150 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(darwin_CODE)
151 endif
152
153 if FUSB_TECH_win32
154 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(win32_CODE)
155 endif
156
157 if FUSB_TECH_linux
158 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(linux_CODE)
159 endif
160
161 if FUSB_TECH_ra_wb
162 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(ra_wb_CODE)
163 endif
164
165 if FUSB_TECH_libusb1
166 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(libusb1_CODE)
167 endif
168
169
170 noinst_HEADERS =                        \
171         ad9862.h                        \
172         db_base_impl.h                  \
173         db_boards.h                     \
174         db_util.h                       \
175         fusb.h                          \
176         fusb_darwin.h                   \
177         fusb_generic.h                  \
178         fusb_linux.h                    \
179         fusb_libusb1.h                  \
180         fusb_ra_wb.h                    \
181         fusb_win32.h                    \
182         md5.h                           \
183         rate_to_regval.h                \
184         usrp_config.h                   \
185         usrp_primsi.h
186
187 if PYTHON
188 usrppython_PYTHON =                     \
189         usrp_dbid.py                    
190
191 noinst_PYTHON =                         \
192         gen_usrp_dbid.py                \
193         check_data.py                   \
194         dump_data.py
195 endif
196
197 # common way for generating sources from templates when using
198 # BUILT_SOURCES, using parallel build protection.
199 gen_sources = $(BUILT_SOURCES)
200 gen_sources_deps = gen_usrp_dbid.py usrp_dbid.dat
201 par_gen_command = PYTHONPATH=$(top_srcdir)/usrp/src srcdir=$(srcdir) $(PYTHON) $(srcdir)/gen_usrp_dbid.py $(srcdir)/usrp_dbid.dat
202 include $(top_srcdir)/Makefile.par.gen
203
204
205 # Generate libusb dependent header files from configure.
206 # These are already defined, but override them here, which throws warnings.
207 # Need to figure out how to separate rules for BUILD_SOURCES.
208 fusb.h: fusb.h.in $(top_srcdir)/config.status
209         cd $(top_srcdir) \
210           && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=fusb.h \
211         $(SHELL) ./config.status
212
213 usrp_prims.h: usrp_prims.h.in $(top_srcdir)/config.status
214         cd $(top_srcdir) \
215           && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=usrp_prims.h \
216         $(SHELL) ./config.status
217
218 usrp_basic.h: usrp_basic.h.in $(top_srcdir)/config.status
219         cd $(top_srcdir) \
220           && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=usrp_basic.h \
221         $(SHELL) ./config.status
222