linux: bump all lts / stable to latest
[openadk.git] / rules.mk
blob0b49cdb01582a6871ac8d4b7c1b79bed70c62060
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_GIT_REPO_NAME:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_GIT_REPO_NAME)))
71 ADK_TARGET_KERNEL_GIT:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_GIT)))
72 ADK_TARGET_KERNEL_GIT_VER:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_GIT_VER)))
73 ADK_TARGET_KERNEL_GIT_TYPE:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_GIT_TYPE)))
74 ADK_TARGET_KERNEL_DEFCONFIG:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_DEFCONFIG)))
75 ADK_TARGET_GENIMAGE_FILENAME:= $(strip $(subst ",, $(ADK_TARGET_GENIMAGE_FILENAME)))
76 ADK_TARGET_ROOTDEV:= $(strip $(subst ",, $(ADK_TARGET_ROOTDEV)))
78 ADK_TARGET_KARCH:=$(ADK_TARGET_ARCH)
80 # translate toolchain arch to kernel arch
81 ifeq ($(ADK_TARGET_ARCH),aarch64)
82 ADK_TARGET_KARCH:=arm64
83 endif
84 ifeq ($(ADK_TARGET_ARCH),bfin)
85 ADK_TARGET_KARCH:=blackfin
86 endif
87 ifeq ($(ADK_TARGET_ARCH),or1k)
88 ADK_TARGET_KARCH:=openrisc
89 endif
90 ifeq ($(ADK_TARGET_ARCH),ppc)
91 ADK_TARGET_KARCH:=powerpc
92 endif
93 ifeq ($(ADK_TARGET_ARCH),ppc64)
94 ADK_TARGET_KARCH:=powerpc
95 endif
96 ifeq ($(ADK_TARGET_ARCH),mips64)
97 ADK_TARGET_KARCH:=mips
98 endif
99 ifeq ($(ADK_TARGET_ARCH),hppa)
100 ADK_TARGET_KARCH:=parisc
101 endif
102 ifeq ($(ADK_TARGET_ARCH),riscv32)
103 ADK_TARGET_KARCH:=riscv
104 endif
105 ifeq ($(ADK_TARGET_ARCH),riscv64)
106 ADK_TARGET_KARCH:=riscv
107 endif
109 include $(ADK_TOPDIR)/mk/vars.mk
111 ifneq (${show},)
112 .DEFAULT_GOAL:= show
113 show:
114 @$(info ${${show}})
115 else ifneq (${dump},)
116 __shquote= '$(subst ','\'',$(1))'
117 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
118 .DEFAULT_GOAL:= show
119 show:
120 @$(foreach _s,${dump},$(call __dumpvar,${_s});)
121 endif