-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
57 lines (44 loc) · 928 Bytes
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.NOTPARALLEL:
CPU ?= 24Kf
SYS ?= malta
BIOS ?= bios/bios
include boards.mk
ifeq ($(BIG), 1)
QEMU ?= qemu-system-mips
ENDIAN = BIG
else
QEMU ?= qemu-system-mipsel
ENDIAN = LITTLE
endif
ifeq ($(KERNEL), 1)
IMAGE ?= -kernel $(BIOS).elf
else
IMAGE ?= -bios $(BIOS).bin
endif
export
.PHONY: gdb emu monitor bios
emu: $(ENDIAN) bios
$(QEMU) $(IMAGE) -cpu $(CPU) -monitor null -m 16M $(DEV) \
-gdb tcp::51234 -M $(SYS)
stty sane
gdb: $(ENDIAN) bios
$(QEMU) $(IMAGE) -cpu $(CPU) -monitor null -m 16M $(DEV) \
-gdb tcp::51234 -M $(SYS) -S
stty sane
monitor: $(ENDIAN) bios
$(QEMU) $(IMAGE) -cpu $(CPU) -monitor stdio -m 16M $(DEV) \
-gdb tcp::51234 -M $(SYS)
stty sane
$(ENDIAN):
make clean
touch $(ENDIAN)
bios:
$(MAKE) -C bios
vhdl sim:
$(MAKE) -C vhdl
.PHONY: clean
clean:
$(MAKE) -C bios clean
rm -f BIG LITTLE
# vi: set shiftwidth=4 tabstop=4 noexpandtab:
# :indentSize=4:tabSize=4:noTabs=false: