2018-12-20 18:03:39 +01:00
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
# GNU GPL OS/K #
|
|
|
|
# #
|
|
|
|
# Authors: spectral` #
|
|
|
|
# NeoX #
|
|
|
|
# #
|
|
|
|
# Desc: Project Makefile #
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
|
2019-01-02 16:27:12 +01:00
|
|
|
kernel:
|
|
|
|
cpp ./Makefile.in > Makefile.out
|
2019-01-14 14:31:49 +01:00
|
|
|
python ./build/idttool.py
|
2019-01-02 16:27:12 +01:00
|
|
|
make kernel -f Makefile.out.2
|
|
|
|
rm Makefile.out Makefile.out.2
|
|
|
|
|
|
|
|
kernel-asm:
|
|
|
|
cpp -D_TO_ASM ./Makefile.in > Makefile.out
|
2019-01-14 14:31:49 +01:00
|
|
|
python ./build/idttool.py
|
2019-01-02 16:27:12 +01:00
|
|
|
make kernel -f Makefile.out.2
|
|
|
|
rm Makefile.out Makefile.out.2
|
|
|
|
|
|
|
|
tests:
|
|
|
|
cpp -D_TESTS ./Makefile.in > Makefile.out
|
2019-01-14 14:31:49 +01:00
|
|
|
python ./build/idttool.py
|
2019-01-02 16:27:12 +01:00
|
|
|
make tests -f Makefile.out.2
|
|
|
|
rm Makefile.out Makefile.out.2
|
2018-12-20 18:03:39 +01:00
|
|
|
|
2019-01-14 23:16:26 +01:00
|
|
|
ASM=nasm
|
|
|
|
ASMFLAGS=
|
|
|
|
BOOTFLAGS=-f bin
|
|
|
|
|
|
|
|
BOOTDIR=boot
|
|
|
|
OBJDIR=build/obj
|
|
|
|
BINDIR=build/bin
|
|
|
|
|
|
|
|
boot.mbr.asm: $(BOOTDIR)/mbr.asm $(BOOTDIR)/mbr.inc
|
|
|
|
$(ASM) $(BOOTFLAGS) $(BOOTDIR)/mbr.asm -o $(OBJDIR)/boot/mbr.bin
|
|
|
|
|
|
|
|
boot.loader.asm: $(BOOTDIR)/loader.asm
|
|
|
|
$(ASM) $(BOOTFLAGS) $(BOOTDIR)/loader.asm -o $(OBJDIR)/boot/loader.bin
|
|
|
|
|
|
|
|
bootloader: boot.mbr.asm boot.loader.asm
|
|
|
|
cp $(OBJDIR)/boot/mbr.bin $(BINDIR)/mbr.bin
|
|
|
|
cp $(OBJDIR)/boot/loader.bin $(BINDIR)/loader.bin
|
|
|
|
|
|
|
|
all: bootloader kernel
|
|
|
|
|