Skip to content

Commit b69e91b

Browse files
misc(makefile): cleanup
Signed-off-by: Anhad Singh <[email protected]>
1 parent ada93a2 commit b69e91b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ USERLAND_TARGET := builds/userland/target/init
2626

2727
.PHONY: clean
2828
clean:
29-
rm -rf src/target
29+
rm -rf $(SOURCE_DIR)/target
3030

3131
.PHONY: check
3232
check:
33-
cd src && cargo check
33+
cd $(SOURCE_DIR) && cargo check
3434

3535
$(KERNEL_TARGET): $(shell find $(SOURCE_DIR) -type f -not -path '$(SOURCE_DIR)/target/*')
36-
cd src && cargo build --package aero_kernel --profile $(profile)
37-
./build-support/mkiso.sh
36+
cd $(SOURCE_DIR) && cargo build --package aero_kernel --profile $(profile)
37+
./build-support/mkiso.sh $(KERNEL_TARGET)
3838

3939
$(USERLAND_TARGET): $(shell find $(USERLAND_DIR) -type f -not -path '$(USERLAND_DIR)/target/*')
4040
./target/jinx rebuild userland
@@ -53,9 +53,13 @@ QEMU_PATH ?= $(shell dirname $(shell which qemu-system-x86_64))
5353
qemu: $(KERNEL_TARGET) $(USERLAND_TARGET)
5454
${QEMU_PATH}/qemu-system-x86_64 -cdrom target/aero.iso -m 8G -serial stdio --boot d -s -enable-kvm -cpu host,+vmx -drive file=target/disk.img,if=none,id=NVME1,format=raw -device nvme,drive=NVME1,serial=nvme
5555

56+
# "qemu_perf" options:
57+
# delay (default: 30) - the amount of microseconds between each sample.
58+
delay ?= 30
59+
5660
.PHONY: qemu_perf
5761
qemu_perf: $(KERNEL_TARGET) $(USERLAND_TARGET)
58-
${QEMU_PATH}/qemu-system-x86_64 -cdrom target/aero.iso -m 8G -serial stdio --boot d -s -drive file=target/disk.img,if=none,id=NVME1,format=raw -device nvme,drive=NVME1,serial=nvme -plugin './target/kern-profile.so,out=raw-data,delay=25' -d plugin -cpu max
62+
${QEMU_PATH}/qemu-system-x86_64 -cdrom target/aero.iso -m 8G -serial stdio --boot d -s -drive file=target/disk.img,if=none,id=NVME1,format=raw -device nvme,drive=NVME1,serial=nvme -plugin './target/kern-profile.so,out=raw-data,delay=$(delay)' -d plugin -cpu max
5963

6064
.PHONY: qemu_p
6165
qemu_p:

build-support/mkiso.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -ex
55
rm -rf target/iso_root
66
mkdir -pv target/iso_root/boot
77

8-
cp src/target/x86_64-unknown-none/release/aero_kernel target/iso_root/aero
8+
cp $1 target/iso_root/aero
99
cp build-support/limine.cfg src/.cargo/term_background.bmp target/iso_root/
1010

1111
# Install the limine binaries

0 commit comments

Comments
 (0)