diff options
author | dzwdz | 2021-09-12 22:11:16 +0200 |
---|---|---|
committer | dzwdz | 2021-09-12 22:11:16 +0200 |
commit | 83db2397dbcd05e9c7b4e0968f6a53edff1103d4 (patch) | |
tree | 0d335072891b5a013050a6b125982ea145e0bbd9 /Makefile | |
parent | e03d4e97e2f36254e85d15b1e7a2c03ba3493ca9 (diff) |
slighly clean up the Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -14,9 +14,28 @@ define from_sources $(patsubst src/%.c,out/obj/%.c.o,$(shell find $(1) -type f -name '*.c')) endef -.PHONY: all + +.PHONY: all boot debug lint check clean all: out/boot.iso check +boot: all + qemu-system-i386 -cdrom out/boot.iso $(QFLAGS) -no-shutdown + +debug: all + qemu-system-i386 -cdrom out/boot.iso $(QFLAGS) -s -S & + @sleep 1 + gdb + +lint: + @tools/linter/main.rb + +check: $(shell find src/kernel/ -type f -name *.c) + @echo $^ | xargs -n 1 sparse $(CFLAGS) -Wno-non-pointer-null -Wno-decl + +clean: + rm -rv out/ + + out/boot.iso: out/fs/boot/kernel.bin out/fs/boot/grub/grub.cfg out/fs/boot/init @grub-mkrescue -o $@ out/fs/ > /dev/null 2>&1 @@ -41,22 +60,3 @@ out/obj/%.s.o: src/%.s out/obj/%.c.o: src/%.c @mkdir -p $(@D) @$(CC) $(CFLAGS) -c $^ -o $@ - - -.PHONY: boot debug lint check clean -boot: out/boot.iso - qemu-system-i386 -cdrom $< $(QFLAGS) -no-shutdown - -debug: out/boot.iso - qemu-system-i386 -cdrom $< $(QFLAGS) -s -S & - @sleep 1 - gdb - -lint: - @tools/linter/main.rb - -check: $(shell find src/kernel/ -type f -name *.c) - @echo $^ | xargs -n 1 sparse $(CFLAGS) -Wno-non-pointer-null -Wno-decl - -clean: - rm -rv out/ |