Merged r4456:4483 from jcorgan/ticket-138 into trunk. Fixes ticket:138.
[debian/gnuradio] / Makefile.common
1 # -*- Makefile -*-
2 #
3 # Copyright 2004,2006 Free Software Foundation, Inc.
4
5 # This file is part of GNU Radio
6
7 # GNU Radio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # GNU Radio is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Radio; see the file COPYING.  If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street,
20 # Boston, MA 02110-1301, USA.
21
22
23 AM_CXXFLAGS = @autoconf_default_CXXFLAGS@
24
25 # includes
26 grincludedir   = $(includedir)/gnuradio
27
28 # swig includes 
29 swigincludedir = $(grincludedir)/swig
30
31 # Install this stuff in the appropriate subdirectory
32 # This usually ends up at:
33 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio
34
35 grpythondir = $(pythondir)/gnuradio
36 grpyexecdir = $(pyexecdir)/gnuradio
37
38 # swig flags
39 SWIGPYTHONFLAGS = -fvirtual -python -modern
40
41 # Where to find gnuradio include files in the current build tree
42 # top_srcdir for original stuff, top_builddir for generated files
43 GNURADIO_INCLUDES = -I$(top_srcdir)/gnuradio-core/src/lib/runtime \
44                     -I$(top_srcdir)/gnuradio-core/src/lib/general \
45                     -I$(top_builddir)/gnuradio-core/src/lib/general \
46                     -I$(top_srcdir)/gnuradio-core/src/lib/gengen \
47                     -I$(top_builddir)/gnuradio-core/src/lib/gengen \
48                     -I$(top_srcdir)/gnuradio-core/src/lib/filter \
49                     -I$(top_builddir)/gnuradio-core/src/lib/filter \
50                     -I$(top_srcdir)/gnuradio-core/src/lib/reed-solomon \
51                     -I$(top_srcdir)/gnuradio-core/src/lib/io \
52                     -I$(top_srcdir)/gnuradio-core/src/lib/g72x \
53                     -I$(top_srcdir)/gnuradio-core/src/lib/swig \
54                     -I$(top_builddir)/gnuradio-core/src/lib/swig \
55                     $(FFTW3F_CFLAGS)
56
57 # How to link in the top-level omnithreads library
58 OMNITHREAD_INCLUDES = -I$(top_srcdir)/omnithread
59 OMNITHREAD_LIBS = -L$(top_builddir)/omnithread -lgromnithread
60
61 # How to link in GNU Radio core library
62 # Note: Win32 libtool cannot extract DLL dependencies already stored in
63 # libgnuradio-core, so the core's dependencies must be repeated here
64 # This is redundant but harmless on non-Win32 platforms
65 GNURADIO_CORE_LIBS = $(OMNITHREAD_LIBS)                         \
66                      $(FFTW3F_LIBS)                             \
67                      -L$(top_builddir)/gnuradio-core/src/lib    \
68                      -lgnuradio-core
69
70 # This is a dependency for many swig operations
71 GNURADIO_I = $(top_srcdir)/gnuradio-core/src/lib/swig/gnuradio.i
72
73 # The below used to be set in PKGCONFIG but now point to the current
74 # build tree.
75 USRP_INCLUDES = -I$(top_srcdir)/usrp/host/lib \
76                 -I$(top_srcdir)/usrp/firmware/include
77
78 USRP_LIBS = -L$(top_builddir)/usrp/host/lib -lusrp
79
80 PMT_INCLUDES = -I$(top_srcdir)/pmt/src/lib
81 PMT_LIBS = -L$(top_builddir)/pmt/src/lib -lpmt
82
83 # This used to be set in configure.ac but is now defined here for all 
84 # Makefiles when this fragment is included.
85 STD_DEFINES_AND_INCLUDES=$(DEFINES) $(OMNITHREAD_INCLUDES) $(GNURADIO_INCLUDES) $(BOOST_CFLAGS)
86
87 # Fix for BSD make not defining $(RM).  We define it now in configure.ac
88 # using AM_PATH_PROG, but now here have to add a -f to be like GNU make
89 RM=$(RM_PROG) -f