summaryrefslogtreecommitdiff
path: root/mk/pkgconfig.mk
blob: 6dfdd8a3e372c2dd2c89fe96909e23ea56e690e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
################################################################################
# Copyright(C) 2009-2012 Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
#
# \file         pkgconfig.mk
# \brief	pkgconfig.mk of Embtoolkit
# \author       Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date         October 2009
################################################################################

PKGCONFIG_NAME		:= pkg-config
PKGCONFIG_VERSION	:= $(call embtk_get_pkgversion,pkgconfig)
PKGCONFIG_SITE		:= http://pkgconfig.freedesktop.org/releases
PKGCONFIG_PACKAGE	:= pkg-config-$(PKGCONFIG_VERSION).tar.gz
PKGCONFIG_SRC_DIR	:= $(embtk_toolsb)/pkg-config-$(PKGCONFIG_VERSION)
PKGCONFIG_BUILD_DIR	:= $(embtk_toolsb)/pkg-config-$(PKGCONFIG_VERSION)

PKGCONFIG_BIN			:= $(embtk_htools)/usr/bin/pkg-config

__EMBTK_PKG_CONFIG_PATH		:= $(embtk_sysroot)/usr/$(LIBDIR)/pkgconfig
__EMBTK_PKG_CONFIG_PATH		+= $(embtk_sysroot)/usr/share/pkgconfig
EMBTK_PKG_CONFIG_PATH		:= $(subst $(embtk_space),:,$(__EMBTK_PKG_CONFIG_PATH))
EMBTK_PKG_CONFIG_LIBDIR		:= $(EMBTK_PKG_CONFIG_PATH)

__EMBTK_HOST_PKG_CONFIG_PATH	:= $(embtk_htools)/usr/lib/pkgconfig/
__EMBTK_HOST_PKG_CONFIG_PATH	+= /usr/lib/pkgconfig/ /usr/share/pkgconfig/
__EMBTK_HOST_PKG_CONFIG_PATH	+= /usr/local/lib/pkgconfig/ /usr/local/share/pkgconfig/
__EMBTK_HOST_PKG_CONFIG_PATH	+= $(dir $(shell find /usr/lib -type f -name '*.pc'))
__EMBTK_HOST_PKG_CONFIG_PATH	+= $(dir $(shell find /usr/local/lib -type f -name '*.pc'))
EMBTK_HOST_PKG_CONFIG_PATH	:= $(subst $(embtk_space),:,$(sort $(__EMBTK_HOST_PKG_CONFIG_PATH)))

PKGCONFIG_CONFIGURE_OPTS	:= --with-pc-path="$(EMBTK_HOST_PKG_CONFIG_PATH)"
PKGCONFIG_CONFIGURE_OPTS	+= --with-internal-glib

export PKGCONFIG_BIN EMBTK_PKG_CONFIG_PATH EMBTK_PKG_CONFIG_LIBDIR
export EMBTK_HOST_PKG_CONFIG_PATH

PKGCONFIG_PREFIX	:= /usr
PKGCONFIG_DESTDIR	:= $(embtk_htools)

pkgconfig_install:
	$(call embtk_install_hostpkg,pkgconfig)