Updated makefile to create the disk_images directory if it doesn't exist
This commit is contained in:
4
Makefile
4
Makefile
@@ -7,12 +7,14 @@ DATA_DIR=data
|
||||
# CD image
|
||||
cdrom: $(BUILD_DIR)/crawos.iso
|
||||
$(BUILD_DIR)/crawos.iso: floppy_image
|
||||
mkdir -p disk_images
|
||||
mkisofs -quiet -V 'CRAWOS' -input-charset iso8859-1 -o disk_images/crawos.iso -b crawos.img disk_images/
|
||||
|
||||
# Floppy image
|
||||
# Fat12
|
||||
floppy_image: $(BUILD_DIR)/crawos.img
|
||||
$(BUILD_DIR)/crawos.img: bootloader kernel
|
||||
mkdir -p disk_images
|
||||
dd if=/dev/zero of=$(BUILD_DIR)/crawos.img bs=512 count=2880 # Use dd to make a disk image
|
||||
mkfs.fat -F 12 -n "CRAWOS" $(BUILD_DIR)/crawos.img # Format the disk image with fat12
|
||||
dd if=$(BUILD_DIR)/boot.bin of=$(BUILD_DIR)/crawos.img conv=notrunc # Put boot.bin inside the disk image
|
||||
@@ -23,11 +25,13 @@ $(BUILD_DIR)/crawos.img: bootloader kernel
|
||||
# Bootloader
|
||||
bootloader: $(BUILD_DIR)/boot.bin
|
||||
$(BUILD_DIR)/boot.bin:
|
||||
mkdir -p disk_images
|
||||
$(ASM) $(SRC_DIR)/bootload/boot.asm -f bin -o $ $(BUILD_DIR)/boot.bin
|
||||
|
||||
# Kernel
|
||||
kernel: $(BUILD_DIR)/kernel.bin
|
||||
$(BUILD_DIR)/kernel.bin:
|
||||
mkdir -p disk_images
|
||||
$(ASM) $(SRC_DIR)/kernel/kernel.asm -f bin -o $ $(BUILD_DIR)/kernel.bin
|
||||
|
||||
# Clean
|
||||
|
||||
Reference in New Issue
Block a user