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 $(ADK_TOPDIR
)/prereq.mk
5 -include $(ADK_TOPDIR
)/.config
7 ifeq ($(ADK_VERBOSE
),1)
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_BOARD
:= $(strip $(subst ",, $(ADK_TARGET_BOARD)))
31 ADK_TARGET_CPU_ARCH:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH
)))
32 ADK_TARGET_KERNEL
:= $(strip $(subst ",, $(ADK_TARGET_KERNEL)))
33 ADK_TARGET_LIBC:= $(strip $(subst ",, $(ADK_TARGET_LIBC
)))
34 ADK_TARGET_LIBC_PATH
:= $(strip $(subst ",, $(ADK_TARGET_LIBC_PATH)))
35 ADK_TARGET_ENDIAN:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN
)))
36 ADK_TARGET_FLOAT
:= $(strip $(subst ",, $(ADK_TARGET_FLOAT)))
37 ADK_TARGET_FPU:= $(strip $(subst ",, $(ADK_TARGET_FPU
)))
38 ADK_TARGET_ARM_MODE
:= $(strip $(subst ",, $(ADK_TARGET_ARM_MODE)))
39 ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS
)))
40 ADK_TARGET_CFLAGS_OPT
:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS_OPT)))
41 ADK_TARGET_ABI_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_ABI_CFLAGS
)))
42 ADK_TARGET_ABI
:= $(strip $(subst ",, $(ADK_TARGET_ABI)))
43 ADK_TARGET_MIPS_ABI:= $(strip $(subst ",, $(ADK_TARGET_MIPS_ABI
)))
44 ADK_TARGET_XTENSA
:= $(strip $(subst ",, $(ADK_TARGET_XTENSA)))
45 ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP
)))
46 ADK_TARGET_SUFFIX
:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
47 ADK_TARGET_CMDLINE:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE
)))
48 ADK_QEMU_ARGS
:= $(strip $(subst ",, $(ADK_QEMU_ARGS)))
49 ADK_RUNTIME_TMPFS_SIZE:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE
)))
50 ADK_RUNTIME_CONSOLE_SERIAL_SPEED
:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)))
51 ADK_RUNTIME_CONSOLE_SERIAL_DEVICE:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE
)))
52 ADK_RUNTIME_CONSOLE_VGA_DEVICE
:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_VGA_DEVICE)))
53 ADK_HOST:= $(strip $(subst ",, $(ADK_HOST
)))
54 ADK_VENDOR
:= $(strip $(subst ",, $(ADK_VENDOR)))
55 ADK_DL_DIR:= $(strip $(subst ",, $(ADK_DL_DIR
)))
56 ADK_COMPRESSION_TOOL
:= $(strip $(subst ",, $(ADK_COMPRESSION_TOOL)))
57 ADK_KERNEL_VERSION:= $(strip $(subst ",, $(ADK_KERNEL_VERSION
)))
58 ADK_LIBC_VERSION
:= $(strip $(subst ",, $(ADK_LIBC_VERSION)))
59 ADK_PARAMETER_NETCONSOLE_SRC_IP:= $(strip $(subst ",, $(ADK_PARAMETER_NETCONSOLE_SRC_IP
)))
60 ADK_PARAMETER_NETCONSOLE_DST_IP
:= $(strip $(subst ",, $(ADK_PARAMETER_NETCONSOLE_DST_IP)))
61 ADK_JFFS2_OPTS:= $(strip $(subst ",, $(ADK_JFFS2_OPTS
)))
62 ADK_WGET_TIMEOUT
:= $(strip $(subst ",, $(ADK_WGET_TIMEOUT)))
64 ADK_TARGET_KARCH:=$(ADK_TARGET_ARCH)
66 # translate toolchain arch to kernel arch
67 ifeq ($(ADK_TARGET_ARCH),aarch64)
68 ADK_TARGET_KARCH:=arm64
70 ifeq ($(ADK_TARGET_ARCH),bfin)
71 ADK_TARGET_KARCH:=blackfin
73 ifeq ($(ADK_TARGET_ARCH),ppc)
74 ADK_TARGET_KARCH:=powerpc
76 ifeq ($(ADK_TARGET_ARCH),ppc64)
77 ADK_TARGET_KARCH:=powerpc
79 ifeq ($(ADK_TARGET_ARCH),mips64)
80 ADK_TARGET_KARCH:=mips
83 include $(ADK_TOPDIR)/mk/vars.mk
90 __shquote= '$(subst ','\'',$(1))'
91 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
94 @$(foreach _s,${dump},$(call __dumpvar,${_s});)