OSDN Git Service

* install.tex: Document profiledbootstrap.
[pf3gnuchains/gcc-fork.git] / gcc / objc / Make-lang.in
1 # Top level -*- makefile -*- fragment for GNU Objective-C
2 #   Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003
3 #   Free Software Foundation, Inc.
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 2, 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 COPYING.  If not, write to
19 #the Free Software Foundation, 59 Temple Place - Suite 330,
20 #Boston, MA 02111-1307, USA.
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.build, foo.all.cross, foo.start.encap, foo.rest.encap,
26 # foo.info, foo.dvi,
27 # foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
28 # foo.uninstall,
29 # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
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 OBJC objc: cc1obj$(exeext)
43 OBJECTIVE-C objective-c: cc1obj$(exeext)
44
45 # Tell GNU make to ignore these if they exist.
46 .PHONY: objective-c objc ObjC
47
48 # Use maximal warnings for this front end.
49 objc-warn = $(STRICT_WARN)
50 # Bison-1.75 output yields (harmless) -Wtraditional warnings
51 objc/objc-parse.o-warn = -Wno-error
52
53 # Language-specific object files for Objective C.
54 OBJC_OBJS = objc/objc-lang.o objc/objc-parse.o objc/objc-act.o
55
56 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS)
57         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
58                 $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBS)
59
60 # Objective C language specific files.
61
62 objc/objc-lang.o : objc/objc-lang.c \
63    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) c-tree.h \
64    c-common.h toplev.h objc/objc-act.h langhooks.h $(LANGHOOKS_DEF_H)
65
66 objc/objc-parse.o : $(parsedir)/objc/objc-parse.c \
67    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
68    toplev.h $(GGC_H) c-pragma.h input.h flags.h output.h objc/objc-act.h
69
70 objc/objc-act.o : objc/objc-act.c \
71    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(EXPR_H) \
72    $(TARGET_H) $(C_TREE_H) diagnostic.h toplev.h flags.h objc/objc-act.h \
73    input.h function.h output.h debug.h langhooks.h $(LANGHOOKS_DEF_H) \
74    gt-objc-objc-act.h gtype-objc.h
75
76 po-generated: $(parsedir)/objc/objc-parse.c
77 $(parsedir)/objc/objc-parse.c : $(parsedir)/objc/objc-parse.y
78         cd $(parsedir)/objc; \
79         if $(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; then \
80           test -f op$$$$.output && mv -f op$$$$.output objc-parse.output ; \
81           mv -f op$$$$.c objc-parse.c ; \
82         else \
83           rm -f op$$$$.* ; \
84           false ; \
85         fi
86
87 $(parsedir)/objc/objc-parse.y: $(srcdir)/c-parse.in
88         echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y
89         sed -e "/^ifc$$/,/^end ifc$$/d" \
90           -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
91           $(srcdir)/c-parse.in >>tmp-objc-prs.y
92         $(SHELL) $(srcdir)/move-if-change tmp-objc-prs.y $(parsedir)/objc/objc-parse.y
93
94 gtype-objc.h : s-gtype ; @true
95 gt-objc-objc-act.h : s-gtype ; @true
96
97 #\f
98 # Build hooks:
99
100 objc.all.build:
101 objc.all.cross:
102 objc.start.encap:
103 objc.rest.encap:
104
105 objc.tags: force
106         cd $(srcdir)/objc; etags *.y *.c *.h
107
108 objc.info:
109 objc.dvi:
110 objc.generated-manpages:
111
112 #\f
113 # Install hooks:
114 # cc1obj is installed elsewhere as part of $(COMPILERS).
115
116 objc.install-normal:
117
118 objc.install-common:
119
120 objc.install-info:
121
122 objc.install-man:
123
124 objc.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 objc.mostlyclean:
130         -rm -f tmp-objc-prs.y
131         -rm -f objc/*$(objext) objc/xforward objc/fflags
132         -rm -f objc/*$(coverageexts)
133 objc.clean: objc.mostlyclean
134         -rm -rf objc-headers
135 objc.distclean:
136         -rm -f objc/Makefile objc/Make-host objc/Make-target
137         -rm -f objc/config.status objc/config.cache
138         -rm -f objc-parse.output
139 objc.extraclean:
140 objc.maintainer-clean:
141         -rm -f $(parsedir)/objc/objc-parse.y
142         -rm -f $(parsedir)/objc/objc-parse.c $(parsedir)/objc/objc-parse.output
143
144 #\f
145 # Stage hooks:
146
147 objc.stage1: stage1-start
148         -mv objc/*$(objext) stage1/objc
149         -mv cc1obj$(exeext) stage1
150 objc.stage2: stage2-start
151         -mv objc/*$(objext) stage2/objc
152         -mv cc1obj$(exeext) stage2
153 objc.stage3: stage3-start
154         -mv objc/*$(objext) stage3/objc
155         -mv cc1obj$(exeext) stage3
156 objc.stage4: stage4-start
157         -mv objc/*$(objext) stage4/objc
158         -mv cc1obj$(exeext) stage4
159 objc.stageprofile: stageprofile-start
160         -mv objc/*$(objext) stageprofile/objc
161         -mv cc1obj$(exeext) stageprofile
162 objc.stagefeedback: stagefeedback-start
163         -mv objc/*$(objext) stagefeedback/objc
164         -mv cc1obj$(exeext) stagefeedback