This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / objc / Make-lang.in
blob5d88a44c50e7be081bd78d8698dfe9415083c7ff
1 # Top level -*- makefile -*- fragment for GNU Objective-C
2 #   Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003
3 #   Free Software Foundation, Inc.
5 #This file is part of GCC.
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.
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.
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.
22 # This file provides the language dependent support in the main Makefile.
23 # Each language makefile fragment must provide the following targets:
25 # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
26 # foo.install-normal, foo.install-common, foo.install-man,
27 # foo.uninstall,
28 # foo.mostlyclean, foo.clean, foo.distclean,
29 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
31 # where `foo' is the name of the language.
33 # It should also provide rules for:
35 # - making any compiler driver (eg: g++)
36 # - the compiler proper (eg: cc1plus)
37 # - define the names for selecting the language in LANGUAGES.
39 #\f
40 # Define the names for selecting Objective-C in LANGUAGES.
41 OBJC objc: cc1obj$(exeext)
42 OBJECTIVE-C objective-c: cc1obj$(exeext)
44 # Tell GNU make to ignore these if they exist.
45 .PHONY: objective-c objc ObjC
47 # Use maximal warnings for this front end.
48 objc-warn = $(STRICT_WARN)
49 # Bison-1.75 output yields (harmless) -Wtraditional warnings
50 objc/objc-parse.o-warn = -Wno-error
52 # Language-specific object files for Objective C.
53 OBJC_OBJS = objc/objc-lang.o objc/objc-parse.o objc/objc-act.o
55 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS)
56         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
57                 $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBS)
59 # Objective C language specific files.
61 objc/objc-lang.o : objc/objc-lang.c \
62    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) c-tree.h \
63    c-common.h toplev.h objc/objc-act.h langhooks.h $(LANGHOOKS_DEF_H)
65 objc/objc-parse.o : objc/objc-parse.c \
66    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
67    toplev.h $(GGC_H) c-pragma.h input.h flags.h output.h objc/objc-act.h
69 objc/objc-act.o : objc/objc-act.c \
70    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
71    $(EXPR_H) $(TARGET_H) $(C_TREE_H) diagnostic.h toplev.h flags.h \
72    objc/objc-act.h input.h function.h output.h debug.h langhooks.h \
73    $(LANGHOOKS_DEF_H) gt-objc-objc-act.h gtype-objc.h
75 objc.srcextra: objc/objc-parse.c objc/objc-parse.y
76         -cp -p $^ $(srcdir)/objc
78 objc/objc-parse.c : objc/objc-parse.y
79         -$(BISON) $(BISONFLAGS) -o $@ $<
81 objc/objc-parse.y: c-parse.in
82         echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y
83         sed -e "/^@@ifc.*/,/^@@end_ifc.*/d" \
84             -e "/^@@ifobjc.*/d" -e "/^@@end_ifobjc.*/d" < $< >>tmp-objc-prs.y
85         $(SHELL) $(srcdir)/move-if-change tmp-objc-prs.y $@
87 gtype-objc.h : s-gtype ; @true
88 gt-objc-objc-act.h : s-gtype ; @true
90 #\f
91 # Build hooks:
93 objc.all.build:
94 objc.all.cross:
95 objc.start.encap:
96 objc.rest.encap:
97 objc.info:
98 objc.man:
99 objc.srcinfo:
100 objc.srcman:
102 objc.tags: force
103         cd $(srcdir)/objc; etags -o TAGS.sub *.y *.c *.h; \
104         etags --include TAGS.sub --include ../TAGS.sub
106 lang_checks += check-objc
109 # Install hooks:
110 # cc1obj is installed elsewhere as part of $(COMPILERS).
112 objc.install-normal:
114 objc.install-common:
116 objc.install-man:
118 objc.uninstall:
120 # Clean hooks:
121 # A lot of the ancillary files are deleted by the main makefile.
122 # We just have to delete files specific to us.
123 objc.mostlyclean:
124         -rm -f tmp-objc-prs.y
125         -rm -f objc/*$(objext) objc/xforward objc/fflags
126         -rm -f objc/objc-parse.y objc/objc-parse.c objc/objc-parse.output
127         -rm -f objc/*$(coverageexts)
128 objc.clean: objc.mostlyclean
129         -rm -rf objc-headers
130 objc.distclean:
131         -rm -f objc/Makefile objc/Make-host objc/Make-target
132         -rm -f objc/config.status objc/config.cache
133         -rm -f objc-parse.output
134 objc.maintainer-clean:
135         -rm -f $(srcdir)/objc/objc-parse.y $(srcdir)/objc/objc-parse.c 
138 # Stage hooks:
140 objc.stage1: stage1-start
141         -mv objc/*$(objext) stage1/objc
142 objc.stage2: stage2-start
143         -mv objc/*$(objext) stage2/objc
144 objc.stage3: stage3-start
145         -mv objc/*$(objext) stage3/objc
146 objc.stage4: stage4-start
147         -mv objc/*$(objext) stage4/objc
148 objc.stageprofile: stageprofile-start
149         -mv objc/*$(objext) stageprofile/objc
150 objc.stagefeedback: stagefeedback-start
151         -mv objc/*$(objext) stagefeedback/objc