config.mk 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # (C) Copyright 2000-2013
  3. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. #
  5. # SPDX-License-Identifier: GPL-2.0+
  6. #
  7. #########################################################################
  8. # clean the slate ...
  9. PLATFORM_RELFLAGS =
  10. PLATFORM_CPPFLAGS =
  11. PLATFORM_LDFLAGS =
  12. #########################################################################
  13. # Some architecture config.mk files need to know what CPUDIR is set to,
  14. # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
  15. # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
  16. # CPU-specific code.
  17. CPUDIR=arch/$(ARCH)/cpu/$(CPU)
  18. ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
  19. CPUDIR=arch/$(ARCH)/cpu
  20. endif
  21. sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules
  22. sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules
  23. ifdef SOC
  24. sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
  25. endif
  26. ifdef VENDOR
  27. BOARDDIR = $(VENDOR)/$(BOARD)
  28. else
  29. BOARDDIR = $(BOARD)
  30. endif
  31. ifdef BOARD
  32. sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
  33. endif
  34. #########################################################################
  35. RELFLAGS= $(PLATFORM_RELFLAGS)
  36. OBJCOPYFLAGS += --gap-fill=0xff
  37. CPPFLAGS = $(RELFLAGS)
  38. CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
  39. LDFLAGS += $(PLATFORM_LDFLAGS)
  40. LDFLAGS_FINAL += -Bstatic