blob: 8ce41c84116a51512af6feb9d4c7c0f00e7a5fc4 (
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
|
################################################################################
# Embtoolkit
# Copyright(C) 2009-2015 Abdoulaye Walsimou GAYE.
#
# 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 headers.mk
# \brief linux headers installation
# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date May 2009
################################################################################
LINUX_HEADERS_NAME := linux
LINUX_HEADERS_VERSION := $(LINUX_VERSION)
LINUX_HEADERS_SITE := $(LINUX_SITE)
LINUX_HEADERS_PACKAGE := $(LINUX_PACKAGE)
LINUX_HEADERS_SRC_DIR := $(call embtk_pkg_srcdir,linux)
LINUX_HEADERS_BUILD_DIR := $(call embtk_pkg_srcdir,linux)
LINUX_HEADERS_KEEP_SRC_DIR := $(LINUX_KEEP_SRC_DIR)
#
# linux headers install
#
ifeq ($(embtk_buildhost_os),macos)
define embtk_beforeinstall_linux_headers
cp $(EMBTK_ROOT)/scripts/unifdef.c \
$(LINUX_HEADERS_SRC_DIR)/scripts/unifdef.c
endef
endif
define embtk_install_linux_headers
$(MAKE) -C $(LINUX_HEADERS_BUILD_DIR) $(LINUX_MAKE_OPTS) \
INSTALL_HDR_PATH=$(embtk_sysroot)/usr headers_install
endef
define embtk_cleanup_linux_headers
[ -d $(LINUX_HEADERS_BUILD_DIR) ] && $(call __embtk_unsetinstalled_pkg,linux_headers) ||:
endef
|