aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: b0d55304c8f41f30b35a6d3a550d9ae9c096a2a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

QEMU=qemu-system-x86_64

all:
    bam

rel:
    bam cdrom.rel.iso

clean:
    bam -c

analyze:
    scan-build -V bam

reanalyze: clean analyze

CHKFLAGS=--enable=warning,performance,information,style --suppress=portability -I src/common/include -j4 --platform=unix32
cppcheck:
    cppcheck $(CHKFLAGS) src/common 2>&1 >/dev/null | tee build/cppcheck.log
    cppcheck $(CHKFLAGS) -I src/kernel/include src/kernel 2>&1 >/dev/null | tee -a build/cppcheck.log
    cppcheck $(CHKFLAGS) -I src/lib/include src/lib src/sysbin 2>&1 >/dev/null | tee -a build/cppcheck.log

rebuild: clean all

mrproper: clean

run_tests:
    rm build/dev/tests/*.log build/dev/tests/*.log.err || true
    bam test.dev

run_qemu: all
    $(QEMU) -cdrom cdrom.dev.iso -serial stdio -m 12 </dev/null

run_qemu_rel: rel
    $(QEMU) -cdrom cdrom.rel.iso -serial stdio -m 12 </dev/null

run_qemu_debug: all
    $(QEMU) -cdrom cdrom.dev.iso -serial stdio -m 12 -s -S </dev/null & \
    (sleep 0.1; gdb src/kernel/kernel.bin -x gdb_cmd)

run_bochs_debug: all
    bochs -f bochs_debug.cfg -q