Fixes ticket:139
[debian/gnuradio] / pmt / src / lib / Makefile.am
1 #
2 # Copyright 2006 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 2, 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 = $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES)
25
26 TESTS = test_pmt
27
28 lib_LTLIBRARIES = libpmt.la libpmt-qa.la
29
30 # ----------------------------------------------------------------
31 # these scripts generate code
32
33 CODE_GENERATOR =                        \
34         generate_unv.py                 \
35         unv_template.h.t                \
36         unv_template.cc.t               \
37         unv_qa_template.cc.t            
38
39 GENERATED_H =                           \
40         pmt_unv_int.h                   \
41         qa_pmt_unv.h                    
42
43 GENERATED_CC =                          \
44         pmt_unv.cc                      \
45         qa_pmt_unv.cc                   
46
47
48 $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC): $(CODE_GENERATOR)
49         PYTHONPATH=$(top_srcdir)/pmt/src/lib srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_unv.py
50
51 BUILT_SOURCES = $(GENERATED_H) $(GENERATED_CC)
52
53 # ----------------------------------------------------------------
54
55 EXTRA_DIST =                            \
56         $(CODE_GENERATOR)
57
58
59 # These are the source files that go into the pmt shared library
60 libpmt_la_SOURCES =                     \
61         pmt.cc                          \
62         pmt_io.cc                       \
63         pmt_unv.cc                      
64
65 # magic flags
66 libpmt_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
67
68 # link the library against the c++ standard library
69 libpmt_la_LIBADD =                      \
70         -lstdc++                        
71
72 include_HEADERS =                       \
73         pmt.h
74
75 noinst_HEADERS =                        \
76         $(GENERATED_H)                  \
77         pmt_int.h                       \
78         qa_pmt.h                        \
79         qa_pmt_prims.h                  
80
81
82 # Build the qa code into its own library
83
84 libpmt_qa_la_SOURCES =                  \
85         qa_pmt.cc                       \
86         qa_pmt_prims.cc                 \
87         qa_pmt_unv.cc                   
88
89 # magic flags
90 libpmt_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
91
92 # link the library against the c++ standard library
93 # Note: Win32 libtool doesn't pull dependencies from the .la file
94 # correctly, so we must add $(PMT_LIBS) below
95 libpmt_qa_la_LIBADD =                   \
96         libpmt.la                       \
97         $(PMT_LIBS)                     \
98         $(CPPUNIT_LIBS)                 \
99         -lstdc++                        
100
101
102 noinst_PROGRAMS =                       \
103         test_pmt
104
105
106 LIBPMT   = libpmt.la
107 LIBPMTQA = libpmt-qa.la $(LIBPMT)
108
109 test_pmt_SOURCES = test_pmt.cc
110 test_pmt_LDADD   = $(LIBPMTQA)
111
112
113 CLEANFILES = $(BUILT_SOURCES) *.pyc