2011-10-08 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / objcp / Make-lang.in
blob3dac1735e157445aa6293a9f8463b62dcad3626d
1 # Top level -*- makefile -*- fragment for GNU Objective-C++
2 #   Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011
3 #   Free Software Foundation, Inc.
4 #   Contributed by Ziemowit Laski  <zlaski@apple.com>
6 #This file is part of GCC.
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.
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.
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/>.
23 # This file provides the language dependent support in the main Makefile.
24 # Each language makefile fragment must provide the following targets:
26 # foo.all.cross, foo.start.encap, foo.rest.encap,
27 # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
28 # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
29 # foo.mostlyclean, foo.clean, foo.distclean,
30 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
32 # where `foo' is the name of the language.
34 # It should also provide rules for:
36 # - making any compiler driver (eg: g++)
37 # - the compiler proper (eg: cc1plus)
38 # - define the names for selecting the language in LANGUAGES.
40 #\f
41 # Define the names for selecting Objective-C++ in LANGUAGES.
42 obj-c++: cc1objplus$(exeext)
44 # Tell GNU make to ignore these if they exist.
45 .PHONY: obj-c++
47 START_HDRS = $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \
48   $(CXX_PARSER_H) $(CXX_PRETTY_PRINT_H) langhooks.h c-family/c-objc.h objc/objc-act.h
50 # Use maximal warnings for this front end.  Also, make ObjC and C++
51 # headers accessible.
52 objcp-warn = $(STRICT_WARN) -DOBJCPLUS -I$(srcdir)/objc -I$(srcdir)/cp
54 # Language-specific object files for Objective C++.
55 OBJCXX_OBJS = objcp/objcp-act.o objcp/objcp-lang.o objcp/objcp-decl.o \
56    objcp/objc-runtime-shared-support.o \
57    objcp/objc-gnu-runtime-abi-01.o \
58    objcp/objc-next-runtime-abi-01.o \
59    objcp/objc-next-runtime-abi-02.o \
60    objcp/objc-encoding.o \
61    $(CXX_AND_OBJCXX_OBJS)
63 obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o
65 cc1objplus-checksum.c : build/genchecksum$(build_exeext) checksum-options \
66         $(OBJCXX_OBJS) $(BACKEND) $(LIBDEPS)
67         build/genchecksum$(build_exeext) $(OBJCXX_OBJS) $(BACKEND) \
68                 $(LIBDEPS) checksum-options > cc1objplus-checksum.c.tmp && \
69         $(srcdir)/../move-if-change cc1objplus-checksum.c.tmp \
70         cc1objplus-checksum.c
72 cc1objplus-checksum.o : cc1objplus-checksum.c $(CONFIG_H) $(SYSTEM_H)
74 cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
75         +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
76                 $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
78 # Objective C++ language specific files.
80 objcp/objcp-lang.o : objcp/objcp-lang.c \
81   $(START_HDRS) \
82   $(GGC_H) \
83   $(C_COMMON_H) $(LANGHOOKS_DEF_H) cp/cp-objcp-common.h \
84   $(TARGET_H) gtype-objcp.h
86 objcp/objcp-decl.o : objcp/objcp-decl.c \
87    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \
88    objc/objc-act.h c-family/c-objc.h \
89    objcp/objcp-decl.h
91 objcp/objc-runtime-shared-support.o : objc/objc-runtime-shared-support.c \
92    gt-objc-objc-runtime-shared-support.h \
93    $(START_HDRS) \
94    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
95    objc/objc-encoding.h \
96    objc/objc-next-metadata-tags.h \
97    objc/objc-runtime-shared-support.h \
98    objcp/objcp-decl.h
99         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
100                 $(OUTPUT_OPTION)
102 objcp/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c \
103    gt-objc-objc-gnu-runtime-abi-01.h \
104    $(START_HDRS) \
105    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
106    toplev.h \
107    objc/objc-encoding.h \
108    objc/objc-runtime-hooks.h \
109    objc/objc-runtime-shared-support.h \
110    objcp/objcp-decl.h
111         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
112                 $(OUTPUT_OPTION)
114 objcp/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c \
115    gt-objc-objc-next-runtime-abi-01.h \
116    $(START_HDRS) \
117    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
118    $(TARGET_H) output.h \
119    objc/objc-encoding.h \
120    objc/objc-next-metadata-tags.h \
121    objc/objc-runtime-hooks.h \
122    objc/objc-runtime-shared-support.h \
123    objcp/objcp-decl.h
124         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
125                 $(OUTPUT_OPTION)
127 objcp/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c \
128    gt-objc-objc-next-runtime-abi-02.h \
129    $(START_HDRS) \
130    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
131    $(TARGET_H) \
132    objc/objc-encoding.h \
133    objc/objc-next-metadata-tags.h \
134    objc/objc-runtime-hooks.h \
135    objc/objc-runtime-shared-support.h \
136    objcp/objcp-decl.h
137         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
138                 $(OUTPUT_OPTION)
141 # The following must be an explicit rule; please keep in sync with the implicit
142 # one in Makefile.in.
143 objcp/objcp-act.o : objc/objc-act.c \
144    gt-objc-objc-act.h \
145    $(START_HDRS) \
146    $(GGC_H) $(DIAGNOSTIC_H) $(FLAGS_H) input.h \
147    toplev.h $(FUNCTION_H) output.h debug.h $(LANGHOOKS_DEF_H) \
148    $(HASHTAB_H) $(GIMPLE_H) \
149    $(RTL_H) $(EXPR_H) $(TARGET_H) \
150    objcp/objcp-decl.h \
151    objc/objc-encoding.h \
152    objc/objc-runtime-hooks.h \
153    objc/objc-runtime-shared-support.h \
154    objcp/objcp-decl.h
155         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
156                 $(OUTPUT_OPTION)
158 objcp/objc-encoding.o : objc/objc-encoding.c \
159    $(START_HDRS) \
160    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
161    $(OBSTACK_H) \
162    objc/objc-encoding.h \
163    objc/objc-runtime-shared-support.h \
164    objcp/objcp-decl.h
165         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
166                 $(OUTPUT_OPTION)
168 po-generated:
171 # Build hooks:
173 obj-c++.all.cross:
174 obj-c++.start.encap:
175 obj-c++.rest.encap:
176 obj-c++.info:
177 obj-c++.install-info:
178 obj-c++.dvi:
179 obj-c++.pdf:
180 obj-c++.install-pdf:
181 obj-c++.html:
182 obj-c++.install-html:
183 obj-c++.srcinfo:
184 obj-c++.srcextra:
185 obj-c++.man:
186 obj-c++.install-plugin:
188 obj-c++.tags: force
189         cd $(srcdir)/objcp; etags -o TAGS.sub *.c *.h; \
190         etags --include TAGS.sub --include ../TAGS.sub
192 lang_checks += check-obj-c++
195 # Install hooks:
196 # cc1objplus is installed elsewhere as part of $(COMPILERS).
198 obj-c++.install-common:
200 obj-c++.install-man:
202 obj-c++.uninstall:
204 # Clean hooks:
205 # A lot of the ancillary files are deleted by the main makefile.
206 # We just have to delete files specific to us.
207 obj-c++.mostlyclean:
208         -rm -f objcp/*$(objext)
209         -rm -f objcp/*$(coverageexts)
210 obj-c++.clean: obj-c++.mostlyclean
211 obj-c++.distclean:
212         -rm -f objcp/config.status objcp/Makefile
213 obj-c++.maintainer-clean:
216 # Stage hooks:
218 obj-c++.stage1: stage1-start
219         -mv objcp/*$(objext) stage1/objcp
220 obj-c++.stage2: stage2-start
221         -mv objcp/*$(objext) stage2/objcp
222 obj-c++.stage3: stage3-start
223         -mv objcp/*$(objext) stage3/objcp
224 obj-c++.stage4: stage4-start
225         -mv objcp/*$(objext) stage4/objcp
226 obj-c++.stageprofile: stageprofile-start
227         -mv objcp/*$(objext) stageprofile/objcp
228 obj-c++.stagefeedback: stagefeedback-start
229         -mv objcp/*$(objext) stagefeedback/objcp