1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00
os-k/Makefile
2019-01-15 14:18:56 +01:00

48 lines
1.6 KiB
Makefile

#----------------------------------------------------------------------------#
# GNU GPL OS/K #
# #
# Authors: spectral` #
# NeoX #
# #
# Desc: Project Makefile #
#----------------------------------------------------------------------------#
kernel:
cpp ./Makefile.in > build/Makefile.out
python ./build/idttool.py
make kernel -f build/Makefile.out.2
rm build/Makefile.out build/Makefile.out.2
kernel-asm:
cpp -D_TO_ASM ./Makefile.in > build/Makefile.out
python ./build/idttool.py
make kernel -f build/Makefile.out.2
rm build/Makefile.out build/Makefile.out.2
tests:
cpp -D_TESTS ./Makefile.in > build/Makefile.out
python ./build/idttool.py
make tests -f build/Makefile.out.2
rm build/Makefile.out build/Makefile.out.2
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