2018-12-10 17:03:52 +01:00
|
|
|
GCC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -I ../include -m32 -fno-pie -no-pie -c -o
|
2018-12-27 14:24:47 +01:00
|
|
|
GCCREAL=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -I ../include -m16 -fomit-frame-pointer -fno-pic -mno-mmx -mno-sse -mstack-alignment=4 -mno-80387 -mno-fp-ret-in-387 -c -o
|
2018-12-15 19:13:26 +01:00
|
|
|
ASM=gcc -nostdinc -ffreestanding -fno-builtin -m32 -c -fno-pie -no-pie
|
2018-12-27 14:24:47 +01:00
|
|
|
LINK=ld -m elf_i386 -n -o
|
2018-12-12 12:31:30 +01:00
|
|
|
CONVERT=dos2unix
|
|
|
|
INDENT=indent -nhnl -l75 -ppi3 -ts8 -bls -nbc -di8 -nbad -nbap -nsob -i8 -bl -bli0 -ncdw -nce -cli8 -cbi0 -npcs -cs -saf -sai -saw -nprs -lp -npsl
|
|
|
|
REMOVE=rm -f
|
|
|
|
CHANGEPERM=chmod 644
|
2007-04-02 14:52:01 +02:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
all: system.sys
|
|
|
|
|
|
|
|
system.sys: setup.bin system.bin
|
|
|
|
tools/build setup.bin system.bin zoffset.h system.sys
|
2007-04-02 14:52:01 +02:00
|
|
|
sync
|
|
|
|
|
2018-12-12 12:37:19 +01:00
|
|
|
togit: clean indent
|
2018-12-12 12:31:30 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
system.bin: system.o ../lib/libs.o
|
|
|
|
$(LINK) -T linker.lds multiboot.o system.o ../lib/libs.o
|
2018-09-27 17:12:12 +02:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
setup.bin: setup.o
|
|
|
|
$(LINK) $@ $^
|
|
|
|
$(OBJDUMP)
|
2018-09-27 17:12:12 +02:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
setup.o:
|
|
|
|
$(GCCREAL) $@ $^
|
|
|
|
|
|
|
|
system.o:
|
|
|
|
$(GCC) $@ $^
|
2007-04-02 14:52:01 +02:00
|
|
|
|
|
|
|
clean:
|
2018-12-12 12:31:30 +01:00
|
|
|
$(REMOVE) *.o
|
|
|
|
$(REMOVE) *.out
|
|
|
|
$(REMOVE) *.bin
|
|
|
|
$(REMOVE) *.sys
|
|
|
|
$(REMOVE) *.s
|
|
|
|
$(REMOVE) *.c~
|
|
|
|
sync
|
2007-04-02 14:52:01 +02:00
|
|
|
|
2018-12-12 12:31:30 +01:00
|
|
|
indent:
|
|
|
|
$(CHANGEPERM) *.c
|
|
|
|
$(CONVERT) *.c
|
|
|
|
$(INDENT) *.c
|
2018-12-12 12:37:19 +01:00
|
|
|
$(REMOVE) *.c~
|
2018-12-12 12:31:30 +01:00
|
|
|
sync
|