OSDN Git Service

2008-11-07 Sebastian Pop <sebastian.pop@amd.com>
[pf3gnuchains/gcc-fork.git] / gcc / objcp / Make-lang.in
1 # Top level -*- makefile -*- fragment for GNU Objective-C++
2 #   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
3 #   Contributed by Ziemowit Laski  <zlaski@apple.com>
4
5 #This file is part of GCC.
6
7 #GCC is free software; you can redistribute it and/or modify
8 #it under the terms of the GNU General Public License as published by
9 #the Free Software Foundation; either version 3, or (at your option)
10 #any later version.
11
12 #GCC is distributed in the hope that it will be useful,
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #GNU General Public License for more details.
16
17 #You should have received a copy of the GNU General Public License
18 #along with GCC; see the file COPYING3.  If not see
19 #<http://www.gnu.org/licenses/>.
20
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.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: g++)
36 # - the compiler proper (eg: cc1plus)
37 # - define the names for selecting the language in LANGUAGES.
38
39 #\f
40 # Define the names for selecting Objective-C++ in LANGUAGES.
41 obj-c++: cc1objplus$(exeext)
42
43 # Tell GNU make to ignore these if they exist.
44 .PHONY: obj-c++
45
46 # Use maximal warnings for this front end.  Also, make ObjC and C++
47 # headers accessible.
48 objcp-warn = $(STRICT_WARN) -DOBJCPLUS -I$(srcdir)/objc -I$(srcdir)/cp
49
50 # Language-specific object files for Objective C++.
51 OBJCXX_OBJS = objcp/objcp-act.o objcp/objcp-lang.o objcp/objcp-decl.o \
52    $(CXX_AND_OBJCXX_OBJS)
53
54 obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o
55
56 cc1objplus-dummy$(exeext): $(OBJCXX_OBJS) dummy-checksum.o $(BACKEND) \
57                 $(LIBDEPS)
58         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
59                 $(OBJCXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
60
61 cc1objplus-checksum.c : cc1objplus-dummy$(exeext) build/genchecksum$(build_exeext)
62         build/genchecksum$(build_exeext) cc1objplus-dummy$(exeext) > $@
63
64 cc1objplus-checksum.o : cc1objplus-checksum.c
65
66 cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
67         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
68                 $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
69
70 # Objective C++ language specific files.
71
72 objcp/objcp-lang.o : objcp/objcp-lang.c \
73   $(CXX_TREE_H) $(TM_H) toplev.h debug.h langhooks.h objc/objc-act.h \
74   $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objcp.h \
75   $(DIAGNOSTIC_H) cp/cp-objcp-common.h $(GIMPLE_H)
76
77 objcp/objcp-decl.o : objcp/objcp-decl.c \
78    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
79    toplev.h $(GGC_H) $(C_PRAGMA_H) input.h $(FLAGS_H) output.h \
80    objc/objc-act.h objcp/objcp-decl.h $(GIMPLE_H) $(EXPR_H) $(TARGET_H)
81
82 # The following must be an explicit rule; please keep in sync with the implicit
83 # one in Makefile.in.
84 objcp/objcp-act.o : objc/objc-act.c \
85    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
86    $(EXPR_H) $(TARGET_H) $(CXX_TREE_H) $(DIAGNOSTIC_H) toplev.h $(FLAGS_H) \
87    objc/objc-act.h input.h $(FUNCTION_H) output.h debug.h langhooks.h \
88    objcp/objcp-decl.h $(LANGHOOKS_DEF_H) $(HASHTAB_H) gt-objc-objc-act.h \
89    $(GIMPLE_H)
90         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
91
92 po-generated:
93
94 #\f
95 # Build hooks:
96
97 obj-c++.all.cross:
98 obj-c++.start.encap:
99 obj-c++.rest.encap:
100 obj-c++.info:
101 obj-c++.install-info:
102 obj-c++.dvi:
103 obj-c++.pdf:
104 obj-c++.install-pdf:
105 obj-c++.html:
106 obj-c++.srcinfo:
107 obj-c++.srcextra:
108 obj-c++.man:
109
110 obj-c++.tags: force
111         cd $(srcdir)/objcp; etags -o TAGS.sub *.y *.c *.h; \
112         etags --include TAGS.sub --include ../TAGS.sub
113
114 lang_checks += check-obj-c++
115
116 #\f
117 # Install hooks:
118 # cc1objplus is installed elsewhere as part of $(COMPILERS).
119
120 obj-c++.install-common:
121
122 obj-c++.install-man:
123
124 obj-c++.uninstall:
125 #\f
126 # Clean hooks:
127 # A lot of the ancillary files are deleted by the main makefile.
128 # We just have to delete files specific to us.
129 obj-c++.mostlyclean:
130         -rm -f objcp/*$(objext)
131         -rm -f objcp/*$(coverageexts)
132 obj-c++.clean: obj-c++.mostlyclean
133 obj-c++.distclean:
134         -rm -f objcp/config.status objcp/Makefile
135 obj-c++.maintainer-clean:
136
137 #\f
138 # Stage hooks:
139
140 obj-c++.stage1: stage1-start
141         -mv objcp/*$(objext) stage1/objcp
142 obj-c++.stage2: stage2-start
143         -mv objcp/*$(objext) stage2/objcp
144 obj-c++.stage3: stage3-start
145         -mv objcp/*$(objext) stage3/objcp
146 obj-c++.stage4: stage4-start
147         -mv objcp/*$(objext) stage4/objcp
148 obj-c++.stageprofile: stageprofile-start
149         -mv objcp/*$(objext) stageprofile/objcp
150 obj-c++.stagefeedback: stagefeedback-start
151         -mv objcp/*$(objext) stagefeedback/objcp