build: usage a nouveau de objcopy pour la génération de binaire pur
This commit is contained in:
parent
b0441884e2
commit
7705c7c894
|
@ -1,20 +1,27 @@
|
|||
FREEC=gcc -O2 -nostdinc -ffreestanding -fno-builtin -fomit-frame-pointer -Wall -I ../Include -c -o
|
||||
LINK=ld -N -Ttext 0x100000 -e main -o
|
||||
|
||||
|
||||
LINK=ld -Ttext 0x100000 -e __main -o
|
||||
|
||||
all: system.sys
|
||||
sync
|
||||
|
||||
copy:
|
||||
(cp system.sys /cygdrive/a)
|
||||
|
||||
system.sys:
|
||||
nasm -f bin -o loader.bin loader.asm
|
||||
nasm -f elf -o system.o system.asm
|
||||
|
||||
$(FREEC) systemc.o system.c
|
||||
$(LINK) system.bin systemc.o system.o ../lib/libs.o --oformat binary
|
||||
$(LINK) system.out systemc.o system.o ../lib/libs.o
|
||||
objcopy -O binary system.out system.bin
|
||||
cat loader.bin>system.sys
|
||||
cat system.bin>>system.sys
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f *.out
|
||||
rm -f *.bin
|
||||
rm -f *.sys
|
||||
|
||||
|
|
Loading…
Reference in New Issue