util-linux: libreadline for sfdisk required
[openadk.git] / rules.mk
blob4716e3c803f474b043abbbd23773f576a0e124e4
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)
8 START_TRACE:= :
9 END_TRACE:= :
10 TRACE:= :
11 CMD_TRACE:= :
12 PKG_TRACE:= :
13 MAKE_TRACE:=
14 DL_TRACE:=
15 EXTRA_MAKEFLAGS:=
16 SET_DASHX:= set -x
17 else
18 START_TRACE:= echo -n " ---> "
19 END_TRACE:= echo
20 TRACE:= echo " ---> "
21 CMD_TRACE:= echo -n
22 PKG_TRACE:= echo "------> "
23 EXTRA_MAKEFLAGS:= -s
24 MAKE_TRACE:= >/dev/null 2>&1 || { echo "Build failed. Please re-run make with v to see what's going on"; false; }
25 DL_TRACE:= >/dev/null 2>&1
26 SET_DASHX:= :
27 endif
29 # Strip off the annoying quoting
30 ADK_TARGET_ARCH:= $(strip $(subst ",, $(ADK_TARGET_ARCH)))
31 ADK_TARGET_SYSTEM:= $(strip $(subst ",, $(ADK_TARGET_SYSTEM)))
32 ADK_TARGET_BOARD:= $(strip $(subst ",, $(ADK_TARGET_BOARD)))
33 ADK_TARGET_CPU_ARCH:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH)))
34 ADK_TARGET_CPU_TYPE:= $(strip $(subst ",, $(ADK_TARGET_CPU_TYPE)))
35 ADK_TARGET_KERNEL:= $(strip $(subst ",, $(ADK_TARGET_KERNEL)))
36 ADK_TARGET_LIBC:= $(strip $(subst ",, $(ADK_TARGET_LIBC)))
37 ADK_TARGET_LIBC_PATH:= $(strip $(subst ",, $(ADK_TARGET_LIBC_PATH)))
38 ADK_TARGET_ENDIAN:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN)))
39 ADK_TARGET_ENDIAN_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN_SUFFIX)))
40 ADK_TARGET_GCC_CPU:= $(strip $(subst ",, $(ADK_TARGET_GCC_CPU)))
41 ADK_TARGET_GCC_ARCH:= $(strip $(subst ",, $(ADK_TARGET_GCC_ARCH)))
42 ADK_TARGET_BINFMT:= $(strip $(subst ",, $(ADK_TARGET_BINFMT)))
43 ADK_TARGET_FLOAT:= $(strip $(subst ",, $(ADK_TARGET_FLOAT)))
44 ADK_TARGET_FPU:= $(strip $(subst ",, $(ADK_TARGET_FPU)))
45 ADK_TARGET_ARM_MODE:= $(strip $(subst ",, $(ADK_TARGET_ARM_MODE)))
46 ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS)))
47 ADK_TARGET_CPU_FLAGS:= $(strip $(subst ",, $(ADK_TARGET_CPU_FLAGS)))
48 ADK_TARGET_CFLAGS_OPT:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS_OPT)))
49 ADK_TARGET_ABI_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_ABI_CFLAGS)))
50 ADK_TARGET_ABI:= $(strip $(subst ",, $(ADK_TARGET_ABI)))
51 ADK_TARGET_MIPS_ABI:= $(strip $(subst ",, $(ADK_TARGET_MIPS_ABI)))
52 ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP)))
53 ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
54 ADK_TARGET_CMDLINE:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE)))
55 ADK_QEMU_ARGS:= $(strip $(subst ",, $(ADK_QEMU_ARGS)))
56 ADK_RUNTIME_TMPFS_SIZE:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE)))
57 ADK_RUNTIME_CONSOLE_SERIAL_SPEED:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)))
58 ADK_RUNTIME_CONSOLE_SERIAL_DEVICE:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)))
59 ADK_RUNTIME_CONSOLE_VGA_DEVICE:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_VGA_DEVICE)))
60 ADK_RUNTIME_DEFAULT_LOCALE:= $(strip $(subst ",, $(ADK_RUNTIME_DEFAULT_LOCALE)))
61 ADK_HOST:= $(strip $(subst ",, $(ADK_HOST)))
62 ADK_VENDOR:= $(strip $(subst ",, $(ADK_VENDOR)))
63 ADK_DL_DIR:= $(strip $(subst ",, $(ADK_DL_DIR)))
64 ADK_COMPRESSION_TOOL:= $(strip $(subst ",, $(ADK_COMPRESSION_TOOL)))
65 ADK_LIBC_VERSION:= $(strip $(subst ",, $(ADK_LIBC_VERSION)))
66 ADK_PARAMETER_NETCONSOLE_SRC_IP:= $(strip $(subst ",, $(ADK_PARAMETER_NETCONSOLE_SRC_IP)))
67 ADK_PARAMETER_NETCONSOLE_DST_IP:= $(strip $(subst ",, $(ADK_PARAMETER_NETCONSOLE_DST_IP)))
68 ADK_JFFS2_OPTS:= $(strip $(subst ",, $(ADK_JFFS2_OPTS)))
69 ADK_TARGET_KERNEL_VERSION:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_VERSION)))
70 ADK_TARGET_KERNEL_HASH:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_HASH)))
71 ADK_TARGET_KERNEL_DEFCONFIG:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_DEFCONFIG)))
72 ADK_KERNEL_GITVER:= $(strip $(subst ",, $(ADK_KERNEL_GITVER)))
74 ADK_TARGET_KARCH:=$(ADK_TARGET_ARCH)
76 # translate toolchain arch to kernel arch
77 ifeq ($(ADK_TARGET_ARCH),aarch64)
78 ADK_TARGET_KARCH:=arm64
79 endif
80 ifeq ($(ADK_TARGET_ARCH),bfin)
81 ADK_TARGET_KARCH:=blackfin
82 endif
83 ifeq ($(ADK_TARGET_ARCH),or1k)
84 ADK_TARGET_KARCH:=openrisc
85 endif
86 ifeq ($(ADK_TARGET_ARCH),ppc)
87 ADK_TARGET_KARCH:=powerpc
88 endif
89 ifeq ($(ADK_TARGET_ARCH),ppc64)
90 ADK_TARGET_KARCH:=powerpc
91 endif
92 ifeq ($(ADK_TARGET_ARCH),mips64)
93 ADK_TARGET_KARCH:=mips
94 endif
95 ifeq ($(ADK_TARGET_ARCH),hppa)
96 ADK_TARGET_KARCH:=parisc
97 endif
99 include $(ADK_TOPDIR)/mk/vars.mk
101 ifneq (${show},)
102 .DEFAULT_GOAL:= show
103 show:
104 @$(info ${${show}})
105 else ifneq (${dump},)
106 __shquote= '$(subst ','\'',$(1))'
107 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
108 .DEFAULT_GOAL:= show
109 show:
110 @$(foreach _s,${dump},$(call __dumpvar,${_s});)
111 endif