1
# -*- mode: makefile; coding: utf-8 -*-
2
# Copyright © 2002,2003 Colin Walters <walters@debian.org>
3
# Copyright © 2008 Jonas Smedegaard <dr@jones.dk>
4
# Description: Defines useful variables for packages which have a Makefile
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License as
8
# published by the Free Software Foundation; either version 2, or (at
9
# your option) any later version.
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21
_cdbs_scripts_path ?= /usr/lib/cdbs
22
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
23
_cdbs_class_path ?= /usr/share/cdbs/1/class
25
ifndef _cdbs_class_makefile_vars
26
_cdbs_class_makefile_vars = 1
28
include $(_cdbs_class_path)/langcore.mk$(_cdbs_makefile_suffix)
32
DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) $(MAKE) $(if $(DEB_MAKE_MAKEFILE), -f $(DEB_MAKE_MAKEFILE),) -C $(cdbs_make_curbuilddir) CFLAGS=$(if $(CFLAGS_$(cdbs_curpkg)),"$(CFLAGS_$(cdbs_curpkg))","$(CFLAGS)") CXXFLAGS=$(if $(CXXFLAGS_$(cdbs_curpkg)),"$(CXXFLAGS_$(cdbs_curpkg))","$(CXXFLAGS)") CPPFLAGS=$(if $(CPPFLAGS_$(cdbs_curpkg)),"$(CPPFLAGS_$(cdbs_curpkg))","$(CPPFLAGS)") LDFLAGS=$(if $(LDFLAGS_$(cdbs_curpkg)),"$(LDFLAGS_$(cdbs_curpkg))","$(LDFLAGS)")
34
# This variable is deprecated.
35
DEB_BUILD_MAKE_TARGET =
36
_cdbs_deprecated_vars += DEB_BUILD_MAKE_TARGET
38
DEB_MAKE_BUILD_TARGET = $(DEB_BUILD_MAKE_TARGET)
40
# If your Makefile provides an "install" target, you need to give the requisite commands
41
# here to install it into the staging directory. For automake-using programs, this
42
# looks like: install DESTDIR=$(DEB_DESTDIR)
43
# If you're using automake though, you likely want to be including autotools.mk instead
45
# For multi-flavored builds (see below) installed per-flavor, it looks like this:
46
# install DESTDIR=$(cdbs_curpkgdestdir)
48
# This variable is deprecated.
49
DEB_CLEAN_MAKE_TARGET = clean
50
_cdbs_deprecated_vars += DEB_CLEAN_MAKE_TARGET
51
_cdbs_deprecated_DEB_CLEAN_MAKE_TARGET_default := $(DEB_CLEAN_MAKE_TARGET)
53
DEB_MAKE_CLEAN_TARGET = $(DEB_CLEAN_MAKE_TARGET)
55
# This variable is deprecated.
56
DEB_MAKE_TEST_TARGET =
57
_cdbs_deprecated_vars += DEB_MAKE_TEST_TARGET
60
DEB_MAKE_CHECK_TARGET = $(DEB_MAKE_TEST_TARGET)
62
# If DEB_MAKE_FLAVORS is set compilation is done once per flavor.
63
# NB! This must be declared _before_ including makefile.mk
64
#DEB_MAKE_FLAVORS = light normal enhanced
66
# If building multiple flavors, skeleton strings are used for
67
# DEB_BUILDDIR and DEB_DESTDIR, with @FLAVOR@ expanding to actual
69
DEB_MAKE_BUILDDIRSKEL = $(cdbs_curpkgbuilddir)/@FLAVOR@
70
DEB_MAKE_DESTDIRSKEL = $(cdbs_curpkgdestdir)/@FLAVOR@