]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/avr/t-avr
Change references of .c files to .cc files
[thirdparty/gcc.git] / gcc / config / avr / t-avr
CommitLineData
7adcbafe 1# Copyright (C) 2000-2022 Free Software Foundation, Inc.
ad41bd84
JM
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
5b01f1a5
GJL
19HAVE_DOUBLE32 = $(findstring HAVE_DOUBLE32, $(tm_defines))
20HAVE_DOUBLE64 = $(findstring HAVE_DOUBLE64, $(tm_defines))
21HAVE_LONG_DOUBLE32 = $(findstring HAVE_LONG_DOUBLE32, $(tm_defines))
22HAVE_LONG_DOUBLE64 = $(findstring HAVE_LONG_DOUBLE64, $(tm_defines))
23HAVE_LONG_DOUBLE_IS_DOUBLE = $(findstring HAVE_LONG_DOUBLE_IS_DOUBLE, $(tm_defines))
24
25ifeq (WITH_DOUBLE32, $(findstring WITH_DOUBLE32, $(tm_defines)))
26WITH_DOUBLE=32
27endif
28
29ifeq (WITH_DOUBLE64, $(findstring WITH_DOUBLE64, $(tm_defines)))
30WITH_DOUBLE=64
31endif
32
33ifeq (WITH_LONG_DOUBLE32, $(findstring WITH_LONG_DOUBLE32, $(tm_defines)))
34WITH_LONG_DOUBLE=32
35endif
36
37ifeq (WITH_LONG_DOUBLE64, $(findstring WITH_LONG_DOUBLE64, $(tm_defines)))
38WITH_LONG_DOUBLE=64
39endif
29f3def3 40
76beabf4
GJL
41PASSES_EXTRA += $(srcdir)/config/avr/avr-passes.def
42
e53b6e56 43driver-avr.o: $(srcdir)/config/avr/driver-avr.cc \
4a2caf6c
GJL
44 $(CONFIG_H) $(SYSTEM_H) coretypes.h \
45 $(srcdir)/config/avr/avr-arch.h $(TM_H)
46 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
47
e53b6e56 48avr-devices.o: $(srcdir)/config/avr/avr-devices.cc \
1b916ca6 49 $(srcdir)/config/avr/avr-mcus.def \
4a2caf6c 50 $(srcdir)/config/avr/avr-arch.h \
59ab92d2 51 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
c2405775 52 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
17fad361 53
e53b6e56 54avr-c.o: $(srcdir)/config/avr/avr-c.cc \
e62d5d9f 55 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H)
c2405775 56 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
17fad361 57
e53b6e56 58avr-log.o: $(srcdir)/config/avr/avr-log.cc \
7ee2468b 59 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H) dumpfile.h
c2405775 60 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
6c7dfafe 61
639d0302
GJL
62avr.o avr-c.o: $(srcdir)/config/avr/builtins.def
63
dc62d7d1 64# This overrides stdfix.h from USER_H which we supply and include
b0eb429d 65# in our own stdfix.h as stdfix-gcc.h.
dc62d7d1
GJL
66
67EXTRA_HEADERS = $(srcdir)/config/avr/stdfix.h \
68 stdfix-gcc.h
69
70stdfix-gcc.h: $(srcdir)/ginclude/stdfix.h
71 -cp $< $@
72
884f56d1 73# Files and Variables auto-generated from avr-mcus.def
59ab92d2 74
884f56d1 75AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
90e7678c 76
4a176b23
GJL
77# Run `avr-mcus' after you changed or added devices in avr-mcus.def
78
79.PHONY: avr-mcus
80
af73373e 81avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
4a176b23 82
4a2caf6c 83# Make sure that native -mmcu= support is in sync with -mmcu= documentation.
e53b6e56
ML
84gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
85 $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
e3cf7a95
GJL
86 $(srcdir)/config/avr/avr-arch.h
87 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
04d170d2 88
e53b6e56
ML
89gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
90 $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
38822076
GJL
91 $(srcdir)/config/avr/avr-arch.h $(TM_H)
92 $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
f9d29866 93
4a176b23
GJL
94$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
95 $(RUN_GEN) ./$< > $@
04d170d2 96
f9d29866
JR
97s-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
101
102GCC_PASSES+=s-device-specs
103
104install-driver: install-device-specs
105
106install-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 \
4a2caf6c 110 $(INSTALL_DATA) $${file} $(DESTDIR)$(libsubdir)/$${file}; \
f9d29866
JR
111 done
112
6aea3c37 113# Get multilib layout
884f56d1
GJL
114# MULTILIB_OPTIONS
115# MULTILIB_DIRNAMES
6aea3c37 116# MULTILIB_REQUIRED
29f3def3 117# MULTILIB_REUSE
884f56d1 118
29f3def3 119multilib.h Makefile s-mlib: t-multilib-avr
884f56d1 120
29f3def3 121t-multilib-avr: $(srcdir)/config/avr/genmultilib.awk \
4a176b23 122 $(AVR_MCUS)
5b01f1a5
GJL
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) \
711084c9 130 -v with_multilib_list=$(TM_MULTILIB_CONFIG) \
29f3def3
GJL
131 -f $< $< $(AVR_MCUS) > $@
132
133include t-multilib-avr