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