Files
xomb-bare-bones/build/dsss.conf
wilkie 04c33b63c3 Added architecture import selection to show how this would be done for LDC and DSSS. This is important (as documentation for these is light) but no actual work for the targets are done.
The archimport.d file is for importing the specific architecture and its interfaces. It can be imported by any module, as I will do for the next commit.

Signed-off-by: The XOmB Overlord <overlord@xomb.net>
2009-05-03 08:40:21 +08:00

72 lines
2.6 KiB
Plaintext

name = xomb
CC = x86_64-pc-elf-gcc
CFLAGS = -nostdlib -nodefaultlibs -g -DUSE_ASSERT -mcmodel=kernel
[*]
buildflags=-dc=ldc-xomb
[../kernel/core/kmain.d]
buildflags=-dc=ldc-xomb -I..
# compile the assembly for the target
prebuild= \
\
\
echo ; \
echo Setting up Architecture Dependence: x86_64; \
echo '--> archimport.d';\
mkdir -p dsss_imports;\
cp ../kernel/arch/x86_64/imports/archimport.d dsss_imports/.;\
echo ; \
echo Compiling Assembly for target: x86_64 ;\
echo '--> boot.S';\
yasm -o dsss_objs/G/kernel.arch.x86_64.boot.boot.o ../kernel/arch/x86_64/boot/boot.s -felf64;\
echo '--> load.S';\
yasm -o dsss_objs/G/kernel.arch.x86_64.load.load.o ../kernel/arch/x86_64/boot/load.s -felf64;\
\
\
echo ; \
echo Compiling Kernel Runtime ; \
echo '--> kernel/runtime/object.d';\
ldc -nodefaultlib -I.. -I../kernel/runtime/. -code-model=kernel -c ../kernel/runtime/object.d -ofdsss_objs/G/kernel.runtime.object.o; \
echo '--> kernel/runtime/invariant.d';\
ldc -nodefaultlib -g -I.. -I../kernel/runtime/. -code-model=kernel -c ../kernel/runtime/invariant.d -ofdsss_objs/G/kernel.runtime.invariant.o; \
echo '--> kernel/runtime/std/typeinfo/*';\
ldc -nodefaultlib -g -I.. -I../kernel/runtime/. -code-model=kernel -c `ls ../kernel/runtime/std/typeinfo/*.d` -oddsss_objs/G/. ;\
echo '--> kernel/runtime/dstubs.d';\
ldc -nodefaultlib -g -I.. -I../kernel/runtime/. -code-model=kernel -c ../kernel/runtime/dstubs.d -ofdsss_objs/G/kernel.runtime.dstubs.o ;\
echo '--> kernel/runtime/util.d';\
ldc -nodefaultlib -g -I.. -I../kernel/runtime/. -code-model=kernel -c ../kernel/runtime/util.d -ofdsss_objs/G/kernel.runtime.util.o ;\
echo '--> kernel/runtime/std/moduleinit.d';\
ldc -nodefaultlib -g -I.. -I../kernel/runtime/. -code-model=kernel -c ../kernel/runtime/std/moduleinit.d -ofdsss_objs/G/kernel.runtime.std.moduleinit.o ;\
\
echo ; \
echo Compiling Kernel Proper ;
# what the target is
target = xomb.iso
# we will need some post build foo to link and create the iso
postbuild = \
\
echo ; \
echo Creating Kernel Executable; \
echo '--> xomb';\
#llvm-ld -native -Xlinker=-nostdlib -Xlinker=-Tlinker.ld -Xlinker="-b elf64-x86-64" `ls dsss_objs/G/*.o` -o iso/boot/xomb ; \
#llvm-ld -nodefaultlib -g -I.. -I../kernel/runtime/. `ls dsss_objs/G/*.o` ;\
ld -nostdlib -nodefaultlibs -b elf64-x86-64 -T ../kernel/arch/x86_64/linker.ld -o iso/boot/xomb `ls dsss_objs/G/*.o`;\
\
echo ;\
echo Creating Kernel Dump; \
echo '--> xomb.dump';\
rm -f xomb.dump && x86_64-pc-elf-objdump -d -S -r iso/boot/xomb > xomb.dump;\
\
echo ;\
echo Compiling ISO; \
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 16 -boot-info-table -input-charset UTF-8 -o xomb.iso ./iso