Delete Makefile~

This commit is contained in:
Adrien Bourmault 2018-12-21 13:49:22 +01:00 committed by GitHub
parent 6adeb863f0
commit 9c68436582
1 changed files with 0 additions and 109 deletions

View File

@ -1,109 +0,0 @@
#----------------------------------------------------------------------------#
# GNU GPL OS/K #
# #
# Authors: spectral` #
# NeoX #
# #
# Desc: Project Makefile #
#----------------------------------------------------------------------------#
CC_NAME="../toolchains/x86_64-elf-7.3.0-Linux-x86_64/bin/x86_64-elf-gcc"
CWARNS=-Wall -Wextra -Werr
CFLAGS=-nostdlib -ffreestanding -mcmodel=large -mno-red-zone -mno-mmx -mno-sse -mno-sse2
CDEFINES=-DNDEBUG
CINCLUDES=-I./kaleid
CC=$(CC_NAME) $(CWARNS) $(CFLAGS) $(CDEFINES) $(CINCLUDES)
ASM=nasm
ASMFLAGS=
BOOTFLAGS=-f bin
BINDIR=../bin
OBJDIR=../obj
BOOTDIR=boot
COMMDIR=kaleid/common
KERNDIR=kaleid/kernel
SYSTDIR=kaleid/system
all: bootloader
boot.mbr.s: $(BOOTDIR)/mbr.s
$(ASM) $(BOOTFLAGS) $(BOOTDIR)/mbr.s -o $(OBJDIR)/boot/mbr.bin
boot.loader.s: $(BOOTDIR)/loader.s
$(ASM) $(BOOTFLAGS) $(BOOTDIR)/loader.s -o $(OBJDIR)/boot/loader.bin
bootloader: boot.mbr.s boot.loader.s
dd if=/dev/zero of=$(BINDIR)/disk.img bs=1024 count=0 seek=1048576
su -c "mkfs.vfat $(BINDIR)/disk.img -F 32 -r 112 -S 512 -v"
dd if=$(OBJDIR)/boot/mbr.bin of=$(BINDIR)/disk.img count=1
su -c "mkdir /mnt/disk && mount -o loop $(BINDIR)/disk.img /mnt/disk"
cp $(OBJDIR)/boot/loader.bin /mnt/disk/loader.bin
#----------------------------------------------------------------------------#
# TESTING MAKEFILE
pseudo_kern:
$(ASM) $(BOOTFLAGS) $(BOOTDIR)/pseudo_kernel.s -o $(OBJDIR)/boot/pkernel.bin
testing: bootloader pseudo_kern
cat $(BINDIR)/bootloader.bin $(OBJDIR)/boot/pkernel.bin > $(BINDIR)/boot.bin
#----------------------------------------------------------------------------#
# COMMON MAKEFILE
COMM_DEPS=$(COMMDIR)/common.h $(COMMDIR)/assert.h $(COMMDIR)/atomic.h $(COMMDIR)/config.h \
$(COMMDIR)/status.h $(COMMDIR)/string.h $(COMMDIR)/types.h
common.lib.string.c: $(COMMDIR)/lib/string.c $(COMM_DEPS)
$(CC) -c $(COMMDIR)/lib/string.c -o ../obj/$(COMMDIR)/lib/string.o
#----------------------------------------------------------------------------#
# KERNEL MAKEFILE
KERN_DEPS=$(COMM_DEPS)