diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-02 14:54:17 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-02 14:54:17 +0100 |
commit | 2febca7062c640a379b963d46adf7c356582d92a (patch) | |
tree | b8b1828466ced293a3d63b76393ce7be9e7f3d4f | |
parent | 4c4e1c1920c28872e72faf91877467197a1d4b6a (diff) | |
download | os_skeleton-master.zip os_skeleton-master.tar.gz |
-rw-r--r-- | makefile | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -1,19 +1,25 @@ -SUBDIR=kernel +GRUB_DIR=grub +KERNEL_DIR=kernel +DST=mini_kernel +ISO=mini_kernel.iso all: run +check: + qemu-system-i386 -kernel $(KERNEL_DIR)/kernel.elf + run: create_iso - qemu-system-i386 -hda mini_kernel/mini_kernel.iso + qemu-system-i386 -hda $(ISO) create_iso: cpy - grub-mkrescue -o mini_kernel/mini_kernel.iso mini_kernel + grub-mkrescue -o $(ISO) $(DST) cpy: - cd $(SUBDIR); $(MAKE) run - cp grub/grub.cfg mini_kernel/ - cp kernel/kernel.elf mini_kernel/ - + cd $(KERNEL_DIR); $(MAKE) + mkdir -p $(DST)/boot $(DST)/grub + cp $(KERNEL_DIR)/kernel.elf $(DST)/boot/ + cp $(GRUB_DIR)/grub.cfg $(DST)/grub/ clean: - cd $(SUBDIR); $(MAKE) clean - -rm mini_kernel/*.iso mini_kernel/*.cfg mini_kernel/*.elf 2>/dev/null + cd $(KERNEL_DIR); $(MAKE) clean + -rm -fr $(ISO) $(DST) 2>/dev/null |