t-avr (gen-avr-mmcu-texi): Use $(CC) to compile gen-avr-mmcu-texi.c.
[platform/upstream/gcc.git] / gcc / config / avr / t-avr
1 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2 # 2009, 2010, 2011 Free Software Foundation, Inc.
3 #
4 # This file is part of GCC.
5 #
6 # GCC is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
10 #
11 # GCC is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with GCC; see the file COPYING3.  If not see
18 # <http://www.gnu.org/licenses/>.
19
20 driver-avr.o: $(srcdir)/config/avr/driver-avr.c \
21   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
22         $(COMPILER) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
23
24 avr-devices.o: $(srcdir)/config/avr/avr-devices.c \
25   $(srcdir)/config/avr/avr-mcus.def \
26   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
27         $(COMPILER) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
28
29 avr-c.o: $(srcdir)/config/avr/avr-c.c \
30   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H)
31         $(COMPILER) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
32
33 avr-log.o: $(srcdir)/config/avr/avr-log.c \
34   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H) dumpfile.h
35         $(COMPILER) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
36
37 avr.o avr-c.o: $(srcdir)/config/avr/builtins.def
38
39 # Files and Variables auto-generated from avr-mcus.def
40
41 AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
42
43 $(srcdir)/config/avr/avr-tables.opt: $(srcdir)/config/avr/genopt.sh $(AVR_MCUS)
44         $(SHELL) $< $(AVR_MCUS) > $@
45
46 gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.c \
47   $(TM_H) $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c
48         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< -o $@
49
50 # Make sure that the -mmcu= documentation is in sync with the compiler.
51 $(srcdir)/doc/avr-mmcu.texi: s-avr-mmcu-texi; @true
52
53 # invoke.texi @includes avr-mmcu.texi.  Put this dependency here instead
54 # of in the global Makefile so that developers of other backends are not
55 # bothered with AVR stuff. 
56 $(srcdir)/doc/invoke.texi: $(srcdir)/doc/avr-mmcu.texi
57
58 # Ensure that device support is in sync with -mmcu= documentation.
59 s-avr-mmcu-texi: gen-avr-mmcu-texi$(build_exeext)
60         $(RUN_GEN) ./$< > tmp-avr-mmcu.texi
61         $(SHELL) $(srcdir)/../move-if-change tmp-avr-mmcu.texi avr-mmcu.texi
62         @if cmp -s $(srcdir)/doc/avr-mmcu.texi avr-mmcu.texi; then \
63           $(STAMP) $@;          \
64         else                    \
65           echo >&2 ;            \
66           echo "***" >&2 ;      \
67           echo "*** Verify that you have permission to grant a" >&2 ;   \
68           echo "*** GFDL license for all new text in" >&2 ;             \
69           echo "*** avr-mmcu.texi, then copy it to $(srcdir)/doc/avr-mmcu.texi" >&2 ; \
70           echo "***" >&2 ;      \
71           false;                \
72         fi
73
74 # MULTILIB_OPTIONS
75 # MULTILIB_DIRNAMES
76 # MULTILIB_EXCEPTIONS
77 # MULTILIB_MATCHES
78 $(srcdir)/config/avr/t-multilib: s-avr-mlib; @true
79
80 s-mlib: $(srcdir)/config/avr/t-multilib
81
82 s-avr-mlib: $(srcdir)/config/avr/genmultilib.awk $(AVR_MCUS)
83         $(AWK) -f $< -v FORMAT=Makefile   $< $(AVR_MCUS) > tmp-avr-mlib
84         $(SHELL) $(srcdir)/../move-if-change \
85                 tmp-avr-mlib    $(srcdir)/config/avr/t-multilib
86         $(STAMP) $@