update openldap, fine tune config
[openadk.git] / rules.mk
blob44500f761aee13d90cb1d01047e1f9ff0153a74e
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_ENDIAN:= $(strip $(subst ",, $(ADK_TARGET_ENDIAN)))
32 ADK_TARGET_CPU_ARCH:= $(strip $(subst ",, $(ADK_TARGET_CPU_ARCH)))
33 ADK_TARGET_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_CFLAGS)))
34 ADK_TARGET_ABI_CFLAGS:= $(strip $(subst ",, $(ADK_TARGET_ABI_CFLAGS)))
35 ADK_TARGET_KERNEL_LDFLAGS:= $(strip $(subst ",, $(ADK_TARGET_KERNEL_LDFLAGS)))
36 ADK_TARGET_ABI:= $(strip $(subst ",, $(ADK_TARGET_ABI)))
37 ADK_TARGET_IP:= $(strip $(subst ",, $(ADK_TARGET_IP)))
38 ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
39 ADK_TARGET_CMDLINE:= $(strip $(subst ",, $(ADK_TARGET_CMDLINE)))
40 ADK_RUNTIME_TMPFS_SIZE:= $(strip $(subst ",, $(ADK_RUNTIME_TMPFS_SIZE)))
41 ADK_RUNTIME_CONSOLE_SERIAL_SPEED:= $(strip $(subst ",, $(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)))
42 ADK_HOST:= $(strip $(subst ",, $(ADK_HOST)))
43 ADK_VENDOR:= $(strip $(subst ",, $(ADK_VENDOR)))
44 ADK_TOOLS_ADDPATTERN_ARGS:= $(strip $(subst ",, $(ADK_TOOLS_ADDPATTERN_ARGS)))
46 ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
47 ifneq ($(strip $(wildcard $(TOPDIR)/target/$(ADK_TARGET_ARCH)/target.mk)),)
48 include $(TOPDIR)/target/$(ADK_TARGET_ARCH)/target.mk
49 endif
50 endif
52 ifneq (${DEBUG},)
53 ADK_DEBUG:=y
54 endif
55 ifneq (${STATIC},)
56 ADK_STATIC:=y
57 endif
59 include $(TOPDIR)/mk/vars.mk
61 CPPFLAGS_FOR_BUILD?=
62 CFLAGS_FOR_BUILD?= -O2 -Wall
63 CXXFLAGS_FOR_BUILD?= -O2 -Wall
64 LDFLAGS_FOR_BUILD?=
65 FLAGS_FOR_BUILD:= ${CPPFLAGS_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD}
67 ifneq (${show},)
68 .DEFAULT_GOAL:= show
69 show:
70 @$(info ${${show}})
71 else ifneq (${dump},)
72 __shquote= '$(subst ','\'',$(1))'
73 __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)}))
74 .DEFAULT_GOAL:= show
75 show:
76 @$(foreach _s,${dump},$(call __dumpvar,${_s});)
77 endif