blob: 81cd842831d417291bc2602bd46fdd6c346fa4c7 (
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# -*-makefile-*-
# $Id: template 6655 2007-01-02 12:55:21Z rsc $
#
# Copyright (C) 2007 by Juergen Beisert
#
# 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_AVRLIB) += avrlib
#
# Paths and names
#
AVRLIB_VERSION := $(call remove_quotes,$(PTXCONF_AVRLIB_VERSION))
AVRLIB_MD5 := $(call remove_quotes,$(PTXCONF_AVRLIB_MD5))
AVRLIB := avr-libc-$(AVRLIB_VERSION)
AVRLIB_SUFFIX := tar.bz2
AVRLIB_URL := http://download.savannah.gnu.org/releases/avr-libc/$(AVRLIB).$(AVRLIB_SUFFIX)
AVRLIB_SOURCE := $(SRCDIR)/$(AVRLIB).$(AVRLIB_SUFFIX)
AVRLIB_DIR := $(BUILDDIR)/$(AVRLIB)
AVRLIB_BUILDDIR := $(BUILDDIR)/$(AVRLIB)-build
# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------
$(AVRLIB_SOURCE):
@$(call targetinfo)
@$(call get, AVRLIB)
# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------
$(STATEDIR)/avrlib.extract:
@$(call targetinfo)
@$(call clean, $(AVRLIB_DIR))
@$(call extract, AVRLIB)
@$(call patchin, AVRLIB)
@$(call touch)
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
AVRLIB_PATH := PATH=$(CROSS_PATH)
AVRLIB_ENV := \
$(CROSS_ENV) \
CC_FOR_BUILD=$(HOSTCC)
#
# autoconf
#
AVRLIB_AUTOCONF := \
--prefix=$(PTXCONF_SYSROOT_TARGET) \
--host=$(PTXCONF_GNU_TARGET) \
--target=$(PTXCONF_GNU_TARGET)
$(STATEDIR)/avrlib.prepare:
@$(call targetinfo)
@$(call clean, $(AVRLIB_BUILDDIR))
mkdir -p $(AVRLIB_BUILDDIR)
cd $(AVRLIB_BUILDDIR) && \
$(AVRLIB_PATH) $(AVRLIB_ENV) \
$(AVRLIB_DIR)/configure $(AVRLIB_AUTOCONF)
@$(call touch)
# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------
$(STATEDIR)/avrlib.compile:
@$(call targetinfo)
cd $(AVRLIB_BUILDDIR) && $(AVRLIB_PATH) $(MAKE) $(PARALLELMFLAGS)
@$(call touch)
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
$(STATEDIR)/avrlib.install:
@$(call targetinfo)
cd $(AVRLIB_BUILDDIR) && \
$(AVRLIB_PATH) $(MAKE) install
@$(call touch)
# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------
$(STATEDIR)/avrlib.targetinstall:
@$(call targetinfo)
@$(call touch)
# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------
avrlib_clean:
rm -rf $(STATEDIR)/avrlib.*
rm -rf $(AVRLIB_DIR)
rm -rf $(AVRLIB_BUILDDIR)
# vim: syntax=make
|