summaryrefslogtreecommitdiff
path: root/rules.mk
blob: ef645049c52cc0833e51b1b1b2767210e70280e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# $Id$
#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(TOPDIR)/prereq.mk
-include $(TOPDIR)/.config

ifeq ($(VERBOSE),1)
START_TRACE:=		:
END_TRACE:=		:
TRACE:=			:
CMD_TRACE:=		:
PKG_TRACE:=		:
MAKE_TRACE:=
EXTRA_MAKEFLAGS:=
SET_DASHX:=		set -x
else
START_TRACE:=		echo -n "---> "
END_TRACE:=		echo
TRACE:=			echo "---> "
CMD_TRACE:=		echo -n
PKG_TRACE:=		echo "------> "
EXTRA_MAKEFLAGS:=	-s
MAKE_TRACE:=		>/dev/null 2>&1 || { echo "Build failed. Please re-run make with v to see what's going on"; false; }
SET_DASHX:=		:
endif

# Strip off the annoying quoting
DEVICE:=		$(strip $(subst ",, $(ADK_DEVICE)))

ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
include $(TOPDIR)/target/$(DEVICE)/device.mk
endif

include $(TOPDIR)/mk/vars.mk

export BASH HOSTCC HOSTCFLAGS MAKE LANGUAGE LC_ALL OStype PATH

HOSTCPPFLAGS?=
HOSTLDFLAGS?=
TARGET_CFLAGS:=		$(strip -fwrapv -fno-ident ${TARGET_CFLAGS})
TARGET_CC:=		$(strip ${TARGET_CC})
TARGET_CXX:=		$(strip ${TARGET_CXX})

ifneq (${show},)
_show:
	@echo '$($(show))'
endif