summaryrefslogtreecommitdiffstats
path: root/rules/uclibc.make
blob: 8ce6fb384bb548972e55bb0166f6fcc3ae67f1c2 (plain) (blame)
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
# -*-makefile-*-
#
# Copyright (C) 2006, 2008 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) += uclibc

#
# Paths and names
#
UCLIBC_VERSION	:= $(call remove_quotes,$(PTXCONF_UCLIBC_VERSION))
UCLIBC_MD5	:= $(call remove_quotes,$(PTXCONF_UCLIBC_MD5))
UCLIBC		:= uClibc-$(UCLIBC_VERSION)
UCLIBC_SUFFIX	:= tar.bz2
UCLIBC_URL	:= \
	http://www.uclibc.org/downloads/$(UCLIBC).$(UCLIBC_SUFFIX) \
	http://www.uclibc.org/downloads/snapshots/$(UCLIBC).$(UCLIBC_SUFFIX)
UCLIBC_SOURCE	:= $(SRCDIR)/$(UCLIBC).$(UCLIBC_SUFFIX)
UCLIBC_DIR	:= $(BUILDDIR)/$(UCLIBC)
UCLIBC_CONFIG	:= $(call remove_quotes, $(PTXDIST_PLATFORMCONFIGDIR)/config/$(PTXCONF_UCLIBC_CONFIG))

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

UCLIBC_ENV	:= \
	$(HOST_ENV_CC) \
	KCONFIG_NOTIMESTAMP=1 \
	$(if $(filter 0,$(PTXDIST_VERBOSE)),V=)

$(UCLIBC_CONFIG):
	@echo
	@echo "**************************************************************************"
	@echo "**** Please generate a uclibc config with 'ptxdist menuconfig uclibc' ****"
	@echo "**************************************************************************"
	@echo
	@echo
	@exit 1

$(STATEDIR)/uclibc.prepare: $(UCLIBC_CONFIG)
	@$(call targetinfo)
	@$(call world/kconfig, UCLIBC, oldconfig)
	@$(call touch)

UCLIBC_MAKE_OPT		:= \
	CROSS=$(COMPILER_PREFIX) \
	HOSTCC="$(HOSTCC)" \
	DEVEL_PREFIX=/usr/ \
	PREFIX=$(SYSROOT) \
	KERNEL_HEADERS=$(SYSROOT)/usr/include \
	RUNTIME_PREFIX=/ \
	SHARED_LIB_LOADER_PREFIX=/lib

UCLIBC_INSTALL_OPT	:= \
	$(UCLIBC_MAKE_OPT) \
	install

# ----------------------------------------------------------------------------
# oldconfig / menuconfig
# ----------------------------------------------------------------------------

uclibc_oldconfig uclibc_menuconfig: $(STATEDIR)/uclibc.extract
	@$(call world/kconfig, UCLIBC, $(subst uclibc_,,$@))
	@$(call finish)

# vim: syntax=make