Statistics
| Branch: | Tag: | Revision:

root / gr-noaa / swig / Makefile.swig.gen @ 40fac3c4

History | View | Annotate | Download (5.2 kB)

1
# -*- Makefile -*-
2
#
3
# Copyright 2009 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
# Makefile.swig.gen for noaa_swig.i
24
25
## Default install locations for these files:
26
##
27
## Default location for the Python directory is:
28
##  ${prefix}/lib/python${python_version}/site-packages/[category]/noaa_swig
29
## Default location for the Python exec directory is:
30
##  ${exec_prefix}/lib/python${python_version}/site-packages/[category]/noaa_swig
31
##
32
## The following can be overloaded to change the install location, but
33
## this has to be done in the including Makefile.am -before-
34
## Makefile.swig is included.
35
36
noaa_swig_pythondir_category ?= gnuradio/noaa_swig
37
noaa_swig_pylibdir_category ?= $(noaa_swig_pythondir_category)
38
noaa_swig_pythondir = $(pythondir)/$(noaa_swig_pythondir_category)
39
noaa_swig_pylibdir = $(pyexecdir)/$(noaa_swig_pylibdir_category)
40
41
# The .so libraries for the guile modules get installed whereever guile
42
# is installed, usually /usr/lib/guile/gnuradio/
43
# FIXME: determince whether these should be installed with gnuradio.
44
noaa_swig_scmlibdir = $(libdir)
45
46
# The scm files for the guile modules get installed where ever guile
47
# is installed, usually /usr/share/guile/site/noaa_swig
48
# FIXME: determince whether these should be installed with gnuradio.
49
noaa_swig_scmdir = $(guiledir)
50
51
## SWIG headers are always installed into the same directory.
52
53
noaa_swig_swigincludedir = $(swigincludedir)
54
55
## This is a template file for a "generated" Makefile addition (in
56
## this case, "Makefile.swig.gen").  By including the top-level
57
## Makefile.swig, this file will be used to generate the SWIG
58
## dependencies.  Assign the variable TOP_SWIG_FILES to be the list of
59
## SWIG .i files to generated wrappings for; there can be more than 1
60
## so long as the names are unique (no sorting is done on the
61
## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
62
## file will generate .cc, .py, and possibly .h files -- meaning that
63
## all of these files will have the same base name (that provided for
64
## the SWIG .i file).
65
##
66
## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
67
## right thing.  For more info, see <
68
## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
69
70
## Stamps used to ensure parallel make does the right thing.  These
71
## are removed by "make clean", but otherwise unused except during the
72
## parallel built.  These will not be included in a tarball, because
73
## the SWIG-generated files will be removed from the distribution.
74
75
STAMPS += $(DEPDIR)/noaa_swig-generate-*
76
77
## Other cleaned files: dependency files generated by SWIG or this Makefile
78
79
MOSTLYCLEANFILES += $(DEPDIR)/*.S*
80
81
## Add the .py and .cc files to the list of SWIG built sources.  The
82
## .h file is sometimes built, but not always ... so that one has to
83
## be added manually by the including Makefile.am .
84
85
# generating the py or scm file also generates the .cc or .h files,
86
# but dependencies work better without the .cc ort .h files listed.
87
swig_built_sources += noaa_swig.py
88
if GUILE
89
swig_built_sources += noaa_swig.scm
90
endif
91
92
## Various SWIG variables.  These can be overloaded in the including
93
## Makefile.am by setting the variable value there, then including
94
## Makefile.swig .
95
96
noaa_swig_swiginclude_HEADERS =		\
97
	noaa_swig.i			\
98
	$(noaa_swig_swiginclude_headers)
99
100
noaa_swig_pylib_LTLIBRARIES =		\
101
	_noaa_swig.la
102
103
_noaa_swig_la_SOURCES = 			\
104
	python/noaa_swig.cc		\
105
	$(noaa_swig_la_swig_sources)
106
107
_noaa_swig_la_LIBADD =			\
108
	$(STD_SWIG_LA_LIB_ADD)		\
109
	$(noaa_swig_la_swig_libadd)
110
111
# _noaa_swig_la_DEPENDENCIES = python/noaa_swig.lo
112
113
_noaa_swig_la_LDFLAGS =			\
114
	$(STD_SWIG_LA_LD_FLAGS)		\
115
	$(noaa_swig_la_swig_ldflags)
116
117
_noaa_swig_la_CXXFLAGS =			\
118
	$(STD_SWIG_CXX_FLAGS)		\
119
	-I$(top_builddir) 		\
120
	$(noaa_swig_la_swig_cxxflags)
121
122
noaa_swig_python_PYTHON =			\
123
	noaa_swig.py			\
124
	$(noaa_swig)
125
126
if GUILE
127
noaa_swig_scmlib_LTLIBRARIES = libguile-noaa_swig.la
128
libguile_noaa_swig_la_SOURCES = 		\
129
	guile/noaa_swig.cc			\
130
	$(noaa_swig_la_swig_sources)
131
nobase_noaa_swig_scm_DATA = gnuradio/noaa_swig.scm gnuradio/noaa_swig-primitive.scm
132
133
# Guile can use the same flags as python does
134
libguile_noaa_swig_la_LIBADD = $(_noaa_swig_la_LIBADD)
135
libguile_noaa_swig_la_LDFLAGS = $(_noaa_swig_la_LDFLAGS)
136
libguile_noaa_swig_la_CXXFLAGS = $(_noaa_swig_la_CXXFLAGS)
137
138
guile/noaa_swig.lo: noaa_swig.lo
139
noaa_swig.scm: noaa_swig.i
140
gnuradio/noaa_swig-primitive.scm: noaa_swig.scm
141
142
-include guile/noaa_swig.d
143
144
endif				# end of GUILE
145
146
python/noaa_swig.lo:
147
noaa_swig.lo: noaa_swig.py noaa_swig.scm
148
noaa_swig.py: noaa_swig.i
149
150
-include python/noaa_swig.d
151