]> git.saurik.com Git - apple/xnu.git/blame - makedefs/MakeInc.rule
xnu-792.17.14.tar.gz
[apple/xnu.git] / makedefs / MakeInc.rule
CommitLineData
1c79356b
A
1#
2# Generic Install rules
3#
4
1c79356b
A
5ifndef INSTALL_MI_LCL_LIST
6 INSTALL_MI_LCL_LIST = $(INSTALL_MI_LIST)
7endif
8
9ifndef INSTALL_MI_LCL_GEN_LIST
10 INSTALL_MI_LCL_GEN_LIST = $(INSTALL_MI_GEN_LIST)
11endif
12
13ifndef INSTALL_MD_LCL_LIST
14 INSTALL_MD_LCL_LIST = $(INSTALL_MD_LIST)
15endif
16
17ifndef INSTALL_MD_LCL_GEN_LIST
18 INSTALL_MD_LCL_GEN_LIST = $(INSTALL_MD_GEN_LIST)
19endif
20
91447636
A
21ifndef INSTALL_KF_MI_LCL_LIST
22 INSTALL_KF_MI_LCL_LIST = $(EXPORT_MI_LIST)
23endif
1c79356b 24
91447636
A
25ifndef INSTALL_KF_MI_LCL_GEN_LIST
26 INSTALL_KF_MI_LCL_GEN_LIST = $(EXPORT_MI_GEN_LIST)
27endif
1c79356b 28
91447636
A
29ifndef INSTALL_KF_MD_LCL_LIST
30 INSTALL_KF_MD_LCL_LIST = $(EXPORT_MD_LIST)
31endif
1c79356b 32
91447636
A
33ifndef INSTALL_KF_MD_LCL_GEN_LIST
34 INSTALL_KF_MD_LCL_GEN_LIST = $(EXPORT_MD_GEN_LIST)
35endif
9bccf70c 36
91447636
A
37ifndef INSTALL_KF_MI_LIST
38 INSTALL_KF_MI_LIST = $(EXPORT_MI_LIST)
39endif
1c79356b 40
91447636
A
41ifndef INSTALL_KF_MI_GEN_LIST
42 INSTALL_KF_MI_GEN_LIST = $(EXPORT_MI_GEN_LIST)
43endif
9bccf70c 44
91447636
A
45ifndef INSTALL_KF_MD_LIST
46 INSTALL_KF_MD_LIST = $(EXPORT_MD_LIST)
47endif
9bccf70c 48
91447636
A
49ifndef INSTALL_KF_MD_GEN_LIST
50 INSTALL_KF_MD_GEN_LIST = $(EXPORT_MD_GEN_LIST)
51endif
52
53INSTALL_MI_GEN_FILES = $(addprefix $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR)/, $(INSTALL_MI_GEN_LIST))
1c79356b 54
91447636 55$(INSTALL_MI_GEN_FILES): $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR)/% : %
1c79356b 56 @true echo Installing $< in $(dir $@); \
91447636 57 [ -d $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR) ] ||$(MKDIR) $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR); \
1c79356b
A
58 filename=`$(BASENAME) $<`; \
59 filename_strip=$(addsuffix .strip,$${filename}); \
60 $(RM) $(RMFLAGS) $@; \
91447636
A
61 [ -d ./incmidir ] || $(MKDIR) ./incmidir; \
62 echo garbage > ./incmidir/$${filename_strip}; \
63 $(UNIFDEF) $(SINCFRAME_UNIFDEF) \
64 $< > ./incmidir/$${filename} || \
65 $(DECOMMENT) ./incmidir/$${filename} r > \
66 ./incmidir/$${filename_strip}; \
67 if [ -s ./incmidir/$${filename_strip} ]; \
1c79356b 68 then ( \
91447636 69 install $(INSTALL_FLAGS) ./incmidir/$${filename} $(dir $@);\
1c79356b
A
70 ); \
71 else \
72 echo Header file $< not exported; \
91447636 73 fi;
1c79356b 74
91447636 75INSTALL_KF_MI_GEN_FILES = $(addprefix $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR)/, $(INSTALL_KF_MI_GEN_LIST))
1c79356b 76
91447636
A
77$(INSTALL_KF_MI_GEN_FILES): $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR)/% : %
78 @true echo Installing $< in $(midir $@); \
79 [ -d $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR) ] ||$(MKDIR) $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR); \
1c79356b
A
80 filename=`$(BASENAME) $<`; \
81 filename_strip=$(addsuffix .strip,$${filename}); \
82 $(RM) $(RMFLAGS) $@; \
91447636
A
83 [ -d ./kincmidir ] || $(MKDIR) ./kincmidir; \
84 echo garbage > ./kincmidir/$${filename_strip}; \
85 $(UNIFDEF) $(KINCFRAME_UNIFDEF) \
86 $< > ./kincmidir/$${filename} || \
87 $(DECOMMENT) ./kincmidir/$${filename} r > \
88 ./kincmidir/$${filename_strip}; \
89 if [ -s ./kincmidir/$${filename_strip} ]; \
1c79356b 90 then ( \
91447636 91 install $(INSTALL_FLAGS) ./kincmidir/$${filename} $(dir $@);\
1c79356b
A
92 ); \
93 else \
94 echo Header file $< not exported; \
91447636 95 fi;
1c79356b 96
9bccf70c
A
97INSTALL_MI_GEN_LCL_FILES = $(addprefix $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR)/, $(INSTALL_MI_LCL_GEN_LIST))
98
1c79356b
A
99$(INSTALL_MI_GEN_LCL_FILES): $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR)/% : %
100 @true echo Installing $< in $(dir $@); \
91447636
A
101 [ -d $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR) ] ||$(MKDIR) $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR); \
102 filename=`$(BASENAME) $<`; \
103 filename_strip=$(addsuffix .strip,$${filename}); \
1c79356b 104 $(RM) $(RMFLAGS) $@; \
91447636
A
105 [ -d ./pincmidir ] || $(MKDIR) ./pincmidir; \
106 echo garbage > ./pincmidir/$${filename_strip}; \
107 $(UNIFDEF) $(SPINCFRAME_UNIFDEF) \
108 $< > ./pincmidir/$${filename} || \
109 $(DECOMMENT) ./pincmidir/$${filename} r > \
110 ./pincmidir/$${filename_strip}; \
111 if [ -s ./pincmidir/$${filename_strip} ]; \
112 then ( \
113 install $(INSTALL_FLAGS) ./pincmidir/$${filename} $(dir $@);\
114 ); \
115 else \
116 echo Header file $< not exported; \
117 fi;
1c79356b 118
91447636 119INSTALL_KF_MI_LCL_GEN_FILES = $(addprefix $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR)/, $(INSTALL_KF_MI_LCL_GEN_LIST))
9bccf70c 120
91447636 121$(INSTALL_KF_MI_LCL_GEN_FILES): $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR)/% : %
9bccf70c 122 @true echo Installing $< in $(dir $@); \
91447636
A
123 [ -d $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR) ] ||$(MKDIR) $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR); \
124 filename=`$(BASENAME) $<`; \
125 filename_strip=$(addsuffix .strip,$${filename}); \
9bccf70c 126 $(RM) $(RMFLAGS) $@; \
91447636
A
127 [ -d ./kpincmidir ] || $(MKDIR) ./kpincmidir; \
128 echo garbage > ./kpincmidir/$${filename_strip}; \
129 $(UNIFDEF) $(KPINCFRAME_UNIFDEF) \
130 $< > ./kpincmidir/$${filename} || \
131 $(DECOMMENT) ./kpincmidir/$${filename} r > \
132 ./kpincmidir/$${filename_strip}; \
133 if [ -s ./kpincmidir/$${filename_strip} ]; \
134 then ( \
135 install $(INSTALL_FLAGS) ./kpincmidir/$${filename} $(dir $@);\
136 ); \
137 else \
138 echo Header file $< not exported; \
139 fi;
9bccf70c 140
1c79356b
A
141INSTALL_MD_GEN_INC_FILES = $(addprefix $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR)/, $(INSTALL_MD_GEN_LIST))
142
1c79356b
A
143$(INSTALL_MD_GEN_INC_FILES): $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR)/% : %
144 @true echo Installing $< in $(dir $@); \
91447636 145 [ -d $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR) ] ||$(MKDIR) $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR); \
1c79356b
A
146 filename=`$(BASENAME) $<`; \
147 filename_strip=$(addsuffix .strip,$${filename}); \
148 $(RM) $(RMFLAGS) $@; \
91447636 149 [ -d ./incdir ] || $(MKDIR) ./incdir; \
1c79356b 150 echo garbage > ./incdir/$${filename_strip}; \
91447636 151 $(UNIFDEF) $(SINCFRAME_UNIFDEF) \
1c79356b
A
152 $< > ./incdir/$${filename} || \
153 $(DECOMMENT) ./incdir/$${filename} r > \
154 ./incdir/$${filename_strip}; \
155 if [ -s ./incdir/$${filename_strip} ]; \
156 then ( \
157 install $(INSTALL_FLAGS) ./incdir/$${filename} $(dir $@);\
158 ); \
159 else \
160 echo Header file $< not exported; \
91447636
A
161 fi;
162
163INSTALL_KF_MD_GEN_FILES = $(addprefix $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR)/, $(INSTALL_KF_MD_GEN_LIST))
164
165$(INSTALL_KF_MD_GEN_FILES): $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR)/% : %
166 @true echo Installing $< in $(dir $@); \
167 [ -d $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR) ] ||$(MKDIR) $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR); \
168 filename=`$(BASENAME) $<`; \
169 filename_strip=$(addsuffix .strip,$${filename}); \
170 $(RM) $(RMFLAGS) $@; \
171 [ -d ./kincdir ] || $(MKDIR) ./kincdir; \
172 echo garbage > ./kincdir/$${filename_strip}; \
173 $(UNIFDEF) $(KINCFRAME_UNIFDEF) \
174 $< > ./kincdir/$${filename} || \
175 $(DECOMMENT) ./kincdir/$${filename} r > \
176 ./kincdir/$${filename_strip}; \
177 if [ -s ./kincdir/$${filename_strip} ]; \
178 then ( \
179 install $(INSTALL_FLAGS) ./kincdir/$${filename} $(dir $@);\
180 ); \
181 else \
182 echo Header file $< not exported; \
183 fi;
1c79356b 184
9bccf70c
A
185INSTALL_MD_LCL_FILES = $(addprefix $(SOURCE), $(INSTALL_MD_LCL_LIST))
186INSTALL_MD_GEN_LCL_FILES = $(addprefix $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR)/, $(INSTALL_MD_LCL_GEN_LIST))
187
1c79356b
A
188$(INSTALL_MD_GEN_LCL_FILES): $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR)/% : %
189 @true echo Installing $< in $(dir $@); \
91447636
A
190 [ -d $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR) ] ||$(MKDIR) $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR); \
191 filename=`$(BASENAME) $<`; \
192 filename_strip=$(addsuffix .strip,$${filename}); \
1c79356b 193 $(RM) $(RMFLAGS) $@; \
91447636
A
194 [ -d ./pincdir ] || $(MKDIR) ./pincdir; \
195 echo garbage > ./pincdir/$${filename_strip}; \
196 $(UNIFDEF) $(SPINCFRAME_UNIFDEF) \
197 $< > ./pincdir/$${filename} || \
198 $(DECOMMENT) ./pincdir/$${filename} r > \
199 ./pincdir/$${filename_strip}; \
200 if [ -s ./pincdir/$${filename_strip} ]; \
201 then ( \
202 install $(INSTALL_FLAGS) ./pincdir/$${filename} $(dir $@);\
203 ); \
204 else \
205 echo Header file $< not exported; \
206 fi;
1c79356b 207
91447636
A
208INSTALL_KF_MD_LCL_FILES = $(addprefix $(SOURCE), $(INSTALL_KF_MD_LCL_LIST))
209INSTALL_KF_MD_LCL_GEN_FILES = $(addprefix $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR)/, $(INSTALL_KF_MD_LCL_GEN_LIST))
9bccf70c 210
91447636 211$(INSTALL_KF_MD_LCL_GEN_FILES): $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR)/% : %
9bccf70c 212 @true echo Installing $< in $(dir $@); \
91447636
A
213 [ -d $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR) ] ||$(MKDIR) $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR); \
214 filename=`$(BASENAME) $<`; \
215 filename_strip=$(addsuffix .strip,$${filename}); \
9bccf70c 216 $(RM) $(RMFLAGS) $@; \
91447636
A
217 [ -d ./kpincdir ] || $(MKDIR) ./kpincdir; \
218 echo garbage > ./kpincdir/$${filename_strip}; \
219 $(UNIFDEF) $(KPINCFRAME_UNIFDEF) \
220 $< > ./kpincdir/$${filename} || \
221 $(DECOMMENT) ./kpincdir/$${filename} r > \
222 ./kpincdir/$${filename_strip}; \
223 if [ -s ./kpincdir/$${filename_strip} ]; \
224 then ( \
225 install $(INSTALL_FLAGS) ./kpincdir/$${filename} $(dir $@);\
226 ); \
227 else \
228 echo Header file $< not exported; \
229 fi;
9bccf70c 230
1c79356b
A
231setup_installhdrs_mi:
232 @echo "[ $(SOURCE) ] make setup_installhdrs_mi $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
233
91447636
A
234do_installhdrs_mi: $(INSTALL_MI_GEN_FILES) $(INSTALL_MI_GEN_LCL_FILES) $(INSTALL_KF_MI_GEN_FILES) $(INSTALL_KF_MI_LCL_GEN_FILES)
235 @true echo "[ $(SOURCE) ] make do_installhdrs_mi $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"; \
236 $(MKDIR) ./incmidir ./pincmidir ./kincmidir ./kpincmidir; \
237 if [ -n "$(strip $(INSTALL_MI_LIST))" ]; then \
1c79356b
A
238 if [ -d $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR) ]; then \
239 (cd $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR);$(RM) $(RMFLAGS) $(INSTALL_MI_LIST) ); \
240 else \
241 $(MKDIR) $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR); \
242 fi; \
1c79356b
A
243 for j in $(INSTALL_MI_LIST); \
244 do \
91447636
A
245 echo garbage > ./incmidir/$$j.strip; \
246 $(UNIFDEF) $(SINCFRAME_UNIFDEF) \
247 $(SOURCE)/$$j > ./incmidir/$$j || \
248 $(DECOMMENT) ./incmidir/$$j r > \
249 ./incmidir/$$j.strip; \
250 if [ -s ./incmidir/$$j.strip ]; \
1c79356b 251 then ( \
91447636 252 install $(INSTALL_FLAGS) ./incmidir/$$j $(DSTROOT)/$(INCDIR)/$(INSTALL_MI_DIR); \
1c79356b
A
253 ); \
254 else \
255 echo Header file $$j not exported; \
256 fi; \
257 done; \
91447636
A
258 fi; \
259 if [ -n "$(strip $(INSTALL_MI_LCL_LIST))" ]; then \
1c79356b
A
260 if [ -d $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR) ]; then \
261 (cd $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR);$(RM) $(RMFLAGS) $(INSTALL_MI_LCL_LIST) ); \
91447636 262 else \
1c79356b
A
263 $(MKDIR) $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR); \
264 fi; \
91447636
A
265 for j in $(INSTALL_MI_LCL_LIST); \
266 do \
267 echo garbage > ./pincmidir/$$j.strip; \
268 $(UNIFDEF) $(SPINCFRAME_UNIFDEF) \
269 $(SOURCE)/$$j > ./pincmidir/$$j || \
270 $(DECOMMENT) ./pincmidir/$$j r > \
271 ./pincmidir/$$j.strip; \
272 if [ -s ./pincmidir/$$j.strip ]; \
273 then ( \
274 install $(INSTALL_FLAGS) ./pincmidir/$$j $(DSTROOT)/$(LCLDIR)/$(INSTALL_MI_DIR); \
275 ); \
276 else \
277 echo Header file $$j not exported; \
278 fi; \
279 done; \
280 fi; \
281 if [ -n "$(strip $(INSTALL_KF_MI_LIST))" ]; then \
282 if [ -d $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR) ]; then \
283 (cd $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR);$(RM) $(RMFLAGS) $(INSTALL_KF_MI_LIST) ); \
284 else \
285 $(MKDIR) $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR); \
9bccf70c 286 fi; \
91447636
A
287 for j in $(INSTALL_KF_MI_LIST); \
288 do \
289 echo garbage > ./kincmidir/$$j.strip; \
290 $(UNIFDEF) $(KINCFRAME_UNIFDEF) \
291 $(SOURCE)/$$j > ./kincmidir/$$j || \
292 $(DECOMMENT) ./kincmidir/$$j r > \
293 ./kincmidir/$$j.strip; \
294 if [ -s ./kincmidir/$$j.strip ]; \
295 then ( \
296 install $(INSTALL_FLAGS) ./kincmidir/$$j $(DSTROOT)/$(KINCDIR)/$(EXPORT_MI_DIR); \
297 ); \
298 else \
299 echo Header file $$j not exported; \
300 fi; \
301 done; \
302 fi; \
303 if [ -n "$(strip $(INSTALL_KF_MI_LCL_LIST))" ]; then \
304 if [ -d $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR) ]; then \
305 (cd $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR);$(RM) $(RMFLAGS) $(INSTALL_KF_MI_LCL_LIST) ); \
306 else \
307 $(MKDIR) $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR); \
308 fi; \
309 for j in $(INSTALL_KF_MI_LCL_LIST); \
310 do \
311 echo garbage > ./kpincmidir/$$j.strip; \
312 $(UNIFDEF) $(KPINCFRAME_UNIFDEF) \
313 $(SOURCE)/$$j > ./kpincmidir/$$j || \
314 $(DECOMMENT) ./kpincmidir/$$j r > \
315 ./kpincmidir/$$j.strip; \
316 if [ -s ./kpincmidir/$$j.strip ]; \
317 then ( \
318 install $(INSTALL_FLAGS) ./kpincmidir/$$j $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MI_DIR); \
319 ); \
320 else \
321 echo Header file $$j not exported; \
322 fi; \
323 done; \
324 fi; \
325 $(RM) -rf ./incmidir ./pincmidir ./kincmidir ./kpincmidir;
1c79356b
A
326
327setup_installhdrs_md:
328 @echo "[ $(SOURCE) ] make setup_installhdrs_md $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
329
91447636
A
330do_installhdrs_md: $(INSTALL_MD_GEN_INC_FILES) $(INSTALL_MD_GEN_LCL_FILES) $(INSTALL_KF_MD_GEN_FILES) $(INSTALL_KF_MD_LCL_GEN_FILES)
331 @true echo "[ $(SOURCE) ] make do_installhdrs_md $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"; \
332 $(MKDIR) ./incdir ./pincdir ./kincdir ./kpincdir; \
333 if [ -n "$(strip $(INSTALL_MD_LIST))" ]; then \
1c79356b
A
334 if [ -d $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR) ]; then \
335 (cd $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR);$(RM) $(RMFLAGS) $(INSTALL_MD_LIST) ); \
336 else \
337 $(MKDIR) $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR); \
338 fi; \
1c79356b
A
339 for j in $(INSTALL_MD_LIST); \
340 do \
341 echo garbage > ./incdir/$$j.strip; \
91447636 342 $(UNIFDEF) $(SINCFRAME_UNIFDEF) \
1c79356b
A
343 $(SOURCE)/$$j > ./incdir/$$j || \
344 $(DECOMMENT) ./incdir/$$j r > \
345 ./incdir/$$j.strip; \
346 if [ -s ./incdir/$$j.strip ]; \
347 then ( \
348 install $(INSTALL_FLAGS) ./incdir/$$j $(DSTROOT)/$(INCDIR)/$(INSTALL_MD_DIR); \
349 ); \
350 else \
351 echo Header file $$j not exported; \
352 fi; \
353 done; \
91447636
A
354 fi; \
355 if [ -n "$(strip $(INSTALL_MD_LCL_LIST))" ]; then \
1c79356b
A
356 if [ -d $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR) ]; then \
357 (cd $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR);$(RM) $(RMFLAGS) $(INSTALL_MD_LCL_LIST) ); \
358 else \
359 $(MKDIR) $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR); \
360 fi; \
91447636
A
361 for j in $(INSTALL_MD_LCL_LIST); \
362 do \
363 echo garbage > ./pincdir/$$j.strip; \
364 $(UNIFDEF) $(SPINCFRAME_UNIFDEF) \
365 $(SOURCE)/$$j > ./pincdir/$$j || \
366 $(DECOMMENT) ./pincdir/$$j r > \
367 ./pincdir/$$j.strip; \
368 if [ -s ./pincdir/$$j.strip ]; \
369 then ( \
370 install $(INSTALL_FLAGS) ./pincdir/$$j $(DSTROOT)/$(LCLDIR)/$(INSTALL_MD_DIR); \
371 ); \
372 else \
373 echo Header file $$j not exported; \
374 fi; \
375 done; \
376 fi; \
377 if [ -n "$(strip $(INSTALL_KF_MD_LIST))" ]; then \
378 if [ -d $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR) ]; then \
379 (cd $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR);$(RM) $(RMFLAGS) $(INSTALL_KF_MD_LIST) ); \
9bccf70c 380 else \
91447636 381 $(MKDIR) $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR); \
9bccf70c 382 fi; \
91447636
A
383 for j in $(INSTALL_KF_MD_LIST); \
384 do \
385 echo garbage > ./kincdir/$$j.strip; \
386 $(UNIFDEF) $(KINCFRAME_UNIFDEF) \
387 $(SOURCE)/$$j > ./kincdir/$$j || \
388 $(DECOMMENT) ./kincdir/$$j r > \
389 ./kincdir/$$j.strip; \
390 if [ -s ./kincdir/$$j.strip ]; \
391 then ( \
392 install $(INSTALL_FLAGS) ./kincdir/$$j $(DSTROOT)/$(KINCDIR)/$(EXPORT_MD_DIR); \
393 ); \
394 else \
395 echo Header file $$j not exported; \
396 fi; \
397 done; \
398 fi; \
399 if [ -n "$(strip $(INSTALL_KF_MD_LCL_LIST))" ]; then \
400 if [ -d $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR) ]; then \
401 (cd $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR);$(RM) $(RMFLAGS) $(INSTALL_KF_MD_LCL_LIST) ); \
402 else \
403 $(MKDIR) $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR); \
404 fi; \
405 for j in $(INSTALL_KF_MD_LCL_LIST); \
406 do \
407 echo garbage > ./kpincdir/$$j.strip; \
408 $(UNIFDEF) $(KPINCFRAME_UNIFDEF) \
409 $(SOURCE)/$$j > ./kpincdir/$$j || \
410 $(DECOMMENT) ./kpincdir/$$j r > \
411 ./kpincdir/$$j.strip; \
412 if [ -s ./kpincdir/$$j.strip ]; \
413 then ( \
414 install $(INSTALL_FLAGS) ./kpincdir/$$j $(DSTROOT)/$(KPINCDIR)/$(EXPORT_MD_DIR); \
415 ); \
416 else \
417 echo Header file $$j not exported; \
418 fi; \
419 done; \
420 fi; \
421 $(RM) -rf ./incdir ./pincdir ./kincdir ./kpincdir;
1c79356b 422
1c79356b
A
423
424#
425# Generic Export rules
426#
427ifeq ($(INCR_EXPORTHDRS), TRUE)
428
429EXPORT_MI_INC_FILES = $(addprefix $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR)/, $(EXPORT_MI_LIST))
430EXPORT_MI_GEN_INC_FILES = $(addprefix $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR)/, $(EXPORT_MI_GEN_LIST))
431
432$(EXPORT_MI_INC_FILES) $(EXPORT_MI_GEN_INC_FILES): $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR)/% : %
433 @true echo Exporting $< in $(dir $@); \
91447636 434 [ -d $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR) ] ||$(MKDIR) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR); \
1c79356b
A
435 ${CP} -p $< $(dir $@); \
436
437
438EXPORT_MD_INC_FILES = $(addprefix $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR)/, $(EXPORT_MD_LIST))
439EXPORT_MD_GEN_INC_FILES = $(addprefix $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR)/, $(EXPORT_MD_GEN_LIST))
440
441$(EXPORT_MD_INC_FILES) $(EXPORT_MD_GEN_INC_FILES): $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR)/% : %
442 @true echo Exporting $< in $(dir $@); \
91447636 443 [ -d $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR) ] ||$(MKDIR) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR); \
1c79356b
A
444 ${CP} -p $< $(dir $@); \
445
446setup_exporthdrs_mi:
447 @echo "[ $(SOURCE) ] make setup_exporthdrs_mi $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
448
449do_exporthdrs_mi: $(EXPORT_MI_INC_FILES) $(EXPORT_MI_GEN_INC_FILES)
9bccf70c 450 @true echo "[ $(SOURCE) ] make do_exporthdrs_mi $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
1c79356b
A
451
452setup_exporthdrs_md:
453 @echo "[ $(SOURCE) ] make setup_exporthdrs_md $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
454
455do_exporthdrs_md: $(EXPORT_MD_INC_FILES) $(EXPORT_MD_GEN_INC_FILES)
9bccf70c 456 @true echo "[ $(SOURCE) ] make do_exporthdrs_md $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
1c79356b
A
457
458else
459
460EXPORT_MI_INC_FILES = $(addprefix $(SOURCE), $(EXPORT_MI_LIST))
461EXPORT_MI_GEN_INC_FILES = $(addprefix $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR)/, $(EXPORT_MI_GEN_LIST))
462
463$(EXPORT_MI_GEN_INC_FILES): $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR)/% : %
464 @true echo Exporting $< in $(dir $@); \
91447636 465 [ -d $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR) ] ||$(MKDIR) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR); \
1c79356b
A
466 ${CP} -p $< $(dir $@); \
467
468
469EXPORT_MD_INC_FILES = $(addprefix $(SOURCE), $(EXPORT_MD_LIST))
470EXPORT_MD_GEN_INC_FILES = $(addprefix $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR)/, $(EXPORT_MD_GEN_LIST))
471
472$(EXPORT_MD_GEN_INC_FILES): $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR)/% : %
473 @true echo Exporting $< in $(dir $@); \
91447636 474 [ -d $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR) ] ||$(MKDIR) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR); \
1c79356b
A
475 ${CP} -p $< $(dir $@); \
476
477setup_exporthdrs_mi:
478 @echo "[ $(SOURCE) ] make setup_exporthdrs_mi $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
479
480do_exporthdrs_mi: $(EXPORT_MI_GEN_INC_FILES)
9bccf70c 481 @true echo "[ $(SOURCE) ] make do_exporthdrs_mi $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
1c79356b
A
482 @if [ -n "$(strip $(EXPORT_MI_LIST))" ]; then \
483 if [ -d $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR) ]; then \
484 (cd $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR);$(RM) $(RMFLAGS) $(EXPORT_MI_LIST) ); \
485 else \
486 $(MKDIR) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR); \
487 fi; \
488 ${CP} -p $(EXPORT_MI_INC_FILES) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MI_DIR); \
489 fi
490
491setup_exporthdrs_md:
492 @echo "[ $(SOURCE) ] make setup_exporthdrs_md $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
493
494do_exporthdrs_md: $(EXPORT_MD_GEN_INC_FILES)
9bccf70c 495 @true echo "[ $(SOURCE) ] make do_exporthdrs_md $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
1c79356b
A
496 @if [ -n "$(strip $(EXPORT_MD_LIST))" ]; then \
497 if [ -d $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR) ]; then \
498 (cd $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR);$(RM) $(RMFLAGS) $(EXPORT_MD_LIST) ); \
499 else \
500 $(MKDIR) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR); \
501 fi; \
502 ${CP} -p $(EXPORT_MD_INC_FILES) $(OBJROOT)/$(EXPDIR)/$(EXPORT_MD_DIR); \
503 fi
504
505
506#
507endif
508#
509# Generic Compilation rules
510#
511
512#
513# Compilation rules to generate .o from .s
514#
515COMP_SOBJ_FILES = $(addprefix $(TARGET)$(COMP_OBJ_DIR), $(COMP_SOBJ_LIST))
516
517$(COMP_SOBJ_FILES): $(TARGET)$(COMP_OBJ_DIR)%.o : %.s
518 ${S_KCC} -E -MD ${SFLAGS} -DASSEMBLER $(INCFLAGS) $< > $(patsubst %.o, %.pp, ${@});
519 sed '/^\#/d' $(patsubst %.o, %.pp, ${@}) > $(patsubst %.o, %.s, ${@});
55e303ae 520 ${S_KCC} ${SFLAGS} ${_HOST_AS_FLAGS} -c $(patsubst %.o, %.s, ${@});
1c79356b
A
521 ${RM} ${_RMFLAGS_} $(patsubst %.o, %.pp, ${@}) $(patsubst %.o,%.s,${@});
522
523S_RULE_1A=@ls /
524S_RULE_1B= ${patsubst %.o,%.s,${@}} > /dev/null
525S_RULE_2= ${S_KCC} -E -MD ${SFLAGS} -DASSEMBLER $(INCFLAGS) $< \
526 > $(patsubst %.o, %.pp, ${@}); \
527 sed '/^\#/d' $(patsubst %.o, %.pp, ${@}) > $(patsubst %.o, %.s, ${@});
55e303ae 528S_RULE_3= ${S_KCC} ${SFLAGS} ${_HOST_AS_FLAGS} -c $(patsubst %.o, %.s, ${@});\
1c79356b
A
529 ${RM} ${_RMFLAGS_} $(patsubst %.o, %.pp, ${@}) $(patsubst %.o,%.s,${@})
530
531#
532# Compilation rules to generate .o from .c
533#
534COMP_COBJ_FILES = $(addprefix $(TARGET)$(COMP_OBJ_DIR), $(COMP_COBJ_LIST))
535
536$(COMP_COBJ_FILES): $(TARGET)$(COMP_OBJ_DIR)%.o : %.c
55e303ae 537 ${KCC} -c ${filter-out ${${join $@,_CFLAGS_RM}}, ${CFLAGS}} -MD ${${join $@,_CFLAGS_ADD}} ${INCFLAGS} ${${join $@,_INCFLAGS}} $<
1c79356b
A
538
539#
540# Compilation rules to generate .o from .c for normal files
541#
91447636 542C_RULE_1A=${KCC} -c ${filter-out ${${join $@,_CFLAGS_RM}}, ${CFLAGS} ${CWARNFLAGS}} -MD ${${join $@,_CFLAGS_ADD}} ${INCFLAGS} ${${join $@,_INCFLAGS}}
1c79356b
A
543C_RULE_1B=$*.c
544C_RULE_2=
545C_RULE_3=
546C_RULE_4=
547
548#
549# Compilation rules to generate .o from .c for driver files
550#
551C_RULE_1A_D=${C_RULE_1A}
552C_RULE_1B_D=${C_RULE_1B}
553C_RULE_2_D=${C_RULE_2}
554C_RULE_3_D=${C_RULE_3}
555C_RULE_4_D=${C_RULE_4}
556
557#
558# Compilation rules to generate .o from .m
559#
91447636 560M_RULE_1A=${KCC} -c ${filter-out ${${join $@,_CFLAGS_RM}}, ${CFLAGS} ${MWARNFLAGS}} -MD ${${join $@,_CFLAGS_ADD}} ${INCFLAGS} ${${join $@,_INCFLAGS}}
1c79356b
A
561M_RULE_1B=$*.m
562M_RULE_2=
563M_RULE_3=
564M_RULE_4=
565
566#
567# Compilation rules to generate .co from .cp or .cpo from .cpp
568# The config tool slickly changes the last source filename char to 'o'
569# for the object filename.
570#
91447636 571P_RULE_1A=${KC++} -o $@ -c ${CXXFLAGS} ${filter-out ${${join $@,_CFLAGS_RM}}, ${CFLAGS} ${CXXWARNFLAGS}} -MD ${${join $@,_CFLAGS_ADD}} ${INCFLAGS} ${${join $@,_INCFLAGS}}
1c79356b 572P_RULE_1B=$(<F)
9bccf70c 573P_RULE_2=@sed 's/.c.o: /.cpo: /' $(@:.cpo=.d) > $(@:.cpo=.d~) && mv $(@:.cpo=.d~) $(@:.cpo=.d)
1c79356b
A
574P_RULE_3=
575P_RULE_4=
576
577#
578# Linker rule to generate a component
579#
580LD_COMPONENT_OBJ_FILES = $(addprefix $(TARGET)$(COMP_OBJ_DIR), $(LD_COMPONENT_OBJ_LIST))
581
582COMPONENT_IMAGE_FILE = $(addprefix $(TARGET), $(COMPONENT_IMAGE))
583
584$(COMPONENT_IMAGE_FILE): $(LD_COMPONENT_OBJ_FILES)
585 @echo "[ creating $(COMPONENT_IMAGE) ]"
586 $(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT_IMAGE_FILE) ${LD_COMPONENT_OBJ_FILES};
587 (cd $(TARGET)$(COMP_OBJ_DIR); ${MD} -u Makedep -f -d `ls *.d`);
588
589setup_build_all:
590 @echo "[ $(SOURCE) ] make setup_build_all $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
591
592do_build_all: $(COMP_FILES) $(COMP_COBJ_FILES) $(COMP_SOBJ_FILES) $(COMPONENT_IMAGE_FILE)
9bccf70c 593 @true echo "[ $(SOURCE) ] make do_build_all $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
1c79356b 594
0b4e3aa0 595ifeq ($(COMPONENT), .)
1c79356b
A
596do_build_all: do_build_mach_kernel
597endif
598
599#
600# mach_kernel building rules
601#
55e303ae 602do_build_mach_kernel: $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/kgmacros
0b4e3aa0 603 @echo "[ building mach_kernel ]";
91447636
A
604 @install $(DATA_INSTALL_FLAGS) $(SRCROOT)/config/version.c $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/version.c;
605 @$(SRCROOT)/config/newvers.pl $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/version.c;
606 ${KCC} -c ${filter-out ${${join $@,_CFLAGS_RM}}, ${CFLAGS}} ${${join $@,_CFLAGS_ADD}} ${INCFLAGS} ${${join $@,_INCFLAGS}} $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/version.c -o $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/version.o
8f6c56a5 607 $(LD) $(LDFLAGS_KERNEL) $(addprefix $(TARGET)/,$(foreach component,$(COMPONENT_LIST), $(addprefix $(component)/$(firstword $($(addsuffix _KERNEL_CONFIG, $(shell echo -n $(component) | tr a-z A-Z))) $(KERNEL_CONFIG))/, $(addsuffix .o, $(component))))) $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/version.o -o $(TARGET)/mach_kernel.sys $(LD_KERNEL_LIBS); \
0b4e3aa0 608 $(STRIP) $(STRIP_FLAGS) $(TARGET)/mach_kernel.sys -o $(TARGET)/mach_kernel;
55e303ae
A
609
610$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/kgmacros: $(SRCROOT)/kgmacros
611 cp $? $@
612
1c79356b
A
613#
614# Generic Install rules
615#
616INSTALL_FILE_FILES = $(addprefix $(DSTROOT)$(INSTALL_FILE_DIR), $(INSTALL_FILE_LIST))
617
618force_file_install:
619
0b4e3aa0 620$(INSTALL_FILE_FILES): $(DSTROOT)$(INSTALL_FILE_DIR)% : $(TARGET)/% force_file_install
1c79356b 621 @echo Installing $< in $@;
55e303ae
A
622 @if [ ! -e $(DSTROOT)$(INSTALL_FILE_DIR) ]; then \
623 $(MKDIR) $(DSTROOT)$(INSTALL_FILE_DIR); \
624 fi; \
0b4e3aa0 625 if [ "`echo $(INSTALL_ARCHS_LC) | wc -w`" -eq 1 ]; then \
1c79356b 626 $(RM) $(RMFLAGS) $@; \
d7e50217 627 install $(FILE_INSTALL_FLAGS) $< $(dir $@); \
1c79356b
A
628 else \
629 if [ ! -e $@ ]; then \
55e303ae
A
630 echo >empty_file_$(notdir $@); \
631 lipo_arg="$(subst _empty_file, empty_file_$(notdir $@),$(foreach lipo_arch,$(INSTALL_ARCHS_LC), $(addprefix -arch , $(addsuffix _empty_file, $(lipo_arch)))))"; \
1c79356b 632 $(LIPO) $${lipo_arg} -create -output $@; \
55e303ae
A
633 $(RM) $(RMFLAGS) empty_file_$(notdir $@); \
634 fi; \
0b4e3aa0 635 $(LIPO) $@ -replace $(ARCH_CONFIG_LC) $< -o $@; \
1c79356b
A
636 fi
637
638INSTALL_FILESYS_FILES = $(addprefix $(SYMROOT)$(INSTALL_FILE_DIR), $(INSTALL_FILE_LIST))
639
640force_filesys_install:
641
0b4e3aa0 642$(INSTALL_FILESYS_FILES): $(SYMROOT)$(INSTALL_FILE_DIR)% : $(TARGET)/%.sys force_filesys_install
1c79356b 643 @echo Installing $< in $@;
55e303ae
A
644 @if [ ! -e $(SYMROOT)$(INSTALL_FILE_DIR) ]; then \
645 $(MKDIR) $(SYMROOT)$(INSTALL_FILE_DIR); \
646 fi; \
0b4e3aa0 647 if [ "`echo $(INSTALL_ARCHS_LC) | wc -w`" -eq 1 ]; then \
1c79356b
A
648 $(RM) $(RMFLAGS) $@; \
649 install $(INSTALL_FLAGS) $< $(dir $@); \
650 else \
651 if [ ! -e $@ ]; then \
55e303ae
A
652 echo >empty_filesys_$(notdir $@); \
653 lipo_arg="$(subst _empty_file, empty_filesys_$(notdir $@),$(foreach lipo_arch,$(INSTALL_ARCHS_LC), $(addprefix -arch , $(addsuffix _empty_file, $(lipo_arch)))))"; \
1c79356b 654 $(LIPO) $${lipo_arg} -create -output $@; \
55e303ae
A
655 $(RM) $(RMFLAGS) empty_filesys_$(notdir $@); \
656 fi; \
0b4e3aa0 657 $(LIPO) $@ -replace $(ARCH_CONFIG_LC) $< -o $@; \
1c79356b 658 fi
55e303ae 659 cp $(SOURCE)kgmacros $(SYMROOT)$(INSTALL_FILE_DIR)
1c79356b 660
d7e50217
A
661INSTALL_DATA_FILES = $(addprefix $(DSTROOT)$(INSTALL_DATA_DIR), $(INSTALL_DATA_LIST))
662
663$(INSTALL_DATA_FILES): $(DSTROOT)$(INSTALL_DATA_DIR)% : $(SOURCE)/%
664 @echo Installing $< in $@;
91447636 665 @[ -d $(dir $@) ] ||$(MKDIR) $(dir $@); \
d7e50217
A
666 $(RM) $(RMFLAGS) $@; \
667 install $(DATA_INSTALL_FLAGS) $< $(dir $@);
668
1c79356b
A
669setup_build_install:
670 @echo "[ $(SOURCE) ] make setup_build_install $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
671
d7e50217 672do_build_install: $(INSTALL_FILESYS_FILES) $(INSTALL_FILE_FILES) $(INSTALL_DATA_FILES)
1c79356b
A
673 @echo "[ $(SOURCE) ] make do_build_install $(KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"
674
9bccf70c
A
675INSTALL_MAN_FILES = $(addprefix $(DSTROOT)/$(MANDIR)/$(INSTALL_MAN_DIR)/, $(INSTALL_MAN_LIST))
676
677do_installman: $(INSTALL_MAN_FILES)
678 @echo "[ $(SOURCE) ] make do_installman"
679 @if [ -n "$(strip $(INSTALL_MAN_LIST))" ]; then \
680 man_dir=$(DSTROOT)/$(MANDIR)/$(INSTALL_MAN_DIR); \
681 if [ -d $$man_dir ]; then \
682 cur_dir=`pwd`; \
683 cd $$man_dir; \
91447636 684 $(RM) $(RMFLAGS) $(INSTALL_MAN_LIST) $(INSTALL_MAN_LINKS); \
9bccf70c
A
685 cd $$cur_dir; \
686 else \
687 $(MKDIR) $$man_dir; \
688 fi; \
689 echo Installing $(INSTALL_MAN_LIST) in $$man_dir; \
690 install $(INSTALL_FLAGS) $(INSTALL_MAN_LIST) $$man_dir; \
91447636
A
691 if [ -n "$(strip $(INSTALL_MAN_LINKS))" ]; then \
692 set `echo ${INSTALL_MAN_LINKS}`; \
693 while : ; do \
694 case $$# in \
695 0) break;; \
696 1) echo "warn: empty INSTALL_MAN_LINKS: $$1"; break;; \
697 esac; \
698 link_src=$$1; shift; link_dst=$$1; shift; \
699 echo "hard linking $${link_src} to $${link_dst}"; \
700 ln -f $${man_dir}/$${link_src} $${man_dir}/$${link_dst} ; \
701 done; \
702 fi; \
9bccf70c
A
703 fi
704
705$(INSTALL_MAN_FILES): $(DSTROOT)/$(MANDIR)/$(INSTALL_MAN_DIR)/% : %
706 @true echo Installing $< in $(dir $@); \
707 $(MKDIR) $(DSTROOT)/$(MANDIR)/$(INSTALL_MAN_DIR); \
708 $(RM) $(RMFLAGS) $@; \
709 install $(INSTALL_FLAGS) $< $(dir $@);
710
0b4e3aa0 711ifeq ($(INCL_MAKEDEP), TRUE)
1c79356b 712-include Makedep
0b4e3aa0 713endif
1c79356b 714