blob: ed4e22096dd9b99808eb26f443c2459305e26978 [file] [log] [blame]
Dave Hylandsc89c6812014-01-24 01:05:30 -08001ifneq ($(lastword a b),b)
2$(error These Makefiles require make 3.81 or newer)
3endif
4
5# Set TOP to be the path to get from the current directory (where make was
6# invoked) to the top of the tree. $(lastword $(MAKEFILE_LIST)) returns
7# the name of this makefile relative to where make was invoked.
8#
9# We assume that this file is in the py directory so we use $(dir ) twice
10# to get to the top of the tree.
11
12THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
13TOP := $(patsubst %/py/mkenv.mk,%,$(THIS_MAKEFILE))
14
15# Turn on increased build verbosity by defining BUILD_VERBOSE in your main
16# Makefile or in your environment. You can also use V=1 on the make command
17# line.
18
19ifeq ("$(origin V)", "command line")
20BUILD_VERBOSE=$(V)
21endif
22ifndef BUILD_VERBOSE
23BUILD_VERBOSE = 0
24endif
25ifeq ($(BUILD_VERBOSE),0)
26Q = @
27else
28Q =
29endif
30# Since this is a new feature, advertise it
31ifeq ($(BUILD_VERBOSE),0)
32$(info Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.)
33endif
34
35# default settings; can be overriden in main Makefile
36
37PY_SRC ?= $(TOP)/py
38BUILD ?= build
39
40RM = rm
41ECHO = @echo
42
43AS = $(CROSS_COMPILE)as
44CC = $(CROSS_COMPILE)gcc
45LD = $(CROSS_COMPILE)ld
46OBJCOPY = $(CROSS_COMPILE)objcopy
47SIZE = $(CROSS_COMPILE)size
48
49all:
50.PHONY: all
51
52MKENV_INCLUDED = 1