Blame build/compile-binding.am

Packit 306c40
## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
Packit 306c40
##
Packit 306c40
## This file is part of mm-common.
Packit 306c40
##
Packit 306c40
## mm-common is free software: you can redistribute it and/or modify
Packit 306c40
## it under the terms of the GNU General Public License as published
Packit 306c40
## by the Free Software Foundation, either version 2 of the License,
Packit 306c40
## or (at your option) any later version.
Packit 306c40
##
Packit 306c40
## mm-common is distributed in the hope that it will be useful,
Packit 306c40
## but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 306c40
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 306c40
## GNU General Public License for more details.
Packit 306c40
##
Packit 306c40
## You should have received a copy of the GNU General Public License
Packit 306c40
## along with mm-common.  If not, see <http://www.gnu.org/licenses/>.
Packit 306c40
Packit 306c40
## Parameters:  lib_LTLIBRARIES
Packit 306c40
## Overrides:   binding_name, binding_basedir, binding_modulename
Packit 306c40
## Files:       files_built_cc, files_built_h, files_built_ph,
Packit 306c40
##              files_extra_cc, files_extra_h, files_extra_ph
Packit 306c40
## Output:      binding_sources, binding_includes, binding_cppflags
Packit 306c40
Packit 306c40
# The name of the binding module.  Usually identical to the name of the
Packit 306c40
# directory where the generated sources and include files live.
Packit 306c40
binding_name ?= $(notdir $(subdir))
Packit 306c40
Packit 306c40
# The parent directory of the src/ and libmm/ directories.
Packit 306c40
# Usually the same as the C library name.
Packit 306c40
binding_basedir ?= $(patsubst %/,%,$(dir $(subdir)))
Packit 306c40
Packit 306c40
# The library name of the binding, possibly including an API version suffix.
Packit 306c40
# Depending on the module, the "lib" prefix may or may not be included.
Packit 306c40
binding_modulename ?= $(patsubst lib%,$(binding_libprefix)%,$(basename $(lib_LTLIBRARIES)))
Packit 306c40
Packit 306c40
# Try to work out whether the binding's module name includes a "lib" prefix.
Packit 306c40
binding_libprefix = $(if $(filter lib%,$(binding_name)),lib)
Packit 306c40
Packit 306c40
# Files to be listed in the module's _SOURCES variable.
Packit 306c40
binding_sources = $(files_built_cc) $(files_extra_cc)
Packit 306c40
Packit 306c40
# Default include directories and preprocessor flags.
Packit 306c40
binding_includes = -I..$(if $(srcdir:.=), -I$(top_srcdir)/$(binding_basedir)) -I$(top_builddir)
Packit 306c40
binding_cppflags = -DG_LOG_DOMAIN=\"$(binding_name)\"
Packit 306c40
Packit 306c40
# Installation directories for header files.
Packit 306c40
binding_includedir = $(includedir)/$(binding_modulename)/$(binding_name)
Packit 306c40
binding_privatedir = $(binding_includedir)/private
Packit 306c40
Packit 306c40
# List of installed header files.
Packit 306c40
binding_include_HEADERS = $(files_built_h) $(files_extra_h)
Packit 306c40
binding_private_HEADERS = $(files_built_ph) $(files_extra_ph)
Packit 306c40
Packit 306c40
# Delete built sources on make maintainer-clean.
Packit 306c40
binding_built_sources = $(files_built_cc) $(files_built_h) $(files_built_ph)
Packit 306c40
MAINTAINERCLEANFILES  = $(binding_built_sources) $(addprefix $(srcdir)/,$(binding_built_sources))
Packit 306c40
Packit 306c40
# Instruct GNU make to delete the targets of a rule after it failed, in
Packit 306c40
# order to avoid the complication of handling that situation manually.
Packit 306c40
.DELETE_ON_ERROR: