2014-01-24 09:05:30 +00:00
|
|
|
ifneq ($(lastword a b),b)
|
|
|
|
$(error These Makefiles require make 3.81 or newer)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Set TOP to be the path to get from the current directory (where make was
|
|
|
|
# invoked) to the top of the tree. $(lastword $(MAKEFILE_LIST)) returns
|
|
|
|
# the name of this makefile relative to where make was invoked.
|
|
|
|
#
|
|
|
|
# We assume that this file is in the py directory so we use $(dir ) twice
|
|
|
|
# to get to the top of the tree.
|
|
|
|
|
|
|
|
THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
|
|
|
TOP := $(patsubst %/py/mkenv.mk,%,$(THIS_MAKEFILE))
|
|
|
|
|
|
|
|
# Turn on increased build verbosity by defining BUILD_VERBOSE in your main
|
|
|
|
# Makefile or in your environment. You can also use V=1 on the make command
|
|
|
|
# line.
|
|
|
|
|
|
|
|
ifeq ("$(origin V)", "command line")
|
|
|
|
BUILD_VERBOSE=$(V)
|
|
|
|
endif
|
|
|
|
ifndef BUILD_VERBOSE
|
2021-05-12 01:18:16 +00:00
|
|
|
$(info Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.)
|
2014-01-24 09:05:30 +00:00
|
|
|
BUILD_VERBOSE = 0
|
|
|
|
endif
|
|
|
|
ifeq ($(BUILD_VERBOSE),0)
|
|
|
|
Q = @
|
|
|
|
else
|
|
|
|
Q =
|
|
|
|
endif
|
|
|
|
|
2017-05-29 07:08:14 +00:00
|
|
|
# default settings; can be overridden in main Makefile
|
2014-01-24 09:05:30 +00:00
|
|
|
|
|
|
|
PY_SRC ?= $(TOP)/py
|
|
|
|
BUILD ?= build
|
|
|
|
|
|
|
|
RM = rm
|
|
|
|
ECHO = @echo
|
2014-04-07 00:35:45 +00:00
|
|
|
CP = cp
|
|
|
|
MKDIR = mkdir
|
|
|
|
SED = sed
|
2019-05-20 16:47:23 +00:00
|
|
|
CAT = cat
|
2019-05-21 09:35:09 +00:00
|
|
|
TOUCH = touch
|
2019-01-31 07:22:12 +00:00
|
|
|
PYTHON = python3
|
2014-06-07 12:14:45 +00:00
|
|
|
|
|
|
|
AS = $(CROSS_COMPILE)as
|
|
|
|
CC = $(CROSS_COMPILE)gcc
|
2015-08-29 18:13:07 +00:00
|
|
|
CXX = $(CROSS_COMPILE)g++
|
2019-09-05 12:59:06 +00:00
|
|
|
GDB = $(CROSS_COMPILE)gdb
|
2014-06-07 12:14:45 +00:00
|
|
|
LD = $(CROSS_COMPILE)ld
|
|
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
|
|
SIZE = $(CROSS_COMPILE)size
|
|
|
|
STRIP = $(CROSS_COMPILE)strip
|
2015-10-12 11:42:05 +00:00
|
|
|
AR = $(CROSS_COMPILE)ar
|
2014-01-24 09:05:30 +00:00
|
|
|
|
2019-09-09 14:49:02 +00:00
|
|
|
MAKE_MANIFEST = $(PYTHON) $(TOP)/tools/makemanifest.py
|
2017-10-31 16:19:12 +00:00
|
|
|
MAKE_FROZEN = $(PYTHON) $(TOP)/tools/make-frozen.py
|
|
|
|
MPY_TOOL = $(PYTHON) $(TOP)/tools/mpy-tool.py
|
2016-09-17 17:57:43 +00:00
|
|
|
|
2022-07-08 05:00:33 +00:00
|
|
|
MPY_LIB_SUBMODULE_DIR = $(TOP)/lib/micropython-lib
|
|
|
|
MPY_LIB_DIR = $(MPY_LIB_SUBMODULE_DIR)
|
2019-10-16 04:12:39 +00:00
|
|
|
|
2021-08-03 12:30:15 +00:00
|
|
|
ifeq ($(MICROPY_MPYCROSS),)
|
2022-08-02 21:48:41 +00:00
|
|
|
MICROPY_MPYCROSS = $(TOP)/mpy-cross/build/mpy-cross
|
2021-08-03 12:30:15 +00:00
|
|
|
MICROPY_MPYCROSS_DEPENDENCY = $(MICROPY_MPYCROSS)
|
|
|
|
endif
|
|
|
|
|
2014-01-24 09:05:30 +00:00
|
|
|
all:
|
|
|
|
.PHONY: all
|
|
|
|
|
2014-04-16 15:09:59 +00:00
|
|
|
.DELETE_ON_ERROR:
|
|
|
|
|
2014-01-24 09:05:30 +00:00
|
|
|
MKENV_INCLUDED = 1
|