-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
66 lines (49 loc) · 1.8 KB
/
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
58
59
60
61
62
63
64
65
66
morfeo_args += --disk0=data/test-fat32.img
morfeo_args += data/foenixmcp-a2560x.hex
musashi_dir = external/Musashi
musashi_objects += $(musashi_dir)/m68kcpu.o
musashi_objects += $(musashi_dir)/m68kdasm.o
musashi_objects += $(musashi_dir)/m68kops.o
musashi_objects += $(musashi_dir)/softfloat/softfloat.o
odin_defs += -collection:emulator=emulator
odin_defs += -collection:lib=lib
build_flags += $(odin_defs) -o:speed
.PHONY: doc a2560x test_w65c02s test_65c816
all: a2560x test_w65c02s test_65c816
help:
@echo "make release - build a2560x-like optimized, faster version"
@echo "make - build and run a2560x-like version"
@echo "make morfeo - build a a2560x emulator"
@echo "make test_w65c02s - build a test suite for W65C02S"
@echo "make test_65c816 - build a test suite for 65C816"
@echo ""
@echo "make clean - clean-up binaries"
@echo "make clean-all - clean-up binaries and object files"
clean:
rm -fv a2560x test_w65c02s test_65c816
clean-all: $(musashi_objects)
rm -fv a2560x test_w65c02s test_65c816
rm -fv $^
rm -fv $(musashi_dir)/m68kconf.h
$(musashi_objects): external/m68kconf.h
cp -vf $? $(musashi_dir)/
$(MAKE) -C $(musashi_dir) clean
$(MAKE) -C $(musashi_dir)
release: $(musashi_objects)
odin build cmd/a2560x -no-bounds-check -disable-assert $(build_flags)
a2560x: $(musashi_objects)
odin build cmd/a2560x $(build_flags)
test_65c816:
odin build cmd/test_65c816 $(build_flags)
test_w65c02s:
odin build cmd/test_w65c02s $(build_flags)
# targets for debug purposes
run: $(musashi_objects)
odin run cmd/a2560x $(build_flags) -- $(morfeo_args)
r1:
odin run cmd/test_w65c02s $(build_flags)
r2:
odin run cmd/test_65c816 $(build_flags)
doc:
# odin doc cmd/test_w65c02s/ $(odin_defs)
odin doc emulator/cpu/ $(odin_defs)