summaryrefslogtreecommitdiffstats
path: root/kernel/include/Kbuild
blob: bab1145bc7a7d620c579e60abef2b6652603df78 (plain)
1
2
# Top-level Makefile calls into asm-$(ARCH)
# List only non-arch directories below
lor: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<build condition="SPARC32">

 <dictionary name="openbios-sparc32" init="openbios">
  <object source="tree.fs" target="forth"/>
  <object source="init.fs" target="forth"/>
  <object source="QEMU,tcx.bin" target="fcode" condition="DRIVER_SBUS"/>
  <object source="QEMU,cgthree.bin" target="fcode" condition="DRIVER_SBUS"/>
 </dictionary>

 <library name="sparc32" type="static" target="target">
  <object source="openbios.c"/>
  <object source="console.c"/>
  <object source="lib.c"/>
  <object source="boot.c"/>
  <object source="context.c"/>
  <object source="switch.S"/>
  <object source="udiv.S"/>
  <object source="linux_load.c"/>
  <object source="sys_info.c"/>
  <object source="ofmem_sparc32.c"/>
  <object source="romvec.c"/>
  <object source="call-romvec.S"/>
  <object source="entry.S"/>
  <object source="vectors.S"/>
 </library>

 <executable name="openbios-plain.elf" target="target" condition="IMAGE_ELF">
  <rule>
	$(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip --whole-archive $^,"  LINK  $(TARGET_DIR)$@")
	$(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms,"  GEN   $(TARGET_DIR)$@.syms")
	$(call quiet-command,$(STRIP) $@.nostrip -o $@,"  STRIP $(TARGET_DIR)$@")</rule>
  <object source="plainboot.c"/>
  <external-object source="libsparc32.a"/>
  <external-object source="libbootstrap.a"/>
  <external-object source="libopenbios.a"/>
  <external-object source="libpackages.a"/>
  <external-object source="libdrivers.a"/>
  <external-object source="libfs.a"/>
  <external-object source="liblibc.a"/>
  <external-object source="libgcc.a"/>
 </executable>

 <!-- HACK ALERT -->

 <executable name="target/include/static-dict.h" target="target" condition="IMAGE_ELF_EMBEDDED">
  <rule><![CDATA[
	$(call quiet-command,$(ODIR)/forthstrap -x -D $@ -d $< </dev/null, "  GEN   $(TARGET_DIR)$@")]]></rule>
  <external-object source="openbios-sparc32.dict"/>
 </executable>

 <executable name="target/arch/sparc32/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED">
  <rule><![CDATA[ $(SRCDIR)/arch/sparc32/builtin.c $(ODIR)/target/include/static-dict.h
	$(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc32/builtin.c, "  CC    $(TARGET_DIR)$@")]]></rule>
 </executable>

 <!-- END OF HACK ALERT -->

 <executable name="openbios-builtin.elf" target="target" condition="IMAGE_ELF_EMBEDDED">
  <rule>
	$(call quiet-command,$(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip --whole-archive $^,"  LINK  $(TARGET_DIR)$@")
	$(call quiet-command,$(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms,"  GEN   $(TARGET_DIR)$@.syms")
	$(call quiet-command,$(STRIP) $@.nostrip -o $@,"  STRIP $(TARGET_DIR)$@")</rule>
  <external-object source="target/arch/sparc32/builtin.o"/>
  <external-object source="libsparc32.a"/>
  <external-object source="libbootstrap.a"/>
  <external-object source="libopenbios.a"/>
  <external-object source="libpackages.a"/>
  <external-object source="libdrivers.a"/>
  <external-object source="libfs.a"/>
  <external-object source="liblibc.a"/>
  <external-object source="libgcc.a"/>
 </executable>

</build>