OSDN Git Service

Add - before rms to be more portable.
[pf3gnuchains/gcc-fork.git] / gcc / objc / Make-lang.in
1 # Top level makefile fragment for GNU Objective-C
2 #   Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
3
4 #This file is part of GNU CC.
5
6 #GNU CC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
9 #any later version.
10
11 #GNU CC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #GNU General Public License for more details.
15
16 #You should have received a copy of the GNU General Public License
17 #along with GNU CC; see the file COPYING.  If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330,
19 #Boston, MA 02111-1307, USA.
20
21 # This file provides the language dependent support in the main Makefile.
22 # Each language makefile fragment must provide the following targets:
23 #
24 # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
25 # foo.info, foo.dvi,
26 # foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
27 # foo.uninstall,
28 # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
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 OBJC objc: cc1obj$(exeext)
42 OBJECTIVE-C objective-c: cc1obj$(exeext)
43
44 # Tell GNU make to ignore these if they exist.
45 .PHONY: objective-c objc ObjC
46
47 # Use maximal warnings for this front end.
48 objc-warn = $(STRICT_WARN)
49
50 # Language-specific object files for Objective C.
51 OBJC_OBJS = objc-parse.o objc-act.o $(C_AND_OBJC_OBJS)
52
53 cc1obj$(exeext): $(OBJC_OBJS) $(BACKEND) $(LIBDEPS)
54         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(BACKEND) $(LIBS)
55
56 # Objective C language specific files.
57
58 objc-parse.o : $(srcdir)/objc/objc-parse.c \
59    $(CONFIG_H) $(TREE_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \
60    $(srcdir)/c-lex.h $(srcdir)/c-tree.h $(srcdir)/c-common.h \
61    $(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \
62    $(srcdir)/objc/objc-act.h system.h cpplib.h
63         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
64         -c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION)
65
66 $(INTL_TARGETS): $(srcdir)/objc/objc-parse.c
67 $(srcdir)/objc/objc-parse.c : $(srcdir)/objc/objc-parse.y
68         cd $(srcdir)/objc; \
69         $(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; \
70         mv -f op$$$$.c objc-parse.c
71
72 $(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in
73         echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y
74         sed -e "/^ifc$$/,/^end ifc$$/d" \
75           -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
76           $(srcdir)/c-parse.in >>tmp-objc-prs.y
77         $(SHELL) $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc/objc-parse.y
78
79 objc-act.o : $(srcdir)/objc/objc-act.c \
80    $(CONFIG_H) $(TREE_H) $(RTL_H) system.h $(EXPR_H) \
81    $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \
82    $(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \
83    $(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h
84         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
85         -c $(srcdir)/objc/objc-act.c
86
87 #\f
88 # Build hooks:
89
90 objc.all.build:
91 objc.all.cross:
92 objc.start.encap:
93 objc.rest.encap:
94
95 objc.info:
96 objc.dvi:
97
98 #\f
99 # Install hooks:
100 # cc1obj is installed elsewhere as part of $(COMPILERS).
101
102 objc.install-normal:
103
104 objc.install-common:
105
106 objc.install-info:
107
108 objc.install-man:
109
110 objc.uninstall:
111 #\f
112 # Clean hooks:
113 # A lot of the ancillary files are deleted by the main makefile.
114 # We just have to delete files specific to us.
115 objc.mostlyclean:
116         -rm -f tmp-objc-prs.y
117         -rm -f objc/*$(objext) objc/xforward objc/fflags
118 objc.clean: objc.mostlyclean
119         -rm -rf objc-headers
120 objc.distclean:
121         -rm -f objc/Makefile objc/Make-host objc/Make-target
122         -rm -f objc/config.status objc/config.cache
123         -rm -f objc-parse.output
124 objc.extraclean:
125 objc.maintainer-clean:
126         -rm -f $(srcdir)/objc/objc-parse.y
127         -rm -f $(srcdir)/objc/objc-parse.c $(srcdir)/objc/objc-parse.output
128
129 #\f
130 # Stage hooks:
131
132 objc.stage1: stage1-start
133         -mv objc/*$(objext) stage1/objc
134         -mv cc1obj$(exeext) stage1
135 objc.stage2: stage2-start
136         -mv objc/*$(objext) stage2/objc
137         -mv cc1obj$(exeext) stage2
138 objc.stage3: stage3-start
139         -mv objc/*$(objext) stage3/objc
140         -mv cc1obj$(exeext) stage3
141 objc.stage4: stage4-start
142         -mv objc/*$(objext) stage4/objc
143         -mv cc1obj$(exeext) stage4