summaryrefslogtreecommitdiffstats
path: root/rules/cyclictest.make
blob: 9698bd6bc9d4231c89ec42d14f305f095515a64d (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# -*-makefile-*-
# $Id: template 3345 2005-11-14 17:14:19Z rsc $
#
# Copyright (C) 2005 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
#
PACKAGES-$(PTXCONF_CYCLICTEST) += cyclictest

#
# Paths and names
#
CYCLICTEST_VERSION	= 0.5
CYCLICTEST		= cyclictest-$(CYCLICTEST_VERSION)
CYCLICTEST_SUFFIX	= tar.bz2
CYCLICTEST_URL		= http://www.tglx.de/projects/misc/cyclictest/$(CYCLICTEST).$(CYCLICTEST_SUFFIX)
CYCLICTEST_SOURCE	= $(SRCDIR)/$(CYCLICTEST).$(CYCLICTEST_SUFFIX)
CYCLICTEST_DIR		= $(BUILDDIR)/$(CYCLICTEST)

-include $(call package_depfile)

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

cyclictest_get: $(STATEDIR)/cyclictest.get

cyclictest_get_deps = $(CYCLICTEST_SOURCE)

$(STATEDIR)/cyclictest.get: $(cyclictest_get_deps)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(CYCLICTEST_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(CYCLICTEST_URL))

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

cyclictest_extract: $(STATEDIR)/cyclictest.extract

cyclictest_extract_deps = $(STATEDIR)/cyclictest.get

$(STATEDIR)/cyclictest.extract: $(cyclictest_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(CYCLICTEST_DIR))
	@$(call extract, $(CYCLICTEST_SOURCE))
	@$(call patchin, $(CYCLICTEST))
	# Well, we extract to...
	mv $(BUILDDIR)/cyclictest $(CYCLICTEST_DIR)
	@$(call touch, $@)

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

cyclictest_prepare: $(STATEDIR)/cyclictest.prepare

#
# dependencies
#
cyclictest_prepare_deps = \
	$(STATEDIR)/cyclictest.extract \
	$(STATEDIR)/virtual-xchain.install

CYCLICTEST_PATH	=  PATH=$(CROSS_PATH)
CYCLICTEST_ENV 	=  $(CROSS_ENV)
#CYCLICTEST_ENV	+= PKG_CONFIG_PATH=$(CROSS_LIB_DIR)/lib/pkgconfig

#
# autoconf
#
#CYCLICTEST_AUTOCONF =  $(CROSS_AUTOCONF_USR)

$(STATEDIR)/cyclictest.prepare: $(cyclictest_prepare_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(CYCLICTEST_DIR)/config.cache)
#	cd $(CYCLICTEST_DIR) && \
#		$(CYCLICTEST_PATH) $(CYCLICTEST_ENV) \
#		./configure $(CYCLICTEST_AUTOCONF)
	@$(call touch, $@)

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

cyclictest_compile: $(STATEDIR)/cyclictest.compile

cyclictest_compile_deps = $(STATEDIR)/cyclictest.prepare

$(STATEDIR)/cyclictest.compile: $(cyclictest_compile_deps)
	@$(call targetinfo, $@)
	cd $(CYCLICTEST_DIR) && $(CYCLICTEST_ENV) $(CYCLICTEST_PATH) make CROSS_COMPILE=$(PTXCONF_COMPILER_PREFIX)
	@$(call touch, $@)

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

cyclictest_install: $(STATEDIR)/cyclictest.install

$(STATEDIR)/cyclictest.install: $(STATEDIR)/cyclictest.compile
	@$(call targetinfo, $@)
	@$(call install, CYCLICTEST)
	@$(call touch, $@)

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

cyclictest_targetinstall: $(STATEDIR)/cyclictest.targetinstall

cyclictest_targetinstall_deps = $(STATEDIR)/cyclictest.compile

$(STATEDIR)/cyclictest.targetinstall: $(cyclictest_targetinstall_deps)
	@$(call targetinfo, $@)

	@$(call install_init,default)
	@$(call install_fixup,PACKAGE,cyclictest)
	@$(call install_fixup,PRIORITY,optional)
	@$(call install_fixup,VERSION,$(CYCLICTEST_VERSION))
	@$(call install_fixup,SECTION,base)
	@$(call install_fixup,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
	@$(call install_fixup,DEPENDS,)
	@$(call install_fixup,DESCRIPTION,missing)

	@$(call install_copy, 0, 0, 0755, $(CYCLICTEST_DIR)/foobar, /dev/null)

	@$(call install_finish)

	@$(call touch, $@)

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

cyclictest_clean:
	rm -rf $(STATEDIR)/cyclictest.*
	rm -rf $(IMAGEDIR)/cyclictest_*
	rm -rf $(CYCLICTEST_DIR)

# vim: syntax=make