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
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2006 by Robert Schwebel
#
# 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
#
HOST_PACKAGES-$(PTXCONF_HOST_BINUTILS) += host-binutils
#
# Paths and names
#
HOST_BINUTILS_VERSION = 2.16.1
HOST_BINUTILS = binutils-$(HOST_BINUTILS_VERSION)
HOST_BINUTILS_SUFFIX = tar.gz
HOST_BINUTILS_DIR = $(HOST_BUILDDIR)/$(HOST_BINUTILS)
-include $(call package_depfile)
# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------
host-binutils_get: $(STATEDIR)/host-binutils.get
$(STATEDIR)/host-binutils.get: $(BINUTILS_SOURCE)
@$(call targetinfo, $@)
@$(call touch, $@)
# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------
host-binutils_extract: $(STATEDIR)/host-binutils.extract
host-binutils_extract_deps = $(STATEDIR)/host-binutils.get
$(STATEDIR)/host-binutils.extract: $(host-binutils_extract_deps)
@$(call targetinfo, $@)
@$(call clean, $(HOST_BINUTILS_DIR))
@$(call extract, $(BINUTILS_SOURCE), $(HOST_BUILDDIR))
@$(call patchin, $(HOST_BINUTILS), $(HOST_BINUTILS_DIR))
@$(call touch, $@)
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
host-binutils_prepare: $(STATEDIR)/host-binutils.prepare
HOST_BINUTILS_PATH = PATH=$(HOST_PATH)
HOST_BINUTILS_ENV = $(HOSTCC_ENV)
#
# autoconf
#
HOST_BINUTILS_AUTOCONF = $(HOST_AUTOCONF)
$(STATEDIR)/host-binutils.prepare: $(host-binutils_prepare_deps_default)
@$(call targetinfo, $@)
@$(call clean, $(HOST_BINUTILS_DIR)/config.cache)
cd $(HOST_BINUTILS_DIR) && \
$(HOST_BINUTILS_PATH) $(HOST_BINUTILS_ENV) \
./configure $(HOST_BINUTILS_AUTOCONF)
@$(call touch, $@)
# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------
host-binutils_compile: $(STATEDIR)/host-binutils.compile
$(STATEDIR)/host-binutils.compile: $(host-binutils_compile_deps_default)
@$(call targetinfo, $@)
cd $(HOST_BINUTILS_DIR) && $(HOST_BINUTILS_ENV) $(HOST_BINUTILS_PATH) make
@$(call touch, $@)
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
host-binutils_install: $(STATEDIR)/host-binutils.install
$(STATEDIR)/host-binutils.install: $(host-binutils_install_deps_default)
@$(call targetinfo, $@)
ifdef PTXCONF_HOST_BINUTILS_LIBBFD
@$(call install, HOST_BINUTILS,$(HOST_BINUTILS_DIR)/bfd,h)
endif
ifdef PTXCONF_HOST_BINUTILS_LIBIBERTY
@$(call install, HOST_BINUTILS,$(HOST_BINUTILS_DIR)/libiberty,h)
endif
@$(call touch, $@)
# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------
host-binutils_clean:
rm -rf $(STATEDIR)/host-binutils.*
rm -rf $(HOST_BINUTILS_DIR)
# vim: syntax=make
|