mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +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))))
|
||||
TOOLCHAIN_DIR ?= $(TOP_DIR)vendor/libopencm3
|
||||
|
||||
PYTHON ?= python
|
||||
|
||||
ifeq ($(EMULATOR),1)
|
||||
CC = gcc
|
||||
LD = gcc
|
||||
|
@ -110,13 +110,13 @@ bootloader.o: ../fastflash/bootloader.bin
|
||||
$< $@
|
||||
|
||||
coins_count.h: coins-gen.py coins.json
|
||||
./$< count > $@
|
||||
$(PYTHON) $< count > $@
|
||||
|
||||
coins_array.h: coins-gen.py coins.json
|
||||
./$< array > $@
|
||||
$(PYTHON) $< array > $@
|
||||
|
||||
nem_mosaics.c nem_mosaics.h: nem_mosaics.py nem_mosaics.json
|
||||
./$<
|
||||
$(PYTHON) $<
|
||||
|
||||
clean::
|
||||
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"))
|
||||
import types_pb2 as types
|
||||
|
||||
try:
|
||||
basestring
|
||||
except NameError:
|
||||
basestring = (str, bytes)
|
||||
|
||||
HEADER_TEMPLATE = """
|
||||
// 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
|
||||
|
||||
PYTHON ?= python
|
||||
|
||||
%.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
|
||||
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=.
|
||||
|
||||
messages_map.h: messages_map.py messages_pb2.py types_pb2.py
|
||||
./$< > $@
|
||||
$(PYTHON) $< > $@
|
||||
|
||||
clean:
|
||||
rm -f *.pb *.o *.d *.pb.c *.pb.h *_pb2.py messages_map.h
|
||||
|
Loading…
Reference in New Issue
Block a user