Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #
  2. # (C) Copyright 2000-2008
  3. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. #
  5. # See file CREDITS for list of people who contributed to this
  6. # project.
  7. #
  8. # This program is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU General Public License as
  10. # published by the Free Software Foundation; either version 2 of
  11. # the License, or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. # MA 02111-1307 USA
  22. #
  23. include $(TOPDIR)/config.mk
  24. LIB = $(obj)lib$(SOC).a
  25. ifdef CONFIG_AT91CAP9
  26. COBJS-$(CONFIG_MACB) += at91cap9_macb.o
  27. COBJS-y += at91cap9_serial.o
  28. COBJS-$(CONFIG_HAS_DATAFLASH) += at91cap9_spi.o
  29. endif
  30. ifdef CONFIG_AT91SAM9260
  31. COBJS-$(CONFIG_MACB) += at91sam9260_macb.o
  32. COBJS-y += at91sam9260_serial.o
  33. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9260_spi.o
  34. endif
  35. ifdef CONFIG_AT91SAM9G20
  36. COBJS-$(CONFIG_MACB) += at91sam9260_macb.o
  37. COBJS-y += at91sam9260_serial.o
  38. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9260_spi.o
  39. endif
  40. ifdef CONFIG_AT91SAM9261
  41. COBJS-y += at91sam9261_serial.o
  42. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9261_spi.o
  43. endif
  44. ifdef CONFIG_AT91SAM9263
  45. COBJS-$(CONFIG_MACB) += at91sam9263_macb.o
  46. COBJS-y += at91sam9263_serial.o
  47. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9263_spi.o
  48. COBJS-$(CONFIG_USB_OHCI_NEW) += at91sam9263_usb.o
  49. endif
  50. ifdef CONFIG_AT91SAM9RL
  51. COBJS-y += at91sam9rl_serial.o
  52. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9rl_spi.o
  53. endif
  54. COBJS-$(CONFIG_AT91_LED) += led.o
  55. COBJS-y += clock.o
  56. COBJS-y += cpu.o
  57. COBJS-y += timer.o
  58. SOBJS = lowlevel_init.o
  59. SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
  60. OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
  61. all: $(obj).depend $(LIB) $(obj)u-boot.lds
  62. $(LIB): $(OBJS)
  63. $(AR) $(ARFLAGS) $@ $(OBJS)
  64. $(obj)u-boot.lds: u-boot.lds.S
  65. $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -DCONFIG_BOARDDIR=$(BOARDDIR) -P $^ > $@
  66. #########################################################################
  67. # defines $(obj).depend target
  68. include $(SRCTREE)/rules.mk
  69. sinclude $(obj).depend
  70. #########################################################################