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
17 START_TRACE
:= echo
-n
"---> "
21 PKG_TRACE
:= echo
"------> "
23 MAKE_TRACE
:= >/dev
/null
2>&1 ||
{ echo
"Build failed. Please re-run make with v to see what's going on"; false
; }
27 # Strip off the annoying quoting
28 ADK_TARGET_ARCH
:= $(strip $(subst ",, $(ADK_TARGET_ARCH)))
29 ADK_TARGET_SYSTEM:= $(strip $(subst ",, $(ADK_TARGET_SYSTEM
)))
30 ADK_TARGET_LIBC
:= $(strip $(subst ",, $(ADK_TARGET_LIBC)))
31 ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS
)))
32 ADK_TARGET_IP
:= $(strip $(subst ",, $(ADK_TARGET_IP)))
33 ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX
)))
34 ADK_TARGET_CMDLINE
:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE)))
35 ADK_RUNTIME_TMPFS_SIZE:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE
)))
36 ADK_RUNTIME_CONSOLE_SERIAL_SPEED
:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)))
37 ADK_HOST:= $(strip $(subst ",, $(ADK_HOST
)))
38 ADK_VENDOR
:= $(strip $(subst ",, $(ADK_VENDOR)))
39 ADK_TOOLS_ADDPATTERN_ARGS:= $(strip $(subst ",, $(ADK_TOOLS_ADDPATTERN_ARGS
)))
41 ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y
)
42 ifneq ($(strip $(wildcard $(TOPDIR
)/target
/$(ADK_TARGET_ARCH
)/target.mk
)),)
43 include $(TOPDIR
)/target
/$(ADK_TARGET_ARCH
)/target.mk
47 include $(TOPDIR
)/mk
/vars.mk
49 export BASH HOSTCC HOSTCXX MAKE LANGUAGE LC_ALL OStype PATH
52 CFLAGS_FOR_BUILD?
= -O2
-Wall
53 CXXFLAGS_FOR_BUILD?
= -O2
-Wall
55 FLAGS_FOR_BUILD
:= ${CPPFLAGS_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD}
57 HOSTCFLAGS?
= -O2
-Wall
58 HOSTCXXFLAGS?
= -O2
-Wall
62 TARGET_CC
:= $(strip ${TARGET_CC})
63 TARGET_CXX
:= $(strip ${TARGET_CXX})
64 TARGET_CFLAGS
:= $(strip ${TARGET_CFLAGS} -fno-ident
-fhonour-copts
)
71 __shquote
= '$(subst ','\'',$(1))'
72 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
75 @$(foreach _s,${dump},$(call __dumpvar,${_s});)