Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. $(obj)/initcode.o: CFLAGS += -fno-function-sections -fno-data-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. $(obj)/init.lds: $(src)/init.lds.S
  35. $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@
  36. $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
  37. $(LD) $(LDFLAGS) -T $^ -o $@