d4e4a3818bd0bb177317990f73c0fc6d86cfece6
[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., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
20
21
22 include $(top_srcdir)/Makefile.common
23
24 TESTS = test_pmt
25
26 lib_LTLIBRARIES = libpmt.la libpmt-qa.la
27
28 # ----------------------------------------------------------------
29 # these scripts generate code
30
31 CODE_GENERATOR =                        \
32         generate_unv.py                 \
33         unv_template.h.t                \
34         unv_template.cc.t               \
35         unv_qa_template.cc.t            
36
37 GENERATED_H =                           \
38         pmt_unv_int.h                   \
39         qa_pmt_unv.h                    
40
41 GENERATED_CC =                          \
42         pmt_unv.cc                      \
43         qa_pmt_unv.cc                   
44
45
46 $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC): $(CODE_GENERATOR)
47         PYTHONPATH=$(top_srcdir)/pmt/src/lib srcdir=$(srcdir) $(srcdir)/generate_unv.py
48
49 BUILT_SOURCES = $(GENERATED_H) $(GENERATED_CC)
50
51 # ----------------------------------------------------------------
52
53 EXTRA_DIST =                            \
54         $(CODE_GENERATOR)
55
56
57 # These are the source files that go into the pmt shared library
58 libpmt_la_SOURCES =                     \
59         pmt.cc                          \
60         pmt_unv.cc                      
61
62 # magic flags
63 libpmt_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
64
65 # link the library against the c++ standard library
66 libpmt_la_LIBADD =                      \
67         -lstdc++                        
68
69 include_HEADERS =                       \
70         pmt.h
71
72 noinst_HEADERS =                        \
73         $(GENERATED_H)                  \
74         pmt_int.h                       \
75         qa_pmt.h                        \
76         qa_pmt_prims.h                  
77
78
79 # Build the qa code into its own library
80
81 libpmt_qa_la_SOURCES =                  \
82         qa_pmt.cc                       \
83         qa_pmt_prims.cc                 \
84         qa_pmt_unv.cc                   
85
86 # magic flags
87 libpmt_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
88
89 # link the library against the c++ standard library
90 libpmt_qa_la_LIBADD =                   \
91         $(CPPUNIT_LIBS)                 \
92         -lstdc++                        
93
94
95 noinst_PROGRAMS =                       \
96         test_pmt
97
98
99 LIBPMT   = libpmt.la
100 LIBPMTQA = libpmt-qa.la $(LIBPMT)
101
102 test_pmt_SOURCES = test_pmt.cc
103 test_pmt_LDADD   = $(LIBPMTQA)
104
105
106 CLEANFILES = $(BUILT_SOURCES) *.pyc