1 # Copyright (C) 2000-2017 Free Software Foundation, Inc.
3 # This file is part of GCC.
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)
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.
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/>.
19 PASSES_EXTRA += $(srcdir)/config/avr/avr-passes.def
21 driver-avr.o: $(srcdir)/config/avr/driver-avr.c \
22 $(CONFIG_H) $(SYSTEM_H) coretypes.h \
23 $(srcdir)/config/avr/avr-arch.h $(TM_H)
24 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
26 avr-devices.o: $(srcdir)/config/avr/avr-devices.c \
27 $(srcdir)/config/avr/avr-mcus.def \
28 $(srcdir)/config/avr/avr-arch.h \
29 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
30 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
32 avr-c.o: $(srcdir)/config/avr/avr-c.c \
33 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H)
34 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
36 avr-log.o: $(srcdir)/config/avr/avr-log.c \
37 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H) dumpfile.h
38 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
40 avr.o avr-c.o: $(srcdir)/config/avr/builtins.def
42 # This overrides stdfix.h from USER_H which we supply and include
43 # in our own stdfix.h as stdfix-gcc.h.
45 EXTRA_HEADERS = $(srcdir)/config/avr/stdfix.h \
48 stdfix-gcc.h: $(srcdir)/ginclude/stdfix.h
51 # Files and Variables auto-generated from avr-mcus.def
53 AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
55 # Run `avr-mcus' after you changed or added devices in avr-mcus.def
59 avr-mcus: $(srcdir)/config/avr/t-multilib \
60 $(srcdir)/doc/avr-mmcu.texi ; @true
62 # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
63 gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.c \
64 $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c \
65 $(srcdir)/config/avr/avr-arch.h
66 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
68 gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.c \
69 $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c \
70 $(srcdir)/config/avr/avr-arch.h $(TM_H)
71 $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
73 $(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
76 s-device-specs: gen-avr-mmcu-specs$(build_exeext)
78 mkdir device-specs && cd device-specs && $(RUN_GEN) ../$<
79 $(STAMP) s-device-specs
81 GCC_PASSES+=s-device-specs
83 install-driver: install-device-specs
85 install-device-specs: s-device-specs installdirs
86 -rm -rf $(DESTDIR)$(libsubdir)/device-specs
87 mkdir $(DESTDIR)$(libsubdir)/device-specs
88 -for file in device-specs/*; do \
89 $(INSTALL_DATA) $${file} $(DESTDIR)$(libsubdir)/$${file}; \
97 s-mlib: $(srcdir)/config/avr/t-multilib
99 $(srcdir)/config/avr/t-multilib: $(srcdir)/config/avr/genmultilib.awk \
101 $(AWK) -f $< $< $(AVR_MCUS) > $@