OSDN Git Service

gcc/ada/
[pf3gnuchains/gcc-fork.git] / gcc / objcp / Make-lang.in
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>
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
23 # This file provides the language dependent support in the main Makefile.
24 # Each language makefile fragment must provide the following targets:
25 #
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
31 #
32 # where `foo' is the name of the language.
33 #
34 # It should also provide rules for:
35 #
36 # - making any compiler driver (eg: g++)
37 # - the compiler proper (eg: cc1plus)
38 # - define the names for selecting the language in LANGUAGES.
39
40 #\f
41 # Define the names for selecting Objective-C++ in LANGUAGES.
42 obj-c++: cc1objplus$(exeext)
43
44 # Tell GNU make to ignore these if they exist.
45 .PHONY: obj-c++
46
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
49
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
53
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    $(CXX_AND_OBJCXX_OBJS)
61
62 obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o
63
64 cc1objplus-checksum.c : build/genchecksum$(build_exeext) checksum-options \
65         $(OBJCXX_OBJS) $(BACKEND) $(LIBDEPS)
66         build/genchecksum$(build_exeext) $(OBJCXX_OBJS) $(BACKEND) \
67                 $(LIBDEPS) checksum-options > cc1objplus-checksum.c.tmp && \
68         $(srcdir)/../move-if-change cc1objplus-checksum.c.tmp \
69         cc1objplus-checksum.c
70
71 cc1objplus-checksum.o : cc1objplus-checksum.c $(CONFIG_H) $(SYSTEM_H)
72
73 cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
74         +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
75                 $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
76
77 # Objective C++ language specific files.
78
79 objcp/objcp-lang.o : objcp/objcp-lang.c $(START_HDRS) \
80   $(C_COMMON_H) $(LANGHOOKS_DEF_H) cp/cp-objcp-common.h \
81   $(TARGET_H) gtype-objcp.h
82
83 objcp/objcp-decl.o : objcp/objcp-decl.c \
84    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \
85    objc/objc-act.h objcp/objcp-decl.h c-family/c-objc.h
86
87 objcp/objc-runtime-shared-support.o : objc/objc-runtime-shared-support.c \
88    $(START_HDRS) objc/objc-runtime-shared-support.h $(OBSTACK_H) \
89    objc/objc-next-metadata-tags.h gt-objc-objc-runtime-shared-support.h
90         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
91                 $(OUTPUT_OPTION)
92
93 objcp/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c $(START_HDRS) \
94    objc/objc-runtime-hooks.h $(GGC_H) \
95    gt-objc-objc-gnu-runtime-abi-01.h toplev.h 
96         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
97                 $(OUTPUT_OPTION)
98
99 objcp/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c $(START_HDRS) \
100    $(GGC_H) objc/objc-runtime-hooks.h \
101    objc/objc-next-metadata-tags.h gt-objc-objc-next-runtime-abi-01.h output.h \
102    objc/objc-runtime-shared-support.h $(TARGET_H)
103         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
104                 $(OUTPUT_OPTION)
105
106 objcp/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c $(START_HDRS) \
107    $(GGC_H) objc/objc-runtime-hooks.h \
108    objc/objc-next-metadata-tags.h gt-objc-objc-next-runtime-abi-02.h $(TARGET_H) \
109    objc/objc-runtime-shared-support.h $(OBSTACK_H)
110         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
111                 $(OUTPUT_OPTION)
112
113
114 # The following must be an explicit rule; please keep in sync with the implicit
115 # one in Makefile.in.
116 objcp/objcp-act.o : objc/objc-act.c $(START_HDRS) $(GGC_H) \
117    $(RTL_H) $(EXPR_H) $(TARGET_H) $(DIAGNOSTIC_H) toplev.h $(FLAGS_H) \
118    input.h $(FUNCTION_H) output.h debug.h $(OBSTACK_H) \
119    objcp/objcp-decl.h $(LANGHOOKS_DEF_H) $(HASHTAB_H) gt-objc-objc-act.h \
120    $(GIMPLE_H) objc/objc-runtime-hooks.h objc/objc-runtime-shared-support.h
121         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
122                 $(OUTPUT_OPTION)
123
124 po-generated:
125
126 #\f
127 # Build hooks:
128
129 obj-c++.all.cross:
130 obj-c++.start.encap:
131 obj-c++.rest.encap:
132 obj-c++.info:
133 obj-c++.install-info:
134 obj-c++.dvi:
135 obj-c++.pdf:
136 obj-c++.install-pdf:
137 obj-c++.html:
138 obj-c++.install-html:
139 obj-c++.srcinfo:
140 obj-c++.srcextra:
141 obj-c++.man:
142 obj-c++.install-plugin:
143
144 obj-c++.tags: force
145         cd $(srcdir)/objcp; etags -o TAGS.sub *.c *.h; \
146         etags --include TAGS.sub --include ../TAGS.sub
147
148 lang_checks += check-obj-c++
149
150 #\f
151 # Install hooks:
152 # cc1objplus is installed elsewhere as part of $(COMPILERS).
153
154 obj-c++.install-common:
155
156 obj-c++.install-man:
157
158 obj-c++.uninstall:
159 #\f
160 # Clean hooks:
161 # A lot of the ancillary files are deleted by the main makefile.
162 # We just have to delete files specific to us.
163 obj-c++.mostlyclean:
164         -rm -f objcp/*$(objext)
165         -rm -f objcp/*$(coverageexts)
166 obj-c++.clean: obj-c++.mostlyclean
167 obj-c++.distclean:
168         -rm -f objcp/config.status objcp/Makefile
169 obj-c++.maintainer-clean:
170
171 #\f
172 # Stage hooks:
173
174 obj-c++.stage1: stage1-start
175         -mv objcp/*$(objext) stage1/objcp
176 obj-c++.stage2: stage2-start
177         -mv objcp/*$(objext) stage2/objcp
178 obj-c++.stage3: stage3-start
179         -mv objcp/*$(objext) stage3/objcp
180 obj-c++.stage4: stage4-start
181         -mv objcp/*$(objext) stage4/objcp
182 obj-c++.stageprofile: stageprofile-start
183         -mv objcp/*$(objext) stageprofile/objcp
184 obj-c++.stagefeedback: stagefeedback-start
185         -mv objcp/*$(objext) stagefeedback/objcp