forked from uli/basicengine-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (47 loc) · 1.75 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
all:
@echo 'Run one of the following commands to compile the firmware:'
@echo
@echo -e '"make native"\tBASIC Engine (ESP8266) firmware'
@echo -e '"make net"\tBASIC Engine (ESP8266) firmware with network support'
@echo -e '"make esp32"\tBASIC Engine Shuttle (ESP32) firmware'
@echo -e '"make h3"\tAllwinner H3 Engine BASIC build'
@echo -e '"make hosted"\tPC-hosted Engine BASIC build for debugging'
@echo -e '"make sdl"\tEngine BASIC build with SDL 1.2 backend'
@echo
@echo 'To upload firmware, run "make upload_native" (ESP8266) or'
@echo '"make upload_esp32" (ESP32).'
@echo
@echo 'You can specify a serial port if necessary:'
@echo '"make upload_native SER=/dev/ttyUSB1"'
@echo
@echo 'The build system will try to automatically install required packages'
@echo 'and build suitable toolchains for each target. To this end, it will'
@echo 'download a considerable amount of data. Be sure not to run it on a'
@echo 'slow or metered connection the first time.'
.PHONY: native net esp32 h3 hosted sdl downloads downloads_esp8266 downloads_esp32 downloads_hosted
native: downloads_esp8266
cd ttbasic ; $(MAKE)
net: downloads_esp8266
cd ttbasic ; $(MAKE) elf_net
esp32: downloads_esp32
cd ttbasic ; $(MAKE) esp32
h3:
$(MAKE) -f Makefile.h3
hosted: downloads_hosted
$(MAKE) -f Makefile.hosted
sdl:
$(MAKE) -f Makefile.sdl
downloads:
bash ttbasic/scripts/installpackages.sh
bash ttbasic/scripts/getlibs.sh
downloads_esp8266: downloads
bash ttbasic/scripts/getesp8266.sh
downloads_esp32: downloads
bash ttbasic/scripts/getesp32.sh
downloads_hosted:
bash ttbasic/scripts/installpackages.sh
bash ttbasic/scripts/installpackages_hosted.sh
upload_native: downloads_esp8266
cd ttbasic ; $(MAKE) upload
upload_esp32: downloads_esp32
cd ttbasic ; $(MAKE) upload_esp32