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_ENDIAN:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN
)))
32 ADK_TARGET_CPU_ARCH
:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH)))
33 ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS
)))
34 ADK_TARGET_ABI_CFLAGS
:= $(strip $(subst ",, $(ADK_TARGET_ABI_CFLAGS)))
35 ADK_TARGET_KERNEL_LDFLAGS:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_LDFLAGS
)))
36 ADK_TARGET_ABI
:= $(strip $(subst ",, $(ADK_TARGET_ABI)))
37 ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP
)))
38 ADK_TARGET_SUFFIX
:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
39 ADK_TARGET_CMDLINE:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE
)))
40 ADK_RUNTIME_TMPFS_SIZE
:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE)))
41 ADK_RUNTIME_CONSOLE_SERIAL_SPEED:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_SPEED
)))
42 ADK_HOST
:= $(strip $(subst ",, $(ADK_HOST)))
43 ADK_VENDOR:= $(strip $(subst ",, $(ADK_VENDOR
)))
44 ADK_TOOLS_ADDPATTERN_ARGS
:= $(strip $(subst ",, $(ADK_TOOLS_ADDPATTERN_ARGS)))
46 ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
47 ifneq ($(strip $(wildcard $(TOPDIR)/target/$(ADK_TARGET_ARCH)/target.mk)),)
48 include $(TOPDIR)/target/$(ADK_TARGET_ARCH)/target.mk
59 include $(TOPDIR)/mk/vars.mk
62 CFLAGS_FOR_BUILD?= -O2 -Wall
63 CXXFLAGS_FOR_BUILD?= -O2 -Wall
65 FLAGS_FOR_BUILD:= ${CPPFLAGS_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD}
72 __shquote= '$(subst ','\'',$(1))'
73 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
76 @$(foreach _s,${dump},$(call __dumpvar,${_s});)