This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
my_makefile [2017/03/03 13:55] admin |
my_makefile [2017/03/03 13:57] (current) admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====My makefile===== | =====My makefile===== | ||
| The makefile builds a complete project from scratch up to and including building a format ready for usage. | The makefile builds a complete project from scratch up to and including building a format ready for usage. | ||
| - | <code> | + | <file> |
| CC=i686-elf-gcc | CC=i686-elf-gcc | ||
| AS=i686-elf-as | AS=i686-elf-as | ||
| Line 32: | Line 32: | ||
| rm -f kernel.iso | rm -f kernel.iso | ||
| genisoimage -r -b isodir/boot/hd.img -c isodir/boot/boot.catalog -hard-disk-boot -o kernel.iso . | genisoimage -r -b isodir/boot/hd.img -c isodir/boot/boot.catalog -hard-disk-boot -o kernel.iso . | ||
| - | </code> | + | </file> |
| You will notice ''i686-elf-gcc'' and ''i686-elf-as'' referenced at the top of the file. These are the cross compiler and the cross assembler respectively.\\ | You will notice ''i686-elf-gcc'' and ''i686-elf-as'' referenced at the top of the file. These are the cross compiler and the cross assembler respectively.\\ | ||
| We do not need a cross assembler for NASM, as the output we generate is pure x86 code. The reason we use NASM and not our own cross assembler is because NASM have better output options for those kinds of files.\\ | We do not need a cross assembler for NASM, as the output we generate is pure x86 code. The reason we use NASM and not our own cross assembler is because NASM have better output options for those kinds of files.\\ | ||