]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c/Make-lang.in
re PR c++/54427 (Expose more vector extensions)
[thirdparty/gcc.git] / gcc / c / Make-lang.in
1 # Top level -*- makefile -*- fragment for GNU C - C language.
2 # Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2007, 2008, 2009, 2010, 2011, 2012
4 # Free Software Foundation, Inc.
5
6 #This file is part of GCC.
7
8 #GCC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 3, or (at your option)
11 #any later version.
12
13 #GCC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with GCC; see the file COPYING3. If not see
20 # <http://www.gnu.org/licenses/>.
21
22 # This file provides the language dependent support in the main Makefile.
23 # Each language makefile fragment must provide the following targets:
24 #
25 # foo.all.cross, foo.start.encap, foo.rest.encap,
26 # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
27 # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
28 # foo.mostlyclean, foo.clean, foo.distclean,
29 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
30 #
31 # where `foo' is the name of the language.
32 #
33 # It should also provide rules for:
34 #
35 # - making any compiler driver (eg: gcc)
36 # - the compiler proper (eg: cc1)
37 # - define the names for selecting the language in LANGUAGES.
38
39 #\f
40 # Define the names for selecting c in LANGUAGES.
41 c: cc1$(exeext)
42
43 # Tell GNU make to ignore these if they exist.
44 .PHONY: c gcc
45
46 # The C front end driver. This is different from the drivers for other
47 # front ends, because there is no C language specific driver (i.e. nothing
48 # is to cc1 as e.g. g++ is to cc1plus, or gfortran is to f951).
49 c/gccspec.o: c/gccspec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \
50 $(OPTS_H)
51 (SHLIB='$(SHLIB)'; \
52 $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
53 $(DRIVER_DEFINES) \
54 -c $(srcdir)/c/gccspec.c $(OUTPUT_OPTION))
55
56 # The C compiler itself.
57
58 # Language-specific object files for C and Objective C.
59 C_AND_OBJC_OBJS = attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o \
60 c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o \
61 $(C_COMMON_OBJS) $(C_TARGET_OBJS)
62
63 # Language-specific object files for C.
64 C_OBJS = c/c-lang.o c-family/stub-objc.o $(C_AND_OBJC_OBJS)
65 c_OBJS = $(C_OBJS) cc1-checksum.o c/gccspec.o
66
67 # Use strict warnings for this front end.
68 c-warn = $(STRICT_WARN)
69
70 # compute checksum over all object files and the options
71 cc1-checksum.c : build/genchecksum$(build_exeext) checksum-options \
72 $(C_OBJS) $(BACKEND) $(LIBDEPS)
73 build/genchecksum$(build_exeext) $(C_OBJS) $(BACKEND) $(LIBDEPS) \
74 checksum-options > cc1-checksum.c.tmp && \
75 $(srcdir)/../move-if-change cc1-checksum.c.tmp cc1-checksum.c
76
77 cc1-checksum.o : cc1-checksum.c $(CONFIG_H) $(SYSTEM_H)
78
79 cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
80 +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
81 cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
82 #\f
83 # Build hooks:
84
85 c.info:
86 c.dvi:
87 c.pdf:
88 c.html:
89 c.install-info:
90 c.install-pdf:
91 c.install-html:
92 c.all.cross:
93 c.start.encap:
94 c.rest.encap:
95 c.srcinfo:
96 c.srcextra: gengtype-lex.c
97 -cp -p $^ $(srcdir)
98 c.tags: force
99 cd $(srcdir)/c; etags -o TAGS.sub *.c *.h; \
100 etags --include TAGS.sub --include ../TAGS.sub
101 c.man:
102 c.srcman:
103
104 # List of targets that can use the generic check- rule and its // variant.
105 lang_checks += check-gcc
106 lang_checks_parallelized += check-gcc
107
108 # 'make check' in gcc/ looks for check-c. Redirect it to check-gcc.
109 check-c : check-gcc
110
111 #\f
112 # Install hooks:
113 # cc1 is installed elsewhere as part of $(COMPILERS).
114
115 c.install-common:
116 c.install-man:
117 c.install-plugin:
118 c.uninstall:
119
120 #\f
121 # Clean hooks:
122 # A lot of the ancillary files are deleted by the main makefile.
123 # We just have to delete files specific to us.
124
125 c.mostlyclean:
126 -rm -f cc1$(exeext)
127 -rm -f c/*$(objext)
128 -rm -f c/*$(coverageexts)
129 c.clean:
130 c.distclean:
131 -rm -f c/config.status c/Makefile
132 c.maintainer-clean:
133 #\f
134 # Stage hooks:
135 # The main makefile has already created stage?/cp.
136
137 c.stage1: stage1-start
138 -mv c/*$(objext) stage1/c
139 c.stage2: stage2-start
140 -mv c/*$(objext) stage2/c
141 c.stage3: stage3-start
142 -mv c/*$(objext) stage3/c
143 c.stage4: stage4-start
144 -mv c/*$(objext) stage4/c
145 c.stageprofile: stageprofile-start
146 -mv c/*$(objext) stageprofile/c
147 c.stagefeedback: stagefeedback-start
148 -mv c/*$(objext) stagefeedback/c
149
150 #\f
151 # .o: .h dependencies.
152 # C language specific files.
153 C_TREE_H = c/c-tree.h $(C_COMMON_H) $(DIAGNOSTIC_H)
154 c/c-aux-info.o : c/c-aux-info.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
155 $(C_TREE_H) $(TREE_H) $(FLAGS_H)
156
157 c/c-convert.o : c/c-convert.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
158 $(TREE_H) $(C_TREE_H) $(FLAGS_H) $(C_COMMON_H) convert.h \
159 langhooks.h $(TARGET_H)
160
161 c/c-decl.o : c/c-decl.c c/c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
162 $(TREE_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) \
163 output.h debug.h toplev.h intl.h $(TM_P_H) $(TREE_INLINE_H) \
164 $(TIMEVAR_H) $(OPTS_H) $(C_PRAGMA_H) gt-c-c-decl.h $(CGRAPH_H) \
165 $(HASHTAB_H) $(LANGHOOKS_DEF_H) \
166 dumpfile.h $(C_COMMON_H) $(CPPLIB_H) $(DIAGNOSTIC_CORE_H) \
167 $(INPUT_H) langhooks.h pointer-set.h tree-iterator.h \
168 $(PLUGIN_H) c-family/c-ada-spec.h c-family/c-objc.h
169
170 c/c-errors.o: c/c-errors.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
171 $(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) $(TM_P_H)
172
173 c/c-lang.o : c/c-lang.c c/c-objc-common.h \
174 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
175 $(C_TREE_H) $(DIAGNOSTIC_CORE_H) \
176 langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-c.h \
177 $(C_PRAGMA_H) $(TREE_INLINE_H)
178
179 c/c-objc-common.o : c/c-objc-common.c c/c-objc-common.h \
180 $(CONFIG_H) $(SYSTEM_H) coretypes.h \
181 $(TREE_H) $(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) \
182 langhooks.h $(GGC_H) $(C_PRETTY_PRINT_H) intl.h \
183 $(TREE_PRETTY_PRINT_H)
184
185 c/c-parser.o : c/c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
186 $(TM_H) $(TREE_H) $(C_TREE_H) $(C_COMMON_H) $(C_PRAGMA_H) $(CPPLIB_H) \
187 $(GGC_H) $(TIMEVAR_H) $(INPUT_H) $(FLAGS_H) \
188 gt-c-c-parser.h langhooks.h \
189 $(VEC_H) $(TARGET_H) $(CGRAPH_H) $(PLUGIN_H) \
190 c-family/c-objc.h
191
192 c/c-typeck.o : c/c-typeck.c c/c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
193 $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h \
194 langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H) \
195 c-family/c-objc.h c-family/c-common.h
196