rules.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/prereq.mk
  4. -include $(TOPDIR)/.config
  5. ifeq ($(VERBOSE),1)
  6. START_TRACE:= :
  7. END_TRACE:= :
  8. TRACE:= :
  9. CMD_TRACE:= :
  10. PKG_TRACE:= :
  11. MAKE_TRACE:=
  12. EXTRA_MAKEFLAGS:=
  13. SET_DASHX:= set -x
  14. else
  15. START_TRACE:= echo -n "---> "
  16. END_TRACE:= echo
  17. TRACE:= echo "---> "
  18. CMD_TRACE:= echo -n
  19. PKG_TRACE:= echo "------> "
  20. EXTRA_MAKEFLAGS:= -s
  21. MAKE_TRACE:= >/dev/null 2>&1 || { echo "Build failed. Please re-run make with v to see what's going on"; false; }
  22. SET_DASHX:= :
  23. endif
  24. # Strip off the annoying quoting
  25. DEVICE:= $(strip $(subst ",, $(ADK_DEVICE)))
  26. ADK_TARGET_SUFFIX:= $(strip $(subst ",, $(ADK_TARGET_SUFFIX)))
  27. ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
  28. include $(TOPDIR)/target/$(DEVICE)/device.mk
  29. endif
  30. include $(TOPDIR)/mk/vars.mk
  31. export BASH HOSTCC HOSTCFLAGS MAKE LANGUAGE LC_ALL OStype PATH
  32. HOSTCPPFLAGS?=
  33. HOSTLDFLAGS?=
  34. TARGET_CFLAGS:= $(strip -fwrapv -fno-ident ${TARGET_CFLAGS})
  35. TARGET_CC:= $(strip ${TARGET_CC})
  36. TARGET_CXX:= $(strip ${TARGET_CXX})
  37. ifneq (${show},)
  38. _show:
  39. @echo '$($(show))'
  40. endif