-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
122 lines (100 loc) · 3.51 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# ***************************************************************************************
# ***************************************************************************************
#
# Name : Makefile
# Author : Paul Robson ([email protected])
# Date : 20th November 2023
# Reviewed : No
# Purpose : Main firmware makefile, most of the work is done by CMake.
#
# ***************************************************************************************
# ***************************************************************************************
ifeq ($(OS),Windows_NT)
include build_env\common.make
else
include build_env/common.make
endif
# ***************************************************************************************
#
# Remake everything to release state
#
# ***************************************************************************************
all: firmware-deps emulator-deps-nix emulator-deps-win
$(CMAKEDIR) bin
@echo building firmware
$(MAKE) -B -C kernel release
$(MAKE) -B -C basic release
$(MAKE) -B -C firmware release
@echo building emulators
$(MAKE) -B -C emulator release
$(MAKE) -B -C examples release
@echo building release package
$(MAKE) -B -C release
# ***************************************************************************************
#
# Make firmware only
#
# ***************************************************************************************
firmware: firmware-deps
@echo building firmware
$(CMAKEDIR) bin
$(MAKE) -B -C kernel release
$(MAKE) -B -C basic release
$(MAKE) -B -C firmware release
# ***************************************************************************************
#
# Make emulator only
#
# ***************************************************************************************
windows: emulator-deps-nix emulator-deps-win
@echo building windows emulator
$(CMAKEDIR) bin
$(MAKE) -B -C kernel
$(MAKE) -B -C basic release
$(MAKE) -B -C emulator clean
$(MAKE) -B -C emulator ewindows
$(MAKE) -B -C examples release
linux: emulator-deps-nix
@echo building nix emulator
$(CMAKEDIR) bin
$(MAKE) -B -C kernel
$(MAKE) -B -C basic release
$(MAKE) -B -C emulator clean
$(MAKE) -B -C emulator elinux
$(MAKE) -B -C examples release
macos: emulator-deps-nix
@echo building macos emulator
make -B -C emulator emacos
make -B -C examples release
# ***************************************************************************************
#
# Verify that dependencies are installed
#
# ***************************************************************************************
firmware-deps:
@echo checking for firmware dependencies:
@cmake --version
@g++ --version
@arm-none-eabi-g++ --version
@# NOTE: this is not accounting for 'arm-none-eabi-newlib'
emulator-deps-win:
@x86_64-w64-mingw32-g++ --version
emulator-deps-nix:
@echo checking for emulator dependencies:
@g++ --version
@64tass --version
@sdl2-config --version
@zip --version
@python3 --version
@python3 -c 'from importlib.metadata import version ; pkg="gitpython" ; print("python-%s: %s" % (pkg , version(pkg)))'
@python3 -c 'from importlib.metadata import version ; pkg="pillow" ; print("python-%s: %s" % (pkg , version(pkg)))'
# ***************************************************************************************
#
# Clean everything
#
# ***************************************************************************************
clean:
$(MAKE) -B -C kernel clean
$(MAKE) -B -C basic clean
$(MAKE) -B -C emulator clean
$(MAKE) -B -C firmware clean