mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-05 22:32:33 +00:00
Makefile: Use $PYTHON
This commit is contained in:
parent
7aadc1edda
commit
fd57b89902
@ -1,6 +1,8 @@
|
|||||||
TOP_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
TOP_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
TOOLCHAIN_DIR ?= $(TOP_DIR)vendor/libopencm3
|
TOOLCHAIN_DIR ?= $(TOP_DIR)vendor/libopencm3
|
||||||
|
|
||||||
|
PYTHON ?= python
|
||||||
|
|
||||||
ifeq ($(EMULATOR),1)
|
ifeq ($(EMULATOR),1)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LD = gcc
|
LD = gcc
|
||||||
|
@ -110,13 +110,13 @@ bootloader.o: ../fastflash/bootloader.bin
|
|||||||
$< $@
|
$< $@
|
||||||
|
|
||||||
coins_count.h: coins-gen.py coins.json
|
coins_count.h: coins-gen.py coins.json
|
||||||
./$< count > $@
|
$(PYTHON) $< count > $@
|
||||||
|
|
||||||
coins_array.h: coins-gen.py coins.json
|
coins_array.h: coins-gen.py coins.json
|
||||||
./$< array > $@
|
$(PYTHON) $< array > $@
|
||||||
|
|
||||||
nem_mosaics.c nem_mosaics.h: nem_mosaics.py nem_mosaics.json
|
nem_mosaics.c nem_mosaics.h: nem_mosaics.py nem_mosaics.json
|
||||||
./$<
|
$(PYTHON) $<
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
rm -f coins_count.h coins_array.h
|
rm -f coins_count.h coins_array.h
|
||||||
|
@ -9,6 +9,11 @@ from itertools import chain
|
|||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "protob"))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "protob"))
|
||||||
import types_pb2 as types
|
import types_pb2 as types
|
||||||
|
|
||||||
|
try:
|
||||||
|
basestring
|
||||||
|
except NameError:
|
||||||
|
basestring = (str, bytes)
|
||||||
|
|
||||||
HEADER_TEMPLATE = """
|
HEADER_TEMPLATE = """
|
||||||
// This file is automatically generated by nem_mosaics.py -- DO NOT EDIT!
|
// This file is automatically generated by nem_mosaics.py -- DO NOT EDIT!
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
all: messages.pb.c types.pb.c messages_map.h
|
all: messages.pb.c types.pb.c messages_map.h
|
||||||
|
|
||||||
|
PYTHON ?= python
|
||||||
|
|
||||||
%.pb.c: %.pb %.options
|
%.pb.c: %.pb %.options
|
||||||
../../vendor/nanopb/generator/nanopb_generator.py $< -L '#include "%s"' -T
|
$(PYTHON) ../../vendor/nanopb/generator/nanopb_generator.py $< -L '#include "%s"' -T
|
||||||
|
|
||||||
%.pb: %.proto
|
%.pb: %.proto
|
||||||
protoc -I/usr/include -I. $< -o $@
|
protoc -I/usr/include -I. $< -o $@
|
||||||
@ -10,7 +12,7 @@ all: messages.pb.c types.pb.c messages_map.h
|
|||||||
protoc -I/usr/include -I. $< --python_out=.
|
protoc -I/usr/include -I. $< --python_out=.
|
||||||
|
|
||||||
messages_map.h: messages_map.py messages_pb2.py types_pb2.py
|
messages_map.h: messages_map.py messages_pb2.py types_pb2.py
|
||||||
./$< > $@
|
$(PYTHON) $< > $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.pb *.o *.d *.pb.c *.pb.h *_pb2.py messages_map.h
|
rm -f *.pb *.o *.d *.pb.c *.pb.h *_pb2.py messages_map.h
|
||||||
|
Loading…
Reference in New Issue
Block a user