summaryrefslogtreecommitdiffstats
path: root/rules/uclibc-headers.make
blob: e0fe4d245f641fad38239834fe8b3210cb4343c0 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# -*-makefile-*-
# $Id: template 6001 2006-08-12 10:15:00Z mkl $
#
# Copyright (C) 2006, 2007 by Marc Kleine-Budde <mkl@pengutronix.de>
#          
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_UCLIBC_HEADERS) += uclibc_headers

UCLIBC_HEADERS_DIR	= $(UCLIBC_DIR)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

uclibc_headers_get: $(STATEDIR)/uclibc_headers.get

$(STATEDIR)/uclibc_headers.get: $(STATEDIR)/uclibc.get
	@$(call targetinfo, $@)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

uclibc_headers_extract: $(STATEDIR)/uclibc_headers.extract

$(STATEDIR)/uclibc_headers.extract: $(STATEDIR)/uclibc.extract
	@$(call targetinfo, $@)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

uclibc_headers_prepare: $(STATEDIR)/uclibc_headers.prepare

UCLIBC_HEADERS_PATH	:= PATH=$(CROSS_PATH)
UCLIBC_HEADERS_ENV 	:= $(CROSS_ENV)

$(STATEDIR)/uclibc_headers.prepare:
	@$(call targetinfo, $@)
	cp $(PTXDIST_WORKSPACE)/uclibc.config $(UCLIBC_HEADERS_DIR)/.config
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

uclibc_headers_compile: $(STATEDIR)/uclibc_headers.compile

$(STATEDIR)/uclibc_headers.compile:
	@$(call targetinfo, $@)
	yes "" | make -C $(UCLIBC_HEADERS_DIR) oldconfig
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

uclibc_headers_install: $(STATEDIR)/uclibc_headers.install

$(STATEDIR)/uclibc_headers.install:
	@$(call targetinfo, $@)
	cd $(UCLIBC_HEADERS_DIR) && \
		$(UCLIBC_HEADERS_PATH) $(UCLIBC_HEADERS_ENV) \
		$(MAKE) pregen install_dev DEVEL_PREFIX=/usr/ PREFIX=$(SYSROOT) KERNEL_SOURCE=$(SYSROOT)/usr
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

uclibc_headers_targetinstall: $(STATEDIR)/uclibc_headers.targetinstall

$(STATEDIR)/uclibc_headers.targetinstall:
	@$(call targetinfo, $@)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

uclibc_headers_clean:
	rm -rf $(STATEDIR)/uclibc_headers.*
	rm -rf $(IMAGEDIR)/uclibc_headers_*
	rm -rf $(UCLIBC_HEADERS_DIR)

# vim: syntax=make