activated LED support
[openadk.git] / rules.mk
blob145ca7a6248b985b20dde2bd432fc883d7f3c272
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(TOPDIR)/prereq.mk
5 -include $(TOPDIR)/.config
7 ifeq ($(VERBOSE),1)
8 START_TRACE:= :
9 END_TRACE:= :
10 TRACE:= :
11 CMD_TRACE:= :
12 PKG_TRACE:= :
13 MAKE_TRACE:=
14 EXTRA_MAKEFLAGS:=
15 SET_DASHX:= set -x
16 else
17 START_TRACE:= echo -n "---> "
18 END_TRACE:= echo
19 TRACE:= echo "---> "
20 CMD_TRACE:= echo -n
21 PKG_TRACE:= echo "------> "
22 EXTRA_MAKEFLAGS:= -s
23 MAKE_TRACE:= >/dev/null 2>&1 || { echo "Build failed. Please re-run make with v to see what's going on"; false; }
24 SET_DASHX:= :
25 endif
27 # Strip off the annoying quoting
28 ADK_TARGET:= $(strip $(subst ",, $(ADK_TARGET)))
29 ADK_LIBC:= $(strip $(subst ",, $(ADK_LIBC)))
30 ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
31 ADK_COMPRESSION_TOOL:= $(strip $(subst ",, $(ADK_COMPRESSION_TOOL)))
33 ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
34 include $(TOPDIR)/target/$(ADK_TARGET)/target.mk
35 endif
37 include $(TOPDIR)/mk/vars.mk
39 export BASH HOSTCC HOSTCFLAGS MAKE LANGUAGE LC_ALL OStype PATH
41 HOSTCPPFLAGS?=
42 HOSTLDFLAGS?=
43 TARGET_CFLAGS:= $(strip -fno-ident ${TARGET_CFLAGS})
44 TARGET_CC:= $(strip ${TARGET_CC})
45 TARGET_CXX:= $(strip ${TARGET_CXX})
47 ifneq (${show},)
48 .DEFAULT_GOAL:= show
49 show:
50 @$(info ${${show}})
51 else ifneq (${dump},)
52 __shquote= '$(subst ','\'',$(1))'
53 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
54 .DEFAULT_GOAL:= show
55 show:
56 @$(foreach _s,${dump},$(call __dumpvar,${_s});)
57 endif