t-avr 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Copyright (C) 2000-2015 Free Software Foundation, Inc.
  2. #
  3. # This file is part of GCC.
  4. #
  5. # GCC is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3, or (at your option)
  8. # any later version.
  9. #
  10. # GCC is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with GCC; see the file COPYING3. If not see
  17. # <http://www.gnu.org/licenses/>.
  18. driver-avr.o: $(srcdir)/config/avr/driver-avr.c \
  19. $(CONFIG_H) $(SYSTEM_H) coretypes.h \
  20. $(srcdir)/config/avr/avr-arch.h $(TM_H)
  21. $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  22. avr-devices.o: $(srcdir)/config/avr/avr-devices.c \
  23. $(srcdir)/config/avr/avr-mcus.def \
  24. $(srcdir)/config/avr/avr-arch.h \
  25. $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
  26. $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  27. avr-c.o: $(srcdir)/config/avr/avr-c.c \
  28. $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H)
  29. $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  30. avr-log.o: $(srcdir)/config/avr/avr-log.c \
  31. $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H) dumpfile.h
  32. $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  33. avr.o avr-c.o: $(srcdir)/config/avr/builtins.def
  34. # This overrides stdfix.h from USER_H which we supply and include
  35. # in our own stdfix.h as stdfix-gcc.h.
  36. EXTRA_HEADERS = $(srcdir)/config/avr/stdfix.h \
  37. stdfix-gcc.h
  38. stdfix-gcc.h: $(srcdir)/ginclude/stdfix.h
  39. -cp $< $@
  40. # Files and Variables auto-generated from avr-mcus.def
  41. AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
  42. # Run `avr-mcus' after you changed or added devices in avr-mcus.def
  43. .PHONY: avr-mcus
  44. avr-mcus: $(srcdir)/config/avr/t-multilib \
  45. $(srcdir)/doc/avr-mmcu.texi ; @true
  46. # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
  47. gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.c \
  48. $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c \
  49. $(srcdir)/config/avr/avr-arch.h
  50. $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
  51. gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.c \
  52. $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c \
  53. $(srcdir)/config/avr/avr-arch.h $(TM_H)
  54. $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
  55. $(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
  56. $(RUN_GEN) ./$< > $@
  57. s-device-specs: gen-avr-mmcu-specs$(build_exeext)
  58. rm -rf device-specs
  59. mkdir device-specs && cd device-specs && $(RUN_GEN) ../$<
  60. $(STAMP) s-device-specs
  61. GCC_PASSES+=s-device-specs
  62. install-driver: install-device-specs
  63. install-device-specs: s-device-specs installdirs
  64. -rm -rf $(DESTDIR)$(libsubdir)/device-specs
  65. mkdir $(DESTDIR)$(libsubdir)/device-specs
  66. -for file in device-specs/*; do \
  67. $(INSTALL_DATA) $${file} $(DESTDIR)$(libsubdir)/$${file}; \
  68. done
  69. # Map -mmcu= to the right multilib variant
  70. # MULTILIB_OPTIONS
  71. # MULTILIB_DIRNAMES
  72. # MULTILIB_EXCEPTIONS
  73. # MULTILIB_MATCHES
  74. s-mlib: $(srcdir)/config/avr/t-multilib
  75. $(srcdir)/config/avr/t-multilib: $(srcdir)/config/avr/genmultilib.awk \
  76. $(AVR_MCUS)
  77. $(AWK) -f $< -v FORMAT=Makefile $< $(AVR_MCUS) > $@