rules.mk 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # $Id$
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. include $(TOPDIR)/prereq.mk
  6. -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
  26. # Strip off the annoying quoting
  27. DEVICE:= $(strip $(subst ",, $(ADK_DEVICE)))
  28. ifeq ($(strip ${ADK_HAVE_DOT_CONFIG}),y)
  29. include $(TOPDIR)/target/$(DEVICE)/device.mk
  30. endif
  31. include $(TOPDIR)/mk/vars.mk
  32. export BASH HOSTCC HOSTCFLAGS MAKE LANGUAGE LC_ALL OStype PATH
  33. HOSTCPPFLAGS?=
  34. HOSTLDFLAGS?=
  35. TARGET_CFLAGS:= $(strip -fwrapv -fno-ident ${TARGET_CFLAGS})
  36. TARGET_CC:= $(strip ${TARGET_CC})
  37. TARGET_CXX:= $(strip ${TARGET_CXX})
  38. ifneq (${show},)
  39. _show:
  40. @echo '$($(show))'
  41. endif