Lines Matching refs:platform

29 # emu is a special case so many core functionality isn't needed on this platform
54 # Create platform => groups reverse map, where groups covering that
55 # platform are ordered by their sizes
58 for platform in GRUB_PLATFORMS:
59 # initialize with platform itself as a group
60 RMAP[platform] = [ platform ]
64 # skip groups that don't cover this platform
65 if platform not in v: continue
70 for group in RMAP[platform]:
75 RMAP[platform] = smaller + [ k ] + bigger
126 # Template for keys with platform names as values, for example:
133 def if_platform_tagged(platform, tag, snippet_if, snippet_else=None):
137 for group in RMAP[platform]:
163 # Template for handling best matched values for a platform, for example:
171 def foreach_platform_specific_value(platform, suffix, nonetag, closure):
173 for group in RMAP[platform]:
176 if group == RMAP[platform][0]:
197 # Template for handling values from sum of all groups for a platform,
206 def foreach_platform_value (platform, suffix, closure):
208 for group in RMAP[platform]:
217 # Template for gaurding with platform specific "enable" keys, for example:
234 for platform in GRUB_PLATFORMS:
235 r += "\nif COND_" + platform + "\n" + closure(platform) + "endif\n"
237 for platform in GRUB_PLATFORMS:
238 x = "\nif COND_" + platform + "\n" + closure(platform) + "endif\n"
239 r += if_platform_tagged(platform, "enable", x)
244 # Template for gaurding with platform specific automake conditionals,
261 foreach_platform_specific_value(platform, "_condition", "condition", lambda cond: "if " + cond + "\n"))
265 foreach_platform_specific_value(platform, "_condition", "condition", lambda cond: "endif " + cond + "\n"))
266 def under_platform_specific_conditionals(platform, snippet):
267 r = "[+ if_" + platform + "_conditionals +]"
269 r += "[+ endif_" + platform + "_conditionals +]"
272 def platform_specific_values(platform, suffix, nonetag):
273 return foreach_platform_specific_value(platform, suffix, nonetag,
276 def platform_values(platform, suffix):
277 return foreach_platform_value(platform, suffix, lambda value: value + " ")
300 # platform specific values for cflags, ldflags, etc. tags.
355 def module(platform):
361 r += var_set(cname() + "_SOURCES", platform_sources(platform) + " ## platform sources")
362 r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform) + " ## platform nodist sources")
363 r += var_set(cname() + "_LDADD", platform_ldadd(platform))
364 r += var_set(cname() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_MODULE) " + platform_cflags(platform))
365 r += var_set(cname() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_MODULE) " + platform_ldflags(platform))
366 r += var_set(cname() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_MODULE) " + platform_cppflags(platform))
367 r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_MODULE) " + platform_ccasflags(platform))
368 # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
384 def kernel(platform):
387 r += var_set(cname() + "_SOURCES", platform_startup(platform))
388 r += var_add(cname() + "_SOURCES", platform_sources(platform))
389 r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform) + " ## platform nodist sources")
390 r += var_set(cname() + "_LDADD", platform_ldadd(platform))
391 r += var_set(cname() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_KERNEL) " + platform_cflags(platform))
392 r += var_set(cname() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_KERNEL) " + platform_ldflags(platform))
393 r += var_set(cname() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) " + platform_cppflags(platform))
394 r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_KERNEL) " + platform_ccasflags(platform))
395 r += var_set(cname() + "_STRIPFLAGS", "$(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL) " + platform_stripflags(platform))
396 # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
405 if_platform_tagged(platform, "nostrip", "cp $< $@",
414 def image(platform):
417 r += var_set(cname() + "_SOURCES", platform_sources(platform))
418 r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform) + "## platform nodist sources")
419 r += var_set(cname() + "_LDADD", platform_ldadd(platform))
420 r += var_set(cname() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_IMAGE) " + platform_cflags(platform))
421 r += var_set(cname() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_IMAGE) " + platform_ldflags(platform))
422 r += var_set(cname() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) " + platform_cppflags(platform))
423 r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_IMAGE) " + platform_ccasflags(platform))
424 r += var_set(cname() + "_OBJCOPYFLAGS", "$(OBJCOPYFLAGS_IMAGE) " + platform_objcopyflags(platform))
425 # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
442 def library(platform):
453 r += var_add(cname() + "_SOURCES", platform_sources(platform))
454 r += var_add("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform))
455 r += var_add(cname() + "_CFLAGS", first_time("$(AM_CFLAGS) $(CFLAGS_LIBRARY) ") + platform_cflags(platform))
456 r += var_add(cname() + "_CPPFLAGS", first_time("$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) ") + platform_cppflags(platform))
457 r += var_add(cname() + "_CCASFLAGS", first_time("$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) ") + platform_ccasflags(platform))
458 # r += var_add(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
479 def program(platform, test=False):
490 r += var_set(cname() + "_SOURCES", platform_sources(platform))
491 r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform))
492 r += var_set(cname() + "_LDADD", platform_ldadd(platform))
493 r += var_set(cname() + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_PROGRAM) " + platform_cflags(platform))
494 r += var_set(cname() + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_PROGRAM) " + platform_ldflags(platform))
495 r += var_set(cname() + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) " + platform_cppflags(platform))
496 r += var_set(cname() + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM) " + platform_ccasflags(platform))
497 # r += var_set(cname() + "_DEPENDENCIES", platform_dependencies(platform) + " " + platform_ldadd(platform))
504 def data(platform):
505 r = gvar_add("EXTRA_DIST", platform_sources(platform))
507 r += var_add(installdir() + "_DATA", platform_sources(platform))
510 def script(platform):
519 r += rule("[+ name +]", platform_sources(platform) + " $(top_builddir)/config.status", """
525 r += gvar_add("dist_noinst_DATA", platform_sources(platform))