diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2017-03-05 21:43:19 +0100 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2017-03-05 21:43:19 +0100 |
commit | d42b629d983de336ddd3c22782caa2791ab78897 (patch) | |
tree | ac3a3052c154ca88803df5754eb6c8459e246b2f /Makefile | |
download | garmos-d42b629d983de336ddd3c22782caa2791ab78897.tar.gz garmos-d42b629d983de336ddd3c22782caa2791ab78897.tar.bz2 |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a1586e1 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +include config.mk + +.PHONY: all clean distclean emulate install + +all: $(kernel) + +clean: + @echo " (RM) iso" + $(QUIET)$(RM) -r iso + @echo " (RM) $(kernel_iso)" + $(QUIET)$(RM) $(kernel_iso) + @echo " (RM) $(objects)" + $(QUIET)$(RM) $(objects) + @echo " (RM) $(dependencies)" + $(QUIET)$(RM) $(dependencies) + +emulate: $(kernel_iso) + @echo " (QEMU) $^" + $(QUIET)$(QEMU) -cdrom $^ + +distclean: clean + @echo " (RM) $(kernel)" + $(QUIET)$(RM) $(kernel) + +install: $(kernel) + @echo " (CP) $^" + $(QUIET)$(CP) $< $(INSTALL_DIR) + +%.o: %.c + @echo " (CC) $@" + $(QUIET)$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ + +%.o: %.s + @echo " (AS) $@" + $(QUIET)$(AS) $(ASFLAGS) $< -o $@ + +$(kernel): $(memmap) $(objects) + @echo " (LD) $@" + $(QUIET) $(LD) $(LDFLAGS) -T $< -o $@ $(objects) + +$(kernel_iso): $(kernel) misc/grub.cfg + mkdir -p iso/boot/grub + cp $^ iso/boot + cp misc/grub.cfg iso/boot/grub + grub-mkrescue --output=$@ iso + +-include $(dependencies) |