os-k/Makefile

49 lines
1.6 KiB
Makefile
Raw Normal View History

#----------------------------------------------------------------------------#
# GNU GPL OS/K #
# #
# Authors: spectral` #
# NeoX #
# #
# Desc: Project Makefile #
#----------------------------------------------------------------------------#
2019-01-02 16:27:12 +01:00
kernel:
2019-01-15 14:18:56 +01:00
cpp ./Makefile.in > build/Makefile.out
2019-01-14 14:31:49 +01:00
python ./build/idttool.py
2019-01-15 14:18:56 +01:00
make kernel -f build/Makefile.out.2
rm build/Makefile.out build/Makefile.out.2
2019-01-02 16:27:12 +01:00
kernel-asm:
2019-01-15 14:18:56 +01:00
cpp -D_TO_ASM ./Makefile.in > build/Makefile.out
2019-01-14 14:31:49 +01:00
python ./build/idttool.py
2019-01-15 14:18:56 +01:00
make kernel -f build/Makefile.out.2
rm build/Makefile.out build/Makefile.out.2
2019-01-02 16:27:12 +01:00
tests:
2019-01-15 14:18:56 +01:00
cpp -D_TESTS ./Makefile.in > build/Makefile.out
2019-01-14 14:31:49 +01:00
python ./build/idttool.py
2019-01-15 14:18:56 +01:00
make tests -f build/Makefile.out.2
rm build/Makefile.out build/Makefile.out.2
2019-01-14 23:16:26 +01:00
ASM=nasm
ASMFLAGS=
BOOTFLAGS=-f bin
2019-01-16 11:01:18 +01:00
MBRDIR=boot/mbr
LOADERDIR=boot/loader
2019-01-14 23:16:26 +01:00
OBJDIR=build/obj
BINDIR=build/bin
2019-01-16 11:01:18 +01:00
boot.mbr.asm: $(MBRDIR)/mbr.asm $(MBRDIR)/mbr.inc
$(ASM) $(BOOTFLAGS) $(MBRDIR)/mbr.asm -o $(OBJDIR)/boot/mbr.bin
2019-01-14 23:16:26 +01:00
2019-01-16 11:01:18 +01:00
boot.loader.asm: $(LOADERDIR)/loader.asm
$(ASM) $(BOOTFLAGS) $(LOADERDIR)/loader.asm -o $(OBJDIR)/boot/loader.bin
2019-01-14 23:16:26 +01:00
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