diagnostics: rename tree-diagnostic-path.cc to diagnostic-path.cc
[official-gcc.git] / gcc / config / avr / t-avr
blob449512a3395e4609798df2e77f8db366d3e3daa9
1 # Copyright (C) 2000-2024 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)
8 # any later version.
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 HAVE_DOUBLE32 = $(findstring HAVE_DOUBLE32, $(tm_defines))
20 HAVE_DOUBLE64 = $(findstring HAVE_DOUBLE64, $(tm_defines))
21 HAVE_LONG_DOUBLE32 = $(findstring HAVE_LONG_DOUBLE32, $(tm_defines))
22 HAVE_LONG_DOUBLE64 = $(findstring HAVE_LONG_DOUBLE64, $(tm_defines))
23 HAVE_LONG_DOUBLE_IS_DOUBLE = $(findstring HAVE_LONG_DOUBLE_IS_DOUBLE, $(tm_defines))
25 ifeq (WITH_DOUBLE32, $(findstring WITH_DOUBLE32, $(tm_defines)))
26 WITH_DOUBLE=32
27 endif
29 ifeq (WITH_DOUBLE64, $(findstring WITH_DOUBLE64, $(tm_defines)))
30 WITH_DOUBLE=64
31 endif
33 ifeq (WITH_LONG_DOUBLE32, $(findstring WITH_LONG_DOUBLE32, $(tm_defines)))
34 WITH_LONG_DOUBLE=32
35 endif
37 ifeq (WITH_LONG_DOUBLE64, $(findstring WITH_LONG_DOUBLE64, $(tm_defines)))
38 WITH_LONG_DOUBLE=64
39 endif
41 PASSES_EXTRA += $(srcdir)/config/avr/avr-passes.def
43 driver-avr.o: $(srcdir)/config/avr/driver-avr.cc \
44   $(CONFIG_H) $(SYSTEM_H) coretypes.h \
45   $(srcdir)/config/avr/avr-arch.h $(TM_H)
46         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
48 avr-devices.o: $(srcdir)/config/avr/avr-devices.cc \
49   $(srcdir)/config/avr/avr-mcus.def \
50   $(srcdir)/config/avr/avr-arch.h \
51   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
52         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
54 avr-c.o: $(srcdir)/config/avr/avr-c.cc \
55   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H)
56         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
58 avr-log.o: $(srcdir)/config/avr/avr-log.cc \
59   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H) dumpfile.h
60         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
62 avr.o avr-c.o: $(srcdir)/config/avr/builtins.def
64 # This overrides stdfix.h from USER_H which we supply and include
65 # in our own stdfix.h as stdfix-gcc.h.
67 EXTRA_HEADERS = $(srcdir)/config/avr/stdfix.h \
68                 stdfix-gcc.h
70 stdfix-gcc.h: $(srcdir)/ginclude/stdfix.h
71         -cp $< $@
73 # Files and Variables auto-generated from avr-mcus.def
75 AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
77 # Run `avr-mcus' after you changed or added devices in  avr-mcus.def
79 .PHONY: avr-mcus
81 avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
83 # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
84 gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
85   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
86   $(srcdir)/config/avr/avr-arch.h
87         $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@
89 gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
90   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
91   $(srcdir)/config/avr/avr-arch.h $(TM_H)
92         $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
94 $(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
95         $(RUN_GEN) ./$< > $@
97 s-device-specs: gen-avr-mmcu-specs$(build_exeext)
98         rm -rf device-specs
99         mkdir device-specs && cd device-specs && $(RUN_GEN) ../$<
100         $(STAMP) s-device-specs
102 GCC_PASSES+=s-device-specs
104 install-driver: install-device-specs
106 install-device-specs: s-device-specs installdirs
107         -rm -rf $(DESTDIR)$(libsubdir)/device-specs
108         mkdir $(DESTDIR)$(libsubdir)/device-specs
109         -for file in device-specs/*; do \
110                 $(INSTALL_DATA) $${file} $(DESTDIR)$(libsubdir)/$${file}; \
111         done
113 # Get multilib layout
114 # MULTILIB_OPTIONS
115 # MULTILIB_DIRNAMES
116 # MULTILIB_REQUIRED
117 # MULTILIB_REUSE
119 multilib.h Makefile s-mlib: t-multilib-avr
121 t-multilib-avr: $(srcdir)/config/avr/genmultilib.awk \
122                                  $(AVR_MCUS)
123         $(AWK)  -v HAVE_LONG_DOUBLE_IS_DOUBLE=$(HAVE_LONG_DOUBLE_IS_DOUBLE) \
124                 -v HAVE_DOUBLE32=$(HAVE_DOUBLE32)                       \
125                 -v HAVE_DOUBLE64=$(HAVE_DOUBLE64)                       \
126                 -v HAVE_LONG_DOUBLE32=$(HAVE_LONG_DOUBLE32)             \
127                 -v HAVE_LONG_DOUBLE64=$(HAVE_LONG_DOUBLE64)             \
128                 -v with_double=$(WITH_DOUBLE)                           \
129                 -v with_long_double=$(WITH_LONG_DOUBLE)                 \
130                 -v with_multilib_list=$(TM_MULTILIB_CONFIG)             \
131                 -f $< $< $(AVR_MCUS) > $@
133 include t-multilib-avr