summaryrefslogtreecommitdiffstats
path: root/rules/xchain-zlib.make
blob: 1d8353ee79f0509b9c5e6a9a3ed3a863502f4af7 (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
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2002 by Pengutronix e.K., Hildesheim, Germany
# 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.
#

#
# Paths and names 
#
XCHAIN_ZLIB_BUILDDIR	= $(BUILDDIR)/xchain/$(ZLIB)

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

xchain-zlib_get: $(STATEDIR)/xchain-zlib.get

$(STATEDIR)/xchain-zlib.get: $(STATEDIR)/zlib.get
	@$(call targetinfo, $@)
	touch $@

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

xchain-zlib_extract: $(STATEDIR)/xchain-zlib.extract

$(STATEDIR)/xchain-zlib.extract: $(STATEDIR)/xchain-zlib.get
	@$(call targetinfo, $@)
	@$(call clean, $(XCHAIN_ZLIB_BUILDDIR))
	@$(call extract, $(ZLIB_SOURCE), $(XCHAIN_BUILDDIR))
	touch $@

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

xchain-zlib_prepare: $(STATEDIR)/xchain-zlib.prepare

XCHAIN_ZLIB_AUTOCONF	=  --shared
XCHAIN_ZLIB_AUTOCONF	+= --prefix=$(PTXCONF_PREFIX)
XCHAIN_ZLIB_MAKEVARS	=  $(HOSTCC_ENV)

$(STATEDIR)/xchain-zlib.prepare: $(STATEDIR)/xchain-zlib.extract
	@$(call targetinfo, $@)
	cd $(XCHAIN_ZLIB_BUILDDIR) && \
		./configure $(XCHAIN_ZLIB_AUTOCONF)
	touch $@

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

$(STATEDIR)/xchain-zlib.compile: $(STATEDIR)/xchain-zlib.prepare 
	@$(call targetinfo, $@)
	make -C $(XCHAIN_ZLIB_BUILDDIR) $(XCHAIN_ZLIB_MAKEVARS)
	touch $@

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

xchain-zlib_install: $(STATEDIR)/xchain-zlib.install

$(STATEDIR)/xchain-zlib.install: $(STATEDIR)/xchain-zlib.compile
	@$(call targetinfo, $@)
	make -C $(XCHAIN_ZLIB_BUILDDIR) $(XCHAIN_ZLIB_MAKEVARS) \
		install
	touch $@
# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

xchain-zlib_targetinstall: $(STATEDIR)/xchain-zlib.targetinstall

$(STATEDIR)/xchain-zlib.targetinstall: $(STATEDIR)/xchain-zlib.install
	@$(call targetinfo, $@)
	touch $@

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

xchain-zlib_clean:
	rm -rf $(STATEDIR)/xchain-zlib.*
	rm -rf $(XCHAIN_ZLIB_BUILDDIR)

# vim: syntax=make