Dave Hylands | c89c681 | 2014-01-24 01:05:30 -0800 | [diff] [blame] | 1 | ifneq ($(lastword a b),b) |
| 2 | $(error These Makefiles require make 3.81 or newer) |
| 3 | endif |
| 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 | |
| 12 | THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST)) |
| 13 | TOP := $(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 | |
| 19 | ifeq ("$(origin V)", "command line") |
| 20 | BUILD_VERBOSE=$(V) |
| 21 | endif |
| 22 | ifndef BUILD_VERBOSE |
| 23 | BUILD_VERBOSE = 0 |
| 24 | endif |
| 25 | ifeq ($(BUILD_VERBOSE),0) |
| 26 | Q = @ |
| 27 | else |
| 28 | Q = |
| 29 | endif |
| 30 | # Since this is a new feature, advertise it |
| 31 | ifeq ($(BUILD_VERBOSE),0) |
| 32 | $(info Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.) |
| 33 | endif |
| 34 | |
| 35 | # default settings; can be overriden in main Makefile |
| 36 | |
| 37 | PY_SRC ?= $(TOP)/py |
| 38 | BUILD ?= build |
| 39 | |
| 40 | RM = rm |
| 41 | ECHO = @echo |
| 42 | |
| 43 | AS = $(CROSS_COMPILE)as |
| 44 | CC = $(CROSS_COMPILE)gcc |
| 45 | LD = $(CROSS_COMPILE)ld |
| 46 | OBJCOPY = $(CROSS_COMPILE)objcopy |
| 47 | SIZE = $(CROSS_COMPILE)size |
| 48 | |
| 49 | all: |
| 50 | .PHONY: all |
| 51 | |
| 52 | MKENV_INCLUDED = 1 |