Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #
  2. # U-boot - Makefile
  3. #
  4. # Copyright (c) 2005-2008 Analog Device Inc.
  5. #
  6. # (C) Copyright 2000-2006
  7. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  8. #
  9. # Licensed under the GPL-2 or later.
  10. #
  11. extra-y := init.elf
  12. extra-y += initcode.o
  13. extra-y += start.o
  14. obj-y := interrupt.o cache.o
  15. obj-y += cpu.o
  16. obj-y += gpio.o
  17. obj-y += interrupts.o
  18. obj-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
  19. obj-y += os_log.o
  20. obj-y += reset.o
  21. obj-y += traps.o
  22. extra-y += check_initcode
  23. # make sure our initcode (which goes into LDR) does not
  24. # have relocs or external references
  25. CFLAGS_REMOVE_initcode.o := -ffunction-sections -fdata-sections
  26. READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
  27. $(obj)/check_initcode: $(obj)/initcode.o
  28. ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
  29. @if $(READINIT) | grep '\<GLOBAL\>.*\<UND\>' ; then \
  30. echo "$< contains external references!" 1>&2 ; \
  31. exit 1 ; \
  32. fi
  33. endif
  34. CPPFLAGS_init.lds := -ansi
  35. $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
  36. $(LD) $(LDFLAGS) -T $^ -o $@