Imported Upstream version 3.0
[debian/gnuradio] / usrp / host / lib / Makefile.am
1 #
2 #  USRP - Universal Software Radio Peripheral
3
4 #  Copyright (C) 2003,2004,2006 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 2 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 INCLUDES = $(USRP_INCLUDES)
24
25 lib_LTLIBRARIES = libusrp.la
26
27
28 EXTRA_DIST =                            \
29         std_paths.h.in                  \
30         usrp_dbid.dat                   
31
32
33 BUILT_SOURCES =                         \
34         usrp_dbid.h                     \
35         usrp_dbid.cc                    \
36         usrp_dbid.py                    
37
38
39 # ----------------------------------------------------------------
40 # FUSB_TECH is set at configure time by way of
41 #   usrp/config/usrp_fusb_tech.m4.
42 #   It indicates which fast usb strategy we should be building.
43 #   We currently implement "generic", "darwin", "win32" and "linux"
44
45
46 generic_CODE =                          \
47         fusb_generic.cc                 \
48         fusb_sysconfig_generic.cc
49
50 darwin_CODE =                           \
51         fusb_darwin.cc                  \
52         fusb_sysconfig_darwin.cc        \
53         README_OSX                      \
54         circular_buffer.h               \
55         circular_linked_list.h          \
56         darwin_libusb.h                 \
57         mld_threads.h                   
58
59 win32_CODE =                            \
60         fusb_win32.cc                   \
61         fusb_sysconfig_win32.cc         
62
63 linux_CODE =                            \
64         fusb_linux.cc                   \
65         fusb_sysconfig_linux.cc         
66
67 ra_wb_CODE =                            \
68         fusb_ra_wb.cc                   \
69         fusb_sysconfig_ra_wb.cc
70
71
72 #
73 # include each <foo>_CODE entry here...
74 #
75 EXTRA_libusrp_la_SOURCES =              \
76         $(generic_CODE)                 \
77         $(darwin_CODE)                  \
78         $(win32_CODE)                   \
79         $(linux_CODE)                   \
80         $(ra_wb_CODE)
81
82
83 # work around automake deficiency
84 libusrp_la_common_SOURCES =             \
85         fusb.cc                         \
86         md5.c                           \
87         usrp_basic.cc                   \
88         usrp_config.cc                  \
89         usrp_dbid.cc                    \
90         usrp_local_sighandler.cc        \
91         usrp_prims.cc                   \
92         usrp_standard.cc
93
94
95 if FUSB_TECH_generic
96 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(generic_CODE)
97 endif
98
99 if FUSB_TECH_darwin
100 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(darwin_CODE)
101 endif
102
103 if FUSB_TECH_win32
104 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(win32_CODE)
105 endif
106
107 if FUSB_TECH_linux
108 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(linux_CODE)
109 endif
110
111 if FUSB_TECH_ra_wb
112 libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(ra_wb_CODE)
113 endif
114
115
116 libusrp_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
117 libusrp_la_LIBADD = $(USB_LIBS) ../misc/libmisc.la
118
119 include_HEADERS =                       \
120         usrp_basic.h                    \
121         usrp_bytesex.h                  \
122         usrp_config.h                   \
123         usrp_dbid.h                     \
124         usrp_prims.h                    \
125         usrp_slots.h                    \
126         usrp_standard.h                 
127
128 noinst_HEADERS =                        \
129         ad9862.h                        \
130         fusb.h                          \
131         fusb_darwin.h                   \
132         fusb_win32.h                    \
133         fusb_generic.h                  \
134         fusb_linux.h                    \
135         fusb_ra_wb.h                    \
136         md5.h                           \
137         rate_to_regval.h                \
138         usrp_local_sighandler.h         
139
140 python_PYTHON =                         \
141         usrp_dbid.py                    
142
143 noinst_PYTHON =                         \
144         gen_usrp_dbid.py                \
145         check_data.py                   \
146         dump_data.py
147
148 usrp_dbid.py usrp_dbid.h usrp_dbid.cc: gen_usrp_dbid.py usrp_dbid.dat
149         PYTHONPATH=$(top_srcdir)/usrp/src srcdir=$(srcdir) $(srcdir)/gen_usrp_dbid.py $(srcdir)/usrp_dbid.dat
150
151 MOSTLYCLEANFILES = \
152         $(BUILT_SOURCES) *~ *.pyc