diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-03 09:45:33 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-03 09:45:33 +0100 |
commit | 9ee01470ef6424ea448a7eddc00c1f936727b460 (patch) | |
tree | 223986fbbf5d49516b047ecf874469e328922e40 /Makefile | |
parent | a71fe5ed5d709ef0a3caefb744a99c575fb9dd29 (diff) | |
download | jeyzuos-9ee01470ef6424ea448a7eddc00c1f936727b460.zip jeyzuos-9ee01470ef6424ea448a7eddc00c1f936727b460.tar.gz |
improve Makefiles
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -1,27 +1,29 @@ GRUB_DIR=grub KERNEL_DIR=kernel -DST=iso +ISO_DIR=iso ISO=kernel.iso +.PHONY: kernel iso + all: run -run: kernel.elf +run: kernel qemu-system-i386 -kernel $(KERNEL_DIR)/kernel.elf -run-iso: create_iso +run-iso: $(ISO) qemu-system-i386 -hda $(ISO) -create_iso: cpy - grub-mkrescue -o $(ISO) $(DST) +kernel.iso: iso + grub-mkrescue -o $(ISO) $(ISO_DIR) -cpy: kernel.elf - mkdir -p $(DST)/boot/grub - cp $(KERNEL_DIR)/kernel.elf $(DST)/boot/ - cp $(GRUB_DIR)/grub.cfg $(DST)/boot/grub/ +iso: kernel + mkdir -p $(ISO_DIR)/boot/grub + cp $(KERNEL_DIR)/kernel.elf $(ISO_DIR)/boot/ + cp $(GRUB_DIR)/grub.cfg $(ISO_DIR)/boot/grub/ -kernel.elf: +kernel: cd $(KERNEL_DIR); $(MAKE) clean: cd $(KERNEL_DIR); $(MAKE) clean - -rm -fr $(ISO) $(DST) 2>/dev/null + -rm -fr $(ISO) $(ISO_DIR) 2>/dev/null |