pkgmaker: comment out debug output using #if 0
[openadk.git] / rules.mk
blob8dcf26644c443cf09087e588e20ed56702d7beb5
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
7 ifeq ($(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_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_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS)))
32 ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP)))
33 ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
34 ADK_TARGET_CMDLINE:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE)))
35 ADK_RUNTIME_TMPFS_SIZE:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE)))
36 ADK_RUNTIME_CONSOLE_SERIAL_SPEED:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)))
37 ADK_HOST:= $(strip $(subst ",, $(ADK_HOST)))
38 ADK_VENDOR:= $(strip $(subst ",, $(ADK_VENDOR)))
39 ADK_TOOLS_ADDPATTERN_ARGS:= $(strip $(subst ",, $(ADK_TOOLS_ADDPATTERN_ARGS)))
41 ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
42 ifneq ($(strip $(wildcard $(TOPDIR)/target/$(ADK_TARGET_ARCH)/target.mk)),)
43 include $(TOPDIR)/target/$(ADK_TARGET_ARCH)/target.mk
44 endif
45 endif
47 include $(TOPDIR)/mk/vars.mk
49 export BASH HOSTCC HOSTCXX MAKE LANGUAGE LC_ALL OStype PATH
51 CPPFLAGS_FOR_BUILD?=
52 CFLAGS_FOR_BUILD?= -O2 -Wall
53 CXXFLAGS_FOR_BUILD?= -O2 -Wall
54 LDFLAGS_FOR_BUILD?=
55 FLAGS_FOR_BUILD:= ${CPPFLAGS_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD}
57 HOSTCFLAGS?= -O2 -Wall
58 HOSTCXXFLAGS?= -O2 -Wall
59 HOSTCPPFLAGS?=
60 HOSTLDFLAGS?=
62 TARGET_CC:= $(strip ${TARGET_CC})
63 TARGET_CXX:= $(strip ${TARGET_CXX})
64 TARGET_CFLAGS:= $(strip ${TARGET_CFLAGS} -fno-ident -fhonour-copts)
66 ifneq (${show},)
67 .DEFAULT_GOAL:= show
68 show:
69 @$(info ${${show}})
70 else ifneq (${dump},)
71 __shquote= '$(subst ','\'',$(1))'
72 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
73 .DEFAULT_GOAL:= show
74 show:
75 @$(foreach _s,${dump},$(call __dumpvar,${_s});)
76 endif