Updated license from GPL version 2 or later to GPL version 3 or later.
[debian/gnuradio] / Makefile.common
1 # -*- Makefile -*-
2 #
3 # Copyright 2004,2006,2007 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 3, 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 the gnuradio 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 # Install the non-gnuradio usrp stuff in the appropriate subdirectory
39 # This usually ends up at:
40 #   ${prefix}/lib/python${python_version}/site-packages/usrpm
41
42 usrppythondir = $(pythondir)/usrpm
43 usrppyexecdir = $(pyexecdir)/usrpm
44
45
46 # swig flags
47 SWIGPYTHONFLAGS = -fvirtual -python -modern
48
49 # Where to find gnuradio include files in the current build tree
50 # top_srcdir for original stuff, top_builddir for generated files
51 GNURADIO_INCLUDES = -I$(top_srcdir)/gnuradio-core/src/lib/runtime \
52                     -I$(top_srcdir)/gnuradio-core/src/lib/general \
53                     -I$(top_builddir)/gnuradio-core/src/lib/general \
54                     -I$(top_srcdir)/gnuradio-core/src/lib/gengen \
55                     -I$(top_builddir)/gnuradio-core/src/lib/gengen \
56                     -I$(top_srcdir)/gnuradio-core/src/lib/filter \
57                     -I$(top_builddir)/gnuradio-core/src/lib/filter \
58                     -I$(top_srcdir)/gnuradio-core/src/lib/reed-solomon \
59                     -I$(top_srcdir)/gnuradio-core/src/lib/io \
60                     -I$(top_srcdir)/gnuradio-core/src/lib/g72x \
61                     -I$(top_srcdir)/gnuradio-core/src/lib/swig \
62                     -I$(top_builddir)/gnuradio-core/src/lib/swig \
63                     $(FFTW3F_CFLAGS)
64
65 # How to link in the top-level omnithreads library from inside the tree
66 OMNITHREAD_INCLUDES = -I$(top_srcdir)/omnithread
67 OMNITHREAD_LA = $(top_builddir)/omnithread/libgromnithread.la
68
69 # How to link in GNU Radio core library from inside the tree
70 GNURADIO_CORE_LA = $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core.la
71
72 # This is a dependency for many swig operations
73 GNURADIO_I = $(top_srcdir)/gnuradio-core/src/lib/swig/gnuradio.i
74
75 # How to link in the USRP library from inside the tree
76 USRP_INCLUDES = -I$(top_srcdir)/usrp/host/lib/legacy \
77                 -I$(top_srcdir)/usrp/host/lib/inband \
78                 -I$(top_srcdir)/usrp/firmware/include
79 USRP_LA = $(top_builddir)/usrp/host/lib/legacy/libusrp.la
80
81 # How to link the PMT library from inside the tree
82 PMT_INCLUDES = -I$(top_srcdir)/pmt/src/lib
83 PMT_LA = $(top_builddir)/pmt/src/lib/libpmt.la
84
85 # How to link the mblock library from inside the tree
86 MBLOCK_INCLUDES = -I$(top_srcdir)/mblock/src/lib
87 MBLOCK_LA = $(top_builddir)/mblock/src/lib/libmblock.la
88
89 # This used to be set in configure.ac but is now defined here for all 
90 # Makefiles when this fragment is included.
91 STD_DEFINES_AND_INCLUDES=$(DEFINES) $(OMNITHREAD_INCLUDES) $(GNURADIO_INCLUDES) $(BOOST_CFLAGS)
92
93 # Fix for BSD make not defining $(RM).  We define it now in configure.ac
94 # using AM_PATH_PROG, but now here have to add a -f to be like GNU make
95 RM=$(RM_PROG) -f
96
97 RUN_GUILE = GUILE_LOAD_PATH="@abs_top_srcdir@/pmt/src/scheme:@abs_top_srcdir@/mblock/src/scheme" @GUILE@ -e main -s
98 COMPILE_MBH = $(RUN_GUILE) $(top_srcdir)/mblock/src/scheme/gnuradio/compile-mbh.scm