Imported Upstream version 3.2.2
[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 AM_CPPFLAGS = $(DEFINES) $(OMNITHREAD_INCLUDES) $(BOOST_CPPFLAGS) \
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 python_built_sources = $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC)
49
50 BUILT_SOURCES = $(python_built_sources) pmt_serial_tags.h
51
52 # ----------------------------------------------------------------
53
54 EXTRA_DIST =                            \
55         $(code_generator)
56
57 # These are the source files that go into the pmt shared library
58 libpmt_la_SOURCES =                     \
59         pmt.cc                          \
60         pmt_io.cc                       \
61         pmt_pool.cc                     \
62         pmt_serialize.cc                \
63         pmt_unv.cc                      
64
65 # magic flags
66 libpmt_la_LDFLAGS = $(NO_UNDEFINED)
67
68 # link the library against the c++ standard library
69 libpmt_la_LIBADD =                      \
70         $(OMNITHREAD_LA)                \
71         -lstdc++                        
72
73 include_HEADERS =                       \
74         pmt.h                           \
75         pmt_pool.h                      \
76         pmt_serial_tags.h               
77
78 noinst_HEADERS =                        \
79         $(GENERATED_H)                  \
80         pmt_int.h                       \
81         qa_pmt.h                        \
82         qa_pmt_prims.h                  
83
84
85 # Build the qa code into its own library
86
87 libpmt_qa_la_SOURCES =                  \
88         qa_pmt.cc                       \
89         qa_pmt_prims.cc                 \
90         qa_pmt_unv.cc                   
91
92 # magic flags
93 libpmt_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid version
94
95 libpmt_qa_la_LIBADD =                   \
96         libpmt.la                       \
97         $(CPPUNIT_LIBS)                 \
98         -lstdc++                        
99
100
101 noinst_PROGRAMS =                       \
102         test_pmt
103
104
105 LIBPMT   = libpmt.la
106 LIBPMTQA = libpmt-qa.la $(LIBPMT)
107
108 test_pmt_SOURCES = test_pmt.cc
109 test_pmt_LDADD   = $(LIBPMTQA)
110
111 # Do creation and inclusion of other Makefiles last
112
113 # common way for generating sources from templates when using
114 # BUILT_SOURCES, using parallel build protection.
115 gen_sources = $(python_built_sources)
116 gen_sources_deps = $(core_generator)
117 par_gen_command = PYTHONPATH=$(top_srcdir)/pmt/src/lib srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_unv.py
118 include $(top_srcdir)/Makefile.par.gen
119
120 # Rule to create the build header file using GUILE
121 # Doesn't need parallel protections because there is a single target
122 pmt_serial_tags.h: $(srcdir)/../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../scheme/gnuradio/pmt-serial-tags.scm
123         $(RUN_GUILE) $(srcdir)/../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../scheme/gnuradio/pmt-serial-tags.scm pmt_serial_tags.h