|
@@ -15,11 +15,15 @@ srun: build
|
|
|
nativerun: build
|
|
|
$(QEMU_BIN) $(QEMU_ARGS) -display none -serial mon:stdio
|
|
|
|
|
|
-.PHONY: configure
|
|
|
-configure:
|
|
|
+.PHONY: prepare
|
|
|
+prepare:
|
|
|
cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug $(CROSS_COMPILE)
|
|
|
cp build/compile_commands.json .
|
|
|
|
|
|
+.PHONY: reprepare
|
|
|
+reprepare: clean prepare
|
|
|
+ true
|
|
|
+
|
|
|
.PHONY: build
|
|
|
build:
|
|
|
cmake --build build -j 6 --target boot.img
|
|
@@ -29,6 +33,10 @@ clean:
|
|
|
-rm -rf build
|
|
|
-rm compile_commands.json
|
|
|
|
|
|
+.PHONY: clean-all
|
|
|
+clean-all: clean
|
|
|
+ -rm Makefile
|
|
|
+
|
|
|
.PHONY: debug
|
|
|
debug:
|
|
|
$(GDB_BIN) --symbols=build/kernel.out --init-eval-command 'set pagination off' --init-eval-command 'target remote:1234' --eval-command 'hbr kernel_main' --eval-command 'c'
|