Merged r7478:7608 from michaelld/t186 into trunk. Adds ability to compile GNU Radio...
[debian/gnuradio] / pmt / src / lib / Makefile.am
1 #
2 # Copyright 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 INCLUDES = $(DEFINES) $(OMNITHREAD_INCLUDES) $(BOOST_CFLAGS) \
25         $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
26
27 TESTS = test_pmt
28
29 lib_LTLIBRARIES = libpmt.la libpmt-qa.la
30
31 # ----------------------------------------------------------------
32 # these scripts generate code
33
34 CODE_GENERATOR =                        \
35         generate_unv.py                 \
36         unv_template.h.t                \
37         unv_template.cc.t               \
38         unv_qa_template.cc.t            
39
40 GENERATED_H =                           \
41         pmt_unv_int.h                   \
42         qa_pmt_unv.h                    
43
44 GENERATED_CC =                          \
45         pmt_unv.cc                      \
46         qa_pmt_unv.cc                   
47
48
49 $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC): $(CODE_GENERATOR)
50         PYTHONPATH=$(top_srcdir)/pmt/src/lib srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_unv.py
51
52 pmt_serial_tags.h: $(srcdir)/../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../scheme/gnuradio/pmt-serial-tags.scm
53         $(RUN_GUILE) $(srcdir)/../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../scheme/gnuradio/pmt-serial-tags.scm pmt_serial_tags.h
54
55 BUILT_SOURCES = $(GENERATED_H) $(GENERATED_CC) pmt_serial_tags.h
56
57 # ----------------------------------------------------------------
58
59 EXTRA_DIST =                            \
60         $(CODE_GENERATOR)               
61
62 # These are the source files that go into the pmt shared library
63 libpmt_la_SOURCES =                     \
64         pmt.cc                          \
65         pmt_io.cc                       \
66         pmt_pool.cc                     \
67         pmt_serialize.cc                \
68         pmt_unv.cc                      
69
70 # magic flags
71 libpmt_la_LDFLAGS = $(NO_UNDEFINED)
72
73 # link the library against the c++ standard library
74 libpmt_la_LIBADD =                      \
75         $(OMNITHREAD_LA)                \
76         -lstdc++                        
77
78 include_HEADERS =                       \
79         pmt.h                           \
80         pmt_pool.h                      \
81         pmt_serial_tags.h               
82
83 noinst_HEADERS =                        \
84         $(GENERATED_H)                  \
85         pmt_int.h                       \
86         qa_pmt.h                        \
87         qa_pmt_prims.h                  
88
89
90 # Build the qa code into its own library
91
92 libpmt_qa_la_SOURCES =                  \
93         qa_pmt.cc                       \
94         qa_pmt_prims.cc                 \
95         qa_pmt_unv.cc                   
96
97 # magic flags
98 libpmt_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid version
99
100 libpmt_qa_la_LIBADD =                   \
101         libpmt.la                       \
102         $(CPPUNIT_LIBS)                 \
103         -lstdc++                        
104
105
106 noinst_PROGRAMS =                       \
107         test_pmt
108
109
110 LIBPMT   = libpmt.la
111 LIBPMTQA = libpmt-qa.la $(LIBPMT)
112
113 test_pmt_SOURCES = test_pmt.cc
114 test_pmt_LDADD   = $(LIBPMTQA)
115
116
117 CLEANFILES = $(BUILT_SOURCES) *.pyc