2007-04-02 14:52:01 +02:00
|
|
|
FREEC=gcc -O2 -nostdinc -ffreestanding -fno-builtin -fomit-frame-pointer -Wall -I ../Include -c -o
|
2007-04-02 15:26:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
LINK=ld -Ttext 0x100000 -e __main -o
|
2007-04-02 14:52:01 +02:00
|
|
|
|
|
|
|
all: system.sys
|
|
|
|
sync
|
|
|
|
|
|
|
|
system.sys:
|
|
|
|
nasm -f bin -o loader.bin loader.asm
|
|
|
|
nasm -f elf -o system.o system.asm
|
|
|
|
|
|
|
|
$(FREEC) systemc.o system.c
|
2007-04-02 15:26:29 +02:00
|
|
|
$(LINK) system.out systemc.o system.o ../lib/libs.o
|
|
|
|
objcopy -O binary system.out system.bin
|
2007-04-02 14:52:01 +02:00
|
|
|
cat loader.bin>system.sys
|
|
|
|
cat system.bin>>system.sys
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
2007-04-02 15:26:29 +02:00
|
|
|
rm -f *.out
|
2007-04-02 14:52:01 +02:00
|
|
|
rm -f *.bin
|
|
|
|
rm -f *.sys
|
|
|
|
|
|
|
|
|