Debian Codegraph @

build/compile-binding.am

raw
1 ## Copyright (c) 2009 Openismus GmbH <http://www.openismus.com/>
2 ##
3 ## This file is part of mm-common.
4 ##
5 ## mm-common is free software: you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published
7 ## by the Free Software Foundation, either version 2 of the License,
8 ## or (at your option) any later version.
9 ##
10 ## mm-common is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with mm-common. If not, see <http://www.gnu.org/licenses/>.
17
18 ## Parameters: lib_LTLIBRARIES
19 ## Overrides: binding_name, binding_basedir, binding_modulename
20 ## Files: files_built_cc, files_built_h, files_built_ph,
21 ## files_extra_cc, files_extra_h, files_extra_ph
22 ## Output: binding_sources, binding_includes, binding_cppflags
23
24 # The name of the binding module. Usually identical to the name of the
25 # directory where the generated sources and include files live.
26 binding_name ?= $(notdir $(subdir))
27
28 # The parent directory of the src/ and libmm/ directories.
29 # Usually the same as the C library name.
30 binding_basedir ?= $(patsubst %/,%,$(dir $(subdir)))
31
32 # The library name of the binding, possibly including an API version suffix.
33 # Depending on the module, the "lib" prefix may or may not be included.
34 binding_modulename ?= $(patsubst lib%,$(binding_libprefix)%,$(basename $(lib_LTLIBRARIES)))
35
36 # Try to work out whether the binding's module name includes a "lib" prefix.
37 binding_libprefix = $(if $(filter lib%,$(binding_name)),lib)
38
39 # Files to be listed in the module's _SOURCES variable.
40 binding_sources = $(files_built_cc) $(files_extra_cc)
41
42 # Default include directories and preprocessor flags.
43 binding_includes = -I..$(if $(srcdir:.=), -I$(top_srcdir)/$(binding_basedir)) -I$(top_builddir)
44 binding_cppflags = -DG_LOG_DOMAIN=\"$(binding_name)\"
45
46 # Installation directories for header files.
47 binding_includedir = $(includedir)/$(binding_modulename)/$(binding_name)
48 binding_privatedir = $(binding_includedir)/private
49
50 # List of installed header files.
51 binding_include_HEADERS = $(files_built_h) $(files_extra_h)
52 binding_private_HEADERS = $(files_built_ph) $(files_extra_ph)
53
54 # Delete built sources on make maintainer-clean.
55 binding_built_sources = $(files_built_cc) $(files_built_h) $(files_built_ph)
56 MAINTAINERCLEANFILES = $(binding_built_sources) $(addprefix $(srcdir)/,$(binding_built_sources))
57
58 # Instruct GNU make to delete the targets of a rule after it failed, in
59 # order to avoid the complication of handling that situation manually.
60 .DELETE_ON_ERROR: