Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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-y += at91cap9_serial.o
  27. COBJS-$(CONFIG_HAS_DATAFLASH) += at91cap9_spi.o
  28. endif
  29. ifdef CONFIG_AT91SAM9260
  30. COBJS-y += at91sam9260_serial.o
  31. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9260_spi.o
  32. endif
  33. ifdef CONFIG_AT91SAM9261
  34. COBJS-y += at91sam9261_serial.o
  35. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9261_spi.o
  36. endif
  37. ifdef CONFIG_AT91SAM9263
  38. COBJS-y += at91sam9263_serial.o
  39. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9263_spi.o
  40. COBJS-$(CONFIG_USB_OHCI_NEW) += at91sam9263_usb.o
  41. endif
  42. ifdef CONFIG_AT91SAM9RL
  43. COBJS-y += at91sam9rl_serial.o
  44. COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9rl_spi.o
  45. endif
  46. COBJS-$(CONFIG_AT91_LED) += led.o
  47. COBJS-$(CONFIG_HAS_DATAFLASH) += spi.o
  48. COBJS-y += timer.o
  49. COBJS-y += usb.o
  50. SOBJS = lowlevel_init.o
  51. SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
  52. OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
  53. all: $(obj).depend $(LIB)
  54. $(LIB): $(OBJS)
  55. $(AR) $(ARFLAGS) $@ $(OBJS)
  56. #########################################################################
  57. # defines $(obj).depend target
  58. include $(SRCTREE)/rules.mk
  59. sinclude $(obj).depend
  60. #########################################################################