summaryrefslogtreecommitdiff
path: root/toolchain/kernel-headers/Makefile
blob: 405119000cf9a0814f48e55d33e644a510a4aae3 (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
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(TOPDIR)/rules.mk
include ../rules.mk
include $(TOPDIR)/mk/linux.mk
include ${TOPDIR}/mk/buildhlp.mk

$(WRKBUILD)/.headers:
	$(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=$(ARCH) V=1 \
		INSTALL_HDR_PATH=$(STAGING_DIR)/usr \
		headers_install
	$(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=x86 V=1 \
		INSTALL_HDR_PATH=$(STAGING_TARGET_DIR_32)/usr \
		headers_install
	$(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=$(ARCH) V=1 \
		INSTALL_HDR_PATH=$(LINUX_HEADER_DIR) \
		headers_install
ifeq ($(ARCH),cris)
ifeq ($(CPU_ARCH),crisv32)
	cd $(STAGING_DIR)/usr/include && ln -sf arch-v32/arch arch
else
	cd $(STAGING_DIR)/usr/include && ln -sf arch-v10/arch arch
endif
endif
	touch $@

include ${TOPDIR}/mk/toolchain.mk