summaryrefslogtreecommitdiffstats
path: root/rules/mico.make
blob: 6cb9359f1f699464d25e457279682ac228c53d59 (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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# -*-makefile-*-
# $Id: template 4230 2006-01-17 10:58:03Z bbu $
#
# 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
#
PACKAGES-$(PTXCONF_MICO) += mico

#
# Paths and names
#
MICO_VERSION	= 2.3.12
MICO		= mico-$(MICO_VERSION)
MICO_SUFFIX	= tar.gz
MICO_URL	= http://www.mico.org/$(MICO).$(MICO_SUFFIX)
MICO_SOURCE	= $(SRCDIR)/$(MICO).$(MICO_SUFFIX)
MICO_DIR	= $(BUILDDIR)/$(MICO)


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

mico_get: $(STATEDIR)/mico.get

$(STATEDIR)/mico.get: $(mico_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(MICO_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, MICO)

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

mico_extract: $(STATEDIR)/mico.extract

$(STATEDIR)/mico.extract: $(mico_extract_deps_default)
	@$(call targetinfo, $@)
	rm -fr $(MICO_DIR)
	mkdir -p $(BUILDDIR)
	tmpdir=`mktemp -d`; \
	$(call extract, MICO, $$tmpdir) \
	mv $$tmpdir/mico $(MICO_DIR); \
	rm -fr $$tmpdir
	@$(call patchin, MICO)
	@$(call touch, $@)

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

mico_prepare: $(STATEDIR)/mico.prepare

MICO_PATH	=  PATH=$(CROSS_PATH)
MICO_ENV 	=  $(CROSS_ENV)

#
# autoconf
#
MICO_AUTOCONF =  --target=$(PTXCONF_GNU_TARGET)
MICO_AUTOCONF += --with-mico=$(PTXCONF_PREFIX)
# FIXME: this should be fixed upstream
MICO_AUTOCONF += --prefix=$(SYSROOT)

# doesn't work anyway
MICO_AUTOCONF += --disable-mini-stl

ifdef PTXCONF_MICO_THREAD
MICO_AUTOCONF += --enable-threads
else
MICO_AUTOCONF += --disable-threads
endif
ifdef PTXCONF_MICO_CCM
MICO_AUTOCONF += --enable-ccm
else
MICO_AUTOCONF += --disable-ccm
endif
ifdef PTXCONF_MICO_COSS
MICO_AUTOCONF += --enable-coss
else
MICO_AUTOCONF += --disable-coss
endif
ifdef PTXCONF_MICO_CSL2
MICO_AUTOCONF += --enable-csl2
else
MICO_AUTOCONF += --disable-csl2
endif
ifdef PTXCONF_MICO_CSIV2
MICO_AUTOCONF += --enable-csiv2
else
MICO_AUTOCONF += --disable-csiv2
endif
ifdef PTXCONF_MICO_SERVICE_NAMING
MICO_AUTOCONF += --enable-naming
else
MICO_AUTOCONF += --disable-naming
endif
ifdef PTXCONF_MICO_SERVICE_RELSHIP
MICO_AUTOCONF += --enable-relship
else
MICO_AUTOCONF += --disable-relship
endif
ifdef PTXCONF_MICO_SERVICE_EVENTS
MICO_AUTOCONF += --enable-events
else
MICO_AUTOCONF += --disable-events
endif
ifdef PTXCONF_MICO_SERVICE_STREAM
MICO_AUTOCONF += --enable-stream
else
MICO_AUTOCONF += --disable-stream
endif
ifdef PTXCONF_MICO_SERVICE_PROPERTY
MICO_AUTOCONF += --enable-property
else
MICO_AUTOCONF += --disable-property
endif
# FIXME: even with --disable-trader it tries to use it (tested with 2.3.12RC3)
#ifdef PTXCONF_MICO_SERVICE_TRADER
#MICO_AUTOCONF += --enable-trader
#else
#MICO_AUTOCONF += --disable-trader
#endif
ifdef PTXCONF_MICO_SERVICE_TIME
MICO_AUTOCONF += --enable-time
else
MICO_AUTOCONF += --disable-time
endif
# FIXME: lifecycle service doesn't compile with 2.3.12
#ifdef PTXCONF_MICO_SERVICE_LIFECYCLE
#MICO_AUTOCONF += --enable-life
#else
#MICO_AUTOCONF += --disable-life
#endif
MICO_AUTOCONF += --disable-life
ifdef PTXCONF_MICO_SERVICE_EXTERNALISATION
MICO_AUTOCONF += --enable-externalize
else
MICO_AUTOCONF += --disable-externalize
endif
ifdef PTXCONF_MICO_WIRELESS
MICO_AUTOCONF += --enable-wireless
else
MICO_AUTOCONF += --disable-wireless
endif
ifdef PTXCONF_MICO_WIRELESS_HOME
MICO_AUTOCONF += --enable-wireless-home
else
MICO_AUTOCONF += --disable-wireless-home
endif
ifdef PTXCONF_MICO_WIRELESS_TERMINAL
MICO_AUTOCONF += --enable-wireless-terminal
else
MICO_AUTOCONF += --disable-wireless-terminal
endif
ifdef PTXCONF_MICO_WIRELESS_ACCESS
MICO_AUTOCONF += --enable-wireless-access
else
MICO_AUTOCONF += --disable-wireless-access
endif
ifdef PTXCONF_MICO_REPO
MICO_AUTOCONF += --enable-repo
else
MICO_AUTOCONF += --disable-repo
endif
ifdef PTXCONF_MICO_MINI
MICO_AUTOCONF += --enable-minimum-corba
else
MICO_AUTOCONF += --disable-minimum-corba
endif

# FIXME: re-enable when X is there
MICO_AUTOCONF += --without-x

$(STATEDIR)/mico.prepare: $(mico_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(MICO_DIR)/config.cache)
	cd $(MICO_DIR) && \
		$(MICO_PATH) $(MICO_ENV) \
		./configure $(MICO_AUTOCONF)
	@$(call touch, $@)

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

mico_compile: $(STATEDIR)/mico.compile

$(STATEDIR)/mico.compile: $(mico_compile_deps_default)
	@$(call targetinfo, $@)
	cd $(MICO_DIR) && $(MICO_ENV) $(MICO_PATH) make
	@$(call touch, $@)

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

mico_install: $(STATEDIR)/mico.install

$(STATEDIR)/mico.install: $(mico_install_deps_default)
	@$(call targetinfo, $@)
	@$(call install,MICO)
	@$(call touch, $@)

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

mico_targetinstall: $(STATEDIR)/mico.targetinstall

$(STATEDIR)/mico.targetinstall: $(mico_targetinstall_deps_default)
	@$(call targetinfo, $@)

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

ifdef PTXCONF_MICO_LIBMICOAUX
	@$(call install_copy, mico, 0, 0, 0644, \
		$(MICO_DIR)/libs/libmicoaux$(MICO_VERSION).so, \
		/usr/lib/libmicoaux$(MICO_VERSION).so)
endif
ifdef PTXCONF_MICO_LIBMICOCOSS
	@$(call install_copy, mico, 0, 0, 0644, \
		$(MICO_DIR)/libs/libmicocoss$(MICO_VERSION).so, \
		/usr/lib/libmicocoss$(MICO_VERSION).so)
endif
ifdef PTXCONF_MICO_LIBMICOIR
	@$(call install_copy, mico, 0, 0, 0644, \
		$(MICO_DIR)/libs/libmicoir$(MICO_VERSION).so, \
		/usr/lib/libmicoir$(MICO_VERSION).so)
endif
ifdef PTXCONF_MICO_LIBMICO
	@$(call install_copy, mico, 0, 0, 0644, \
		$(MICO_DIR)/libs/libmico$(MICO_VERSION).so, \
		/usr/lib/libmico$(MICO_VERSION).so)
endif
	@$(call install_finish, mico)

	@$(call touch, $@)

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

mico_clean:
	rm -rf $(STATEDIR)/mico.*
	rm -rf $(IMAGEDIR)/mico_*
	rm -rf $(MICO_DIR)

# vim: syntax=make